diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800lib.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.h | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.h b/drivers/net/wireless/rt2x00/rt2800lib.h index 091641e3c5e2..f2d15941c71a 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.h +++ b/drivers/net/wireless/rt2x00/rt2800lib.h | |||
@@ -1,4 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (C) 2010 Willow Garage <http://www.willowgarage.com> | ||
3 | Copyright (C) 2010 Ivo van Doorn <IvDoorn@gmail.com> | ||
2 | Copyright (C) 2009 Bartlomiej Zolnierkiewicz | 4 | Copyright (C) 2009 Bartlomiej Zolnierkiewicz |
3 | 5 | ||
4 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
@@ -44,6 +46,7 @@ struct rt2800_ops { | |||
44 | int (*drv_write_firmware)(struct rt2x00_dev *rt2x00dev, | 46 | int (*drv_write_firmware)(struct rt2x00_dev *rt2x00dev, |
45 | const u8 *data, const size_t len); | 47 | const u8 *data, const size_t len); |
46 | int (*drv_init_registers)(struct rt2x00_dev *rt2x00dev); | 48 | int (*drv_init_registers)(struct rt2x00_dev *rt2x00dev); |
49 | __le32 *(*drv_get_txwi)(struct queue_entry *entry); | ||
47 | }; | 50 | }; |
48 | 51 | ||
49 | static inline void rt2800_register_read(struct rt2x00_dev *rt2x00dev, | 52 | static inline void rt2800_register_read(struct rt2x00_dev *rt2x00dev, |
@@ -126,19 +129,34 @@ static inline int rt2800_drv_init_registers(struct rt2x00_dev *rt2x00dev) | |||
126 | return rt2800ops->drv_init_registers(rt2x00dev); | 129 | return rt2800ops->drv_init_registers(rt2x00dev); |
127 | } | 130 | } |
128 | 131 | ||
132 | static inline __le32 *rt2800_drv_get_txwi(struct queue_entry *entry) | ||
133 | { | ||
134 | const struct rt2800_ops *rt2800ops = entry->queue->rt2x00dev->ops->drv; | ||
135 | |||
136 | return rt2800ops->drv_get_txwi(entry); | ||
137 | } | ||
138 | |||
129 | void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, | 139 | void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, |
130 | const u8 command, const u8 token, | 140 | const u8 command, const u8 token, |
131 | const u8 arg0, const u8 arg1); | 141 | const u8 arg0, const u8 arg1); |
132 | 142 | ||
143 | int rt2800_wait_csr_ready(struct rt2x00_dev *rt2x00dev); | ||
144 | int rt2800_wait_wpdma_ready(struct rt2x00_dev *rt2x00dev); | ||
145 | |||
133 | int rt2800_check_firmware(struct rt2x00_dev *rt2x00dev, | 146 | int rt2800_check_firmware(struct rt2x00_dev *rt2x00dev, |
134 | const u8 *data, const size_t len); | 147 | const u8 *data, const size_t len); |
135 | int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, | 148 | int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, |
136 | const u8 *data, const size_t len); | 149 | const u8 *data, const size_t len); |
137 | 150 | ||
138 | void rt2800_write_txwi(__le32 *txwi, struct txentry_desc *txdesc); | 151 | void rt2800_write_tx_data(struct queue_entry *entry, |
152 | struct txentry_desc *txdesc); | ||
139 | void rt2800_process_rxwi(struct queue_entry *entry, struct rxdone_entry_desc *txdesc); | 153 | void rt2800_process_rxwi(struct queue_entry *entry, struct rxdone_entry_desc *txdesc); |
140 | 154 | ||
155 | void rt2800_txdone(struct rt2x00_dev *rt2x00dev); | ||
156 | void rt2800_txdone_entry(struct queue_entry *entry, u32 status); | ||
157 | |||
141 | void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc); | 158 | void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc); |
159 | void rt2800_clear_beacon(struct queue_entry *entry); | ||
142 | 160 | ||
143 | extern const struct rt2x00debug rt2800_rt2x00debug; | 161 | extern const struct rt2x00debug rt2800_rt2x00debug; |
144 | 162 | ||
@@ -153,7 +171,8 @@ void rt2800_config_filter(struct rt2x00_dev *rt2x00dev, | |||
153 | const unsigned int filter_flags); | 171 | const unsigned int filter_flags); |
154 | void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf, | 172 | void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf, |
155 | struct rt2x00intf_conf *conf, const unsigned int flags); | 173 | struct rt2x00intf_conf *conf, const unsigned int flags); |
156 | void rt2800_config_erp(struct rt2x00_dev *rt2x00dev, struct rt2x00lib_erp *erp); | 174 | void rt2800_config_erp(struct rt2x00_dev *rt2x00dev, struct rt2x00lib_erp *erp, |
175 | u32 changed); | ||
157 | void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant); | 176 | void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant); |
158 | void rt2800_config(struct rt2x00_dev *rt2x00dev, | 177 | void rt2800_config(struct rt2x00_dev *rt2x00dev, |
159 | struct rt2x00lib_conf *libconf, | 178 | struct rt2x00lib_conf *libconf, |
@@ -162,11 +181,10 @@ void rt2800_link_stats(struct rt2x00_dev *rt2x00dev, struct link_qual *qual); | |||
162 | void rt2800_reset_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual); | 181 | void rt2800_reset_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual); |
163 | void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, | 182 | void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, |
164 | const u32 count); | 183 | const u32 count); |
184 | void rt2800_gain_calibration(struct rt2x00_dev *rt2x00dev); | ||
165 | 185 | ||
166 | int rt2800_init_registers(struct rt2x00_dev *rt2x00dev); | 186 | int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev); |
167 | int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev); | 187 | void rt2800_disable_radio(struct rt2x00_dev *rt2x00dev); |
168 | int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev); | ||
169 | int rt2800_wait_wpdma_ready(struct rt2x00_dev *rt2x00dev); | ||
170 | 188 | ||
171 | int rt2800_efuse_detect(struct rt2x00_dev *rt2x00dev); | 189 | int rt2800_efuse_detect(struct rt2x00_dev *rt2x00dev); |
172 | void rt2800_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev); | 190 | void rt2800_read_eeprom_efuse(struct rt2x00_dev *rt2x00dev); |
@@ -182,6 +200,9 @@ int rt2800_conf_tx(struct ieee80211_hw *hw, u16 queue_idx, | |||
182 | u64 rt2800_get_tsf(struct ieee80211_hw *hw); | 200 | u64 rt2800_get_tsf(struct ieee80211_hw *hw); |
183 | int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 201 | int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
184 | enum ieee80211_ampdu_mlme_action action, | 202 | enum ieee80211_ampdu_mlme_action action, |
185 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 203 | struct ieee80211_sta *sta, u16 tid, u16 *ssn, |
204 | u8 buf_size); | ||
205 | int rt2800_get_survey(struct ieee80211_hw *hw, int idx, | ||
206 | struct survey_info *survey); | ||
186 | 207 | ||
187 | #endif /* RT2800LIB_H */ | 208 | #endif /* RT2800LIB_H */ |