diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/ath5k.h')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ath5k.h | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index 2718136e488..85ff822c81f 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
@@ -1140,12 +1140,14 @@ void ath5k_hw_detach(struct ath5k_hw *ah); | |||
1140 | int ath5k_sysfs_register(struct ath5k_softc *sc); | 1140 | int ath5k_sysfs_register(struct ath5k_softc *sc); |
1141 | void ath5k_sysfs_unregister(struct ath5k_softc *sc); | 1141 | void ath5k_sysfs_unregister(struct ath5k_softc *sc); |
1142 | 1142 | ||
1143 | |||
1143 | /* LED functions */ | 1144 | /* LED functions */ |
1144 | int ath5k_init_leds(struct ath5k_softc *sc); | 1145 | int ath5k_init_leds(struct ath5k_softc *sc); |
1145 | void ath5k_led_enable(struct ath5k_softc *sc); | 1146 | void ath5k_led_enable(struct ath5k_softc *sc); |
1146 | void ath5k_led_off(struct ath5k_softc *sc); | 1147 | void ath5k_led_off(struct ath5k_softc *sc); |
1147 | void ath5k_unregister_leds(struct ath5k_softc *sc); | 1148 | void ath5k_unregister_leds(struct ath5k_softc *sc); |
1148 | 1149 | ||
1150 | |||
1149 | /* Reset Functions */ | 1151 | /* Reset Functions */ |
1150 | int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial); | 1152 | int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial); |
1151 | int ath5k_hw_on_hold(struct ath5k_hw *ah); | 1153 | int ath5k_hw_on_hold(struct ath5k_hw *ah); |
@@ -1155,6 +1157,13 @@ int ath5k_hw_register_timeout(struct ath5k_hw *ah, u32 reg, u32 flag, u32 val, | |||
1155 | bool is_set); | 1157 | bool is_set); |
1156 | /* Power management functions */ | 1158 | /* Power management functions */ |
1157 | 1159 | ||
1160 | |||
1161 | /* Clock rate related functions */ | ||
1162 | unsigned int ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec); | ||
1163 | unsigned int ath5k_hw_clocktoh(struct ath5k_hw *ah, unsigned int clock); | ||
1164 | void ath5k_hw_set_clockrate(struct ath5k_hw *ah); | ||
1165 | |||
1166 | |||
1158 | /* DMA Related Functions */ | 1167 | /* DMA Related Functions */ |
1159 | void ath5k_hw_start_rx_dma(struct ath5k_hw *ah); | 1168 | void ath5k_hw_start_rx_dma(struct ath5k_hw *ah); |
1160 | int ath5k_hw_stop_rx_dma(struct ath5k_hw *ah); | 1169 | int ath5k_hw_stop_rx_dma(struct ath5k_hw *ah); |
@@ -1171,26 +1180,28 @@ bool ath5k_hw_is_intr_pending(struct ath5k_hw *ah); | |||
1171 | int ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask); | 1180 | int ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask); |
1172 | enum ath5k_int ath5k_hw_set_imr(struct ath5k_hw *ah, enum ath5k_int new_mask); | 1181 | enum ath5k_int ath5k_hw_set_imr(struct ath5k_hw *ah, enum ath5k_int new_mask); |
1173 | void ath5k_hw_update_mib_counters(struct ath5k_hw *ah); | 1182 | void ath5k_hw_update_mib_counters(struct ath5k_hw *ah); |
1183 | /* Init function */ | ||
1184 | void ath5k_hw_dma_init(struct ath5k_hw *ah); | ||
1174 | 1185 | ||
1175 | /* EEPROM access functions */ | 1186 | /* EEPROM access functions */ |
1176 | int ath5k_eeprom_init(struct ath5k_hw *ah); | 1187 | int ath5k_eeprom_init(struct ath5k_hw *ah); |
1177 | void ath5k_eeprom_detach(struct ath5k_hw *ah); | 1188 | void ath5k_eeprom_detach(struct ath5k_hw *ah); |
1178 | int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac); | 1189 | int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac); |
1179 | 1190 | ||
1191 | |||
1180 | /* Protocol Control Unit Functions */ | 1192 | /* Protocol Control Unit Functions */ |
1181 | extern int ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype opmode); | 1193 | extern int ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype opmode); |
1182 | void ath5k_hw_set_coverage_class(struct ath5k_hw *ah, u8 coverage_class); | 1194 | void ath5k_hw_set_coverage_class(struct ath5k_hw *ah, u8 coverage_class); |
1183 | /* BSSID Functions */ | 1195 | /* RX filter control*/ |
1184 | int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac); | 1196 | int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac); |
1185 | void ath5k_hw_set_bssid(struct ath5k_hw *ah); | 1197 | void ath5k_hw_set_bssid(struct ath5k_hw *ah); |
1186 | void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask); | 1198 | void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask); |
1187 | /* Receive start/stop functions */ | ||
1188 | void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah); | ||
1189 | void ath5k_hw_stop_rx_pcu(struct ath5k_hw *ah); | ||
1190 | /* RX Filter functions */ | ||
1191 | void ath5k_hw_set_mcast_filter(struct ath5k_hw *ah, u32 filter0, u32 filter1); | 1199 | void ath5k_hw_set_mcast_filter(struct ath5k_hw *ah, u32 filter0, u32 filter1); |
1192 | u32 ath5k_hw_get_rx_filter(struct ath5k_hw *ah); | 1200 | u32 ath5k_hw_get_rx_filter(struct ath5k_hw *ah); |
1193 | void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter); | 1201 | void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter); |
1202 | /* Receive (DRU) start/stop functions */ | ||
1203 | void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah); | ||
1204 | void ath5k_hw_stop_rx_pcu(struct ath5k_hw *ah); | ||
1194 | /* Beacon control functions */ | 1205 | /* Beacon control functions */ |
1195 | u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah); | 1206 | u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah); |
1196 | void ath5k_hw_set_tsf64(struct ath5k_hw *ah, u64 tsf64); | 1207 | void ath5k_hw_set_tsf64(struct ath5k_hw *ah, u64 tsf64); |
@@ -1199,10 +1210,9 @@ void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval); | |||
1199 | bool ath5k_hw_check_beacon_timers(struct ath5k_hw *ah, int intval); | 1210 | bool ath5k_hw_check_beacon_timers(struct ath5k_hw *ah, int intval); |
1200 | /* ACK bit rate */ | 1211 | /* ACK bit rate */ |
1201 | void ath5k_hw_set_ack_bitrate_high(struct ath5k_hw *ah, bool high); | 1212 | void ath5k_hw_set_ack_bitrate_high(struct ath5k_hw *ah, bool high); |
1202 | /* Clock rate related functions */ | 1213 | /* Init function */ |
1203 | unsigned int ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec); | 1214 | void ath5k_hw_pcu_init(struct ath5k_hw *ah, enum nl80211_iftype op_mode, |
1204 | unsigned int ath5k_hw_clocktoh(struct ath5k_hw *ah, unsigned int clock); | 1215 | u8 mode); |
1205 | void ath5k_hw_set_clockrate(struct ath5k_hw *ah); | ||
1206 | 1216 | ||
1207 | /* Queue Control Unit, DFS Control Unit Functions */ | 1217 | /* Queue Control Unit, DFS Control Unit Functions */ |
1208 | int ath5k_hw_get_tx_queueprops(struct ath5k_hw *ah, int queue, | 1218 | int ath5k_hw_get_tx_queueprops(struct ath5k_hw *ah, int queue, |
@@ -1216,6 +1226,8 @@ u32 ath5k_hw_num_tx_pending(struct ath5k_hw *ah, unsigned int queue); | |||
1216 | void ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue); | 1226 | void ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue); |
1217 | int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue); | 1227 | int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue); |
1218 | int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time); | 1228 | int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time); |
1229 | /* Init function */ | ||
1230 | int ath5k_hw_init_queues(struct ath5k_hw *ah); | ||
1219 | 1231 | ||
1220 | /* Hardware Descriptor Functions */ | 1232 | /* Hardware Descriptor Functions */ |
1221 | int ath5k_hw_init_desc_functions(struct ath5k_hw *ah); | 1233 | int ath5k_hw_init_desc_functions(struct ath5k_hw *ah); |
@@ -1225,6 +1237,7 @@ int ath5k_hw_setup_mrr_tx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc, | |||
1225 | unsigned int tx_rate1, u_int tx_tries1, u_int tx_rate2, | 1237 | unsigned int tx_rate1, u_int tx_tries1, u_int tx_rate2, |
1226 | u_int tx_tries2, unsigned int tx_rate3, u_int tx_tries3); | 1238 | u_int tx_tries2, unsigned int tx_rate3, u_int tx_tries3); |
1227 | 1239 | ||
1240 | |||
1228 | /* GPIO Functions */ | 1241 | /* GPIO Functions */ |
1229 | void ath5k_hw_set_ledstate(struct ath5k_hw *ah, unsigned int state); | 1242 | void ath5k_hw_set_ledstate(struct ath5k_hw *ah, unsigned int state); |
1230 | int ath5k_hw_set_gpio_input(struct ath5k_hw *ah, u32 gpio); | 1243 | int ath5k_hw_set_gpio_input(struct ath5k_hw *ah, u32 gpio); |
@@ -1234,11 +1247,13 @@ int ath5k_hw_set_gpio(struct ath5k_hw *ah, u32 gpio, u32 val); | |||
1234 | void ath5k_hw_set_gpio_intr(struct ath5k_hw *ah, unsigned int gpio, | 1247 | void ath5k_hw_set_gpio_intr(struct ath5k_hw *ah, unsigned int gpio, |
1235 | u32 interrupt_level); | 1248 | u32 interrupt_level); |
1236 | 1249 | ||
1237 | /* rfkill Functions */ | 1250 | |
1251 | /* RFkill Functions */ | ||
1238 | void ath5k_rfkill_hw_start(struct ath5k_hw *ah); | 1252 | void ath5k_rfkill_hw_start(struct ath5k_hw *ah); |
1239 | void ath5k_rfkill_hw_stop(struct ath5k_hw *ah); | 1253 | void ath5k_rfkill_hw_stop(struct ath5k_hw *ah); |
1240 | 1254 | ||
1241 | /* Misc functions */ | 1255 | |
1256 | /* Misc functions TODO: Cleanup */ | ||
1242 | int ath5k_hw_set_capabilities(struct ath5k_hw *ah); | 1257 | int ath5k_hw_set_capabilities(struct ath5k_hw *ah); |
1243 | int ath5k_hw_get_capability(struct ath5k_hw *ah, | 1258 | int ath5k_hw_get_capability(struct ath5k_hw *ah, |
1244 | enum ath5k_capability_type cap_type, u32 capability, | 1259 | enum ath5k_capability_type cap_type, u32 capability, |
@@ -1246,19 +1261,20 @@ int ath5k_hw_get_capability(struct ath5k_hw *ah, | |||
1246 | int ath5k_hw_enable_pspoll(struct ath5k_hw *ah, u8 *bssid, u16 assoc_id); | 1261 | int ath5k_hw_enable_pspoll(struct ath5k_hw *ah, u8 *bssid, u16 assoc_id); |
1247 | int ath5k_hw_disable_pspoll(struct ath5k_hw *ah); | 1262 | int ath5k_hw_disable_pspoll(struct ath5k_hw *ah); |
1248 | 1263 | ||
1264 | |||
1249 | /* Initial register settings functions */ | 1265 | /* Initial register settings functions */ |
1250 | int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool change_channel); | 1266 | int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool change_channel); |
1251 | 1267 | ||
1252 | /* Initialize RF */ | 1268 | |
1253 | int ath5k_hw_rfregs_init(struct ath5k_hw *ah, | 1269 | /* PHY functions */ |
1254 | struct ieee80211_channel *channel, | 1270 | /* Misc PHY functions */ |
1255 | unsigned int mode); | 1271 | u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan); |
1256 | int ath5k_hw_rfgain_init(struct ath5k_hw *ah, unsigned int freq); | 1272 | int ath5k_hw_phy_disable(struct ath5k_hw *ah); |
1273 | /* Gain_F optimization */ | ||
1257 | enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah); | 1274 | enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah); |
1258 | int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah); | 1275 | int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah); |
1259 | /* PHY/RF channel functions */ | 1276 | /* PHY/RF channel functions */ |
1260 | bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags); | 1277 | bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags); |
1261 | int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel); | ||
1262 | /* PHY calibration */ | 1278 | /* PHY calibration */ |
1263 | void ath5k_hw_init_nfcal_hist(struct ath5k_hw *ah); | 1279 | void ath5k_hw_init_nfcal_hist(struct ath5k_hw *ah); |
1264 | int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, | 1280 | int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, |
@@ -1267,18 +1283,14 @@ void ath5k_hw_update_noise_floor(struct ath5k_hw *ah); | |||
1267 | /* Spur mitigation */ | 1283 | /* Spur mitigation */ |
1268 | bool ath5k_hw_chan_has_spur_noise(struct ath5k_hw *ah, | 1284 | bool ath5k_hw_chan_has_spur_noise(struct ath5k_hw *ah, |
1269 | struct ieee80211_channel *channel); | 1285 | struct ieee80211_channel *channel); |
1270 | void ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah, | ||
1271 | struct ieee80211_channel *channel); | ||
1272 | /* Misc PHY functions */ | ||
1273 | u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan); | ||
1274 | int ath5k_hw_phy_disable(struct ath5k_hw *ah); | ||
1275 | /* Antenna control */ | 1286 | /* Antenna control */ |
1276 | void ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode); | 1287 | void ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode); |
1277 | void ath5k_hw_set_antenna_switch(struct ath5k_hw *ah, u8 ee_mode); | 1288 | void ath5k_hw_set_antenna_switch(struct ath5k_hw *ah, u8 ee_mode); |
1278 | /* TX power setup */ | 1289 | /* TX power setup */ |
1279 | int ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, | ||
1280 | u8 ee_mode, u8 txpower); | ||
1281 | int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower); | 1290 | int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower); |
1291 | /* Init function */ | ||
1292 | int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, | ||
1293 | u8 mode, u8 ee_mode, u8 freq); | ||
1282 | 1294 | ||
1283 | /* | 1295 | /* |
1284 | * Functions used internaly | 1296 | * Functions used internaly |