Lines Matching refs:rtwdev
10 int (*tx)(struct rtw_dev *rtwdev,
13 int (*setup)(struct rtw_dev *rtwdev);
14 int (*start)(struct rtw_dev *rtwdev);
15 void (*stop)(struct rtw_dev *rtwdev);
17 int (*write_data_rsvd_page)(struct rtw_dev *rtwdev, u8 *buf, u32 size);
18 int (*write_data_h2c)(struct rtw_dev *rtwdev, u8 *buf, u32 size);
20 u8 (*read8)(struct rtw_dev *rtwdev, u32 addr);
21 u16 (*read16)(struct rtw_dev *rtwdev, u32 addr);
22 u32 (*read32)(struct rtw_dev *rtwdev, u32 addr);
23 void (*write8)(struct rtw_dev *rtwdev, u32 addr, u8 val);
24 void (*write16)(struct rtw_dev *rtwdev, u32 addr, u16 val);
25 void (*write32)(struct rtw_dev *rtwdev, u32 addr, u32 val);
28 static inline int rtw_hci_tx(struct rtw_dev *rtwdev, in rtw_hci_tx() argument
32 return rtwdev->hci.ops->tx(rtwdev, pkt_info, skb); in rtw_hci_tx()
35 static inline int rtw_hci_setup(struct rtw_dev *rtwdev) in rtw_hci_setup() argument
37 return rtwdev->hci.ops->setup(rtwdev); in rtw_hci_setup()
40 static inline int rtw_hci_start(struct rtw_dev *rtwdev) in rtw_hci_start() argument
42 return rtwdev->hci.ops->start(rtwdev); in rtw_hci_start()
45 static inline void rtw_hci_stop(struct rtw_dev *rtwdev) in rtw_hci_stop() argument
47 rtwdev->hci.ops->stop(rtwdev); in rtw_hci_stop()
51 rtw_hci_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf, u32 size) in rtw_hci_write_data_rsvd_page() argument
53 return rtwdev->hci.ops->write_data_rsvd_page(rtwdev, buf, size); in rtw_hci_write_data_rsvd_page()
57 rtw_hci_write_data_h2c(struct rtw_dev *rtwdev, u8 *buf, u32 size) in rtw_hci_write_data_h2c() argument
59 return rtwdev->hci.ops->write_data_h2c(rtwdev, buf, size); in rtw_hci_write_data_h2c()
62 static inline u8 rtw_read8(struct rtw_dev *rtwdev, u32 addr) in rtw_read8() argument
64 return rtwdev->hci.ops->read8(rtwdev, addr); in rtw_read8()
67 static inline u16 rtw_read16(struct rtw_dev *rtwdev, u32 addr) in rtw_read16() argument
69 return rtwdev->hci.ops->read16(rtwdev, addr); in rtw_read16()
72 static inline u32 rtw_read32(struct rtw_dev *rtwdev, u32 addr) in rtw_read32() argument
74 return rtwdev->hci.ops->read32(rtwdev, addr); in rtw_read32()
77 static inline void rtw_write8(struct rtw_dev *rtwdev, u32 addr, u8 val) in rtw_write8() argument
79 rtwdev->hci.ops->write8(rtwdev, addr, val); in rtw_write8()
82 static inline void rtw_write16(struct rtw_dev *rtwdev, u32 addr, u16 val) in rtw_write16() argument
84 rtwdev->hci.ops->write16(rtwdev, addr, val); in rtw_write16()
87 static inline void rtw_write32(struct rtw_dev *rtwdev, u32 addr, u32 val) in rtw_write32() argument
89 rtwdev->hci.ops->write32(rtwdev, addr, val); in rtw_write32()
92 static inline void rtw_write8_set(struct rtw_dev *rtwdev, u32 addr, u8 bit) in rtw_write8_set() argument
96 val = rtw_read8(rtwdev, addr); in rtw_write8_set()
97 rtw_write8(rtwdev, addr, val | bit); in rtw_write8_set()
100 static inline void rtw_write16_set(struct rtw_dev *rtwdev, u32 addr, u16 bit) in rtw_write16_set() argument
104 val = rtw_read16(rtwdev, addr); in rtw_write16_set()
105 rtw_write16(rtwdev, addr, val | bit); in rtw_write16_set()
108 static inline void rtw_write32_set(struct rtw_dev *rtwdev, u32 addr, u32 bit) in rtw_write32_set() argument
112 val = rtw_read32(rtwdev, addr); in rtw_write32_set()
113 rtw_write32(rtwdev, addr, val | bit); in rtw_write32_set()
116 static inline void rtw_write8_clr(struct rtw_dev *rtwdev, u32 addr, u8 bit) in rtw_write8_clr() argument
120 val = rtw_read8(rtwdev, addr); in rtw_write8_clr()
121 rtw_write8(rtwdev, addr, val & ~bit); in rtw_write8_clr()
124 static inline void rtw_write16_clr(struct rtw_dev *rtwdev, u32 addr, u16 bit) in rtw_write16_clr() argument
128 val = rtw_read16(rtwdev, addr); in rtw_write16_clr()
129 rtw_write16(rtwdev, addr, val & ~bit); in rtw_write16_clr()
132 static inline void rtw_write32_clr(struct rtw_dev *rtwdev, u32 addr, u32 bit) in rtw_write32_clr() argument
136 val = rtw_read32(rtwdev, addr); in rtw_write32_clr()
137 rtw_write32(rtwdev, addr, val & ~bit); in rtw_write32_clr()
141 rtw_read_rf(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path, in rtw_read_rf() argument
147 spin_lock_irqsave(&rtwdev->rf_lock, flags); in rtw_read_rf()
148 val = rtwdev->chip->ops->read_rf(rtwdev, rf_path, addr, mask); in rtw_read_rf()
149 spin_unlock_irqrestore(&rtwdev->rf_lock, flags); in rtw_read_rf()
155 rtw_write_rf(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path, in rtw_write_rf() argument
160 spin_lock_irqsave(&rtwdev->rf_lock, flags); in rtw_write_rf()
161 rtwdev->chip->ops->write_rf(rtwdev, rf_path, addr, mask, data); in rtw_write_rf()
162 spin_unlock_irqrestore(&rtwdev->rf_lock, flags); in rtw_write_rf()
166 rtw_read32_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask) in rtw_read32_mask() argument
172 orig = rtw_read32(rtwdev, addr); in rtw_read32_mask()
179 rtw_write32_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data) in rtw_write32_mask() argument
187 orig = rtw_read32(rtwdev, addr); in rtw_write32_mask()
189 rtw_write32(rtwdev, addr, set); in rtw_write32_mask()
193 rtw_write8_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u8 data) in rtw_write8_mask() argument
201 orig = rtw_read8(rtwdev, addr); in rtw_write8_mask()
203 rtw_write8(rtwdev, addr, set); in rtw_write8_mask()
206 static inline enum rtw_hci_type rtw_hci_type(struct rtw_dev *rtwdev) in rtw_hci_type() argument
208 return rtwdev->hci.type; in rtw_hci_type()