aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/ath5k.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/ath5k.h')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h60
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);
1140int ath5k_sysfs_register(struct ath5k_softc *sc); 1140int ath5k_sysfs_register(struct ath5k_softc *sc);
1141void ath5k_sysfs_unregister(struct ath5k_softc *sc); 1141void ath5k_sysfs_unregister(struct ath5k_softc *sc);
1142 1142
1143
1143/* LED functions */ 1144/* LED functions */
1144int ath5k_init_leds(struct ath5k_softc *sc); 1145int ath5k_init_leds(struct ath5k_softc *sc);
1145void ath5k_led_enable(struct ath5k_softc *sc); 1146void ath5k_led_enable(struct ath5k_softc *sc);
1146void ath5k_led_off(struct ath5k_softc *sc); 1147void ath5k_led_off(struct ath5k_softc *sc);
1147void ath5k_unregister_leds(struct ath5k_softc *sc); 1148void ath5k_unregister_leds(struct ath5k_softc *sc);
1148 1149
1150
1149/* Reset Functions */ 1151/* Reset Functions */
1150int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial); 1152int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial);
1151int ath5k_hw_on_hold(struct ath5k_hw *ah); 1153int 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 */
1162unsigned int ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec);
1163unsigned int ath5k_hw_clocktoh(struct ath5k_hw *ah, unsigned int clock);
1164void ath5k_hw_set_clockrate(struct ath5k_hw *ah);
1165
1166
1158/* DMA Related Functions */ 1167/* DMA Related Functions */
1159void ath5k_hw_start_rx_dma(struct ath5k_hw *ah); 1168void ath5k_hw_start_rx_dma(struct ath5k_hw *ah);
1160int ath5k_hw_stop_rx_dma(struct ath5k_hw *ah); 1169int ath5k_hw_stop_rx_dma(struct ath5k_hw *ah);
@@ -1171,26 +1180,28 @@ bool ath5k_hw_is_intr_pending(struct ath5k_hw *ah);
1171int ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask); 1180int ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask);
1172enum ath5k_int ath5k_hw_set_imr(struct ath5k_hw *ah, enum ath5k_int new_mask); 1181enum ath5k_int ath5k_hw_set_imr(struct ath5k_hw *ah, enum ath5k_int new_mask);
1173void ath5k_hw_update_mib_counters(struct ath5k_hw *ah); 1182void ath5k_hw_update_mib_counters(struct ath5k_hw *ah);
1183/* Init function */
1184void ath5k_hw_dma_init(struct ath5k_hw *ah);
1174 1185
1175/* EEPROM access functions */ 1186/* EEPROM access functions */
1176int ath5k_eeprom_init(struct ath5k_hw *ah); 1187int ath5k_eeprom_init(struct ath5k_hw *ah);
1177void ath5k_eeprom_detach(struct ath5k_hw *ah); 1188void ath5k_eeprom_detach(struct ath5k_hw *ah);
1178int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac); 1189int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac);
1179 1190
1191
1180/* Protocol Control Unit Functions */ 1192/* Protocol Control Unit Functions */
1181extern int ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype opmode); 1193extern int ath5k_hw_set_opmode(struct ath5k_hw *ah, enum nl80211_iftype opmode);
1182void ath5k_hw_set_coverage_class(struct ath5k_hw *ah, u8 coverage_class); 1194void ath5k_hw_set_coverage_class(struct ath5k_hw *ah, u8 coverage_class);
1183/* BSSID Functions */ 1195/* RX filter control*/
1184int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac); 1196int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac);
1185void ath5k_hw_set_bssid(struct ath5k_hw *ah); 1197void ath5k_hw_set_bssid(struct ath5k_hw *ah);
1186void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask); 1198void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask);
1187/* Receive start/stop functions */
1188void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah);
1189void ath5k_hw_stop_rx_pcu(struct ath5k_hw *ah);
1190/* RX Filter functions */
1191void ath5k_hw_set_mcast_filter(struct ath5k_hw *ah, u32 filter0, u32 filter1); 1199void ath5k_hw_set_mcast_filter(struct ath5k_hw *ah, u32 filter0, u32 filter1);
1192u32 ath5k_hw_get_rx_filter(struct ath5k_hw *ah); 1200u32 ath5k_hw_get_rx_filter(struct ath5k_hw *ah);
1193void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter); 1201void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter);
1202/* Receive (DRU) start/stop functions */
1203void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah);
1204void ath5k_hw_stop_rx_pcu(struct ath5k_hw *ah);
1194/* Beacon control functions */ 1205/* Beacon control functions */
1195u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah); 1206u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah);
1196void ath5k_hw_set_tsf64(struct ath5k_hw *ah, u64 tsf64); 1207void 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);
1199bool ath5k_hw_check_beacon_timers(struct ath5k_hw *ah, int intval); 1210bool ath5k_hw_check_beacon_timers(struct ath5k_hw *ah, int intval);
1200/* ACK bit rate */ 1211/* ACK bit rate */
1201void ath5k_hw_set_ack_bitrate_high(struct ath5k_hw *ah, bool high); 1212void ath5k_hw_set_ack_bitrate_high(struct ath5k_hw *ah, bool high);
1202/* Clock rate related functions */ 1213/* Init function */
1203unsigned int ath5k_hw_htoclock(struct ath5k_hw *ah, unsigned int usec); 1214void ath5k_hw_pcu_init(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
1204unsigned int ath5k_hw_clocktoh(struct ath5k_hw *ah, unsigned int clock); 1215 u8 mode);
1205void 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 */
1208int ath5k_hw_get_tx_queueprops(struct ath5k_hw *ah, int queue, 1218int 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);
1216void ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue); 1226void ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue);
1217int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue); 1227int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue);
1218int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time); 1228int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time);
1229/* Init function */
1230int ath5k_hw_init_queues(struct ath5k_hw *ah);
1219 1231
1220/* Hardware Descriptor Functions */ 1232/* Hardware Descriptor Functions */
1221int ath5k_hw_init_desc_functions(struct ath5k_hw *ah); 1233int 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 */
1229void ath5k_hw_set_ledstate(struct ath5k_hw *ah, unsigned int state); 1242void ath5k_hw_set_ledstate(struct ath5k_hw *ah, unsigned int state);
1230int ath5k_hw_set_gpio_input(struct ath5k_hw *ah, u32 gpio); 1243int 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);
1234void ath5k_hw_set_gpio_intr(struct ath5k_hw *ah, unsigned int gpio, 1247void 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 */
1238void ath5k_rfkill_hw_start(struct ath5k_hw *ah); 1252void ath5k_rfkill_hw_start(struct ath5k_hw *ah);
1239void ath5k_rfkill_hw_stop(struct ath5k_hw *ah); 1253void ath5k_rfkill_hw_stop(struct ath5k_hw *ah);
1240 1254
1241/* Misc functions */ 1255
1256/* Misc functions TODO: Cleanup */
1242int ath5k_hw_set_capabilities(struct ath5k_hw *ah); 1257int ath5k_hw_set_capabilities(struct ath5k_hw *ah);
1243int ath5k_hw_get_capability(struct ath5k_hw *ah, 1258int 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,
1246int ath5k_hw_enable_pspoll(struct ath5k_hw *ah, u8 *bssid, u16 assoc_id); 1261int ath5k_hw_enable_pspoll(struct ath5k_hw *ah, u8 *bssid, u16 assoc_id);
1247int ath5k_hw_disable_pspoll(struct ath5k_hw *ah); 1262int ath5k_hw_disable_pspoll(struct ath5k_hw *ah);
1248 1263
1264
1249/* Initial register settings functions */ 1265/* Initial register settings functions */
1250int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool change_channel); 1266int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool change_channel);
1251 1267
1252/* Initialize RF */ 1268
1253int ath5k_hw_rfregs_init(struct ath5k_hw *ah, 1269/* PHY functions */
1254 struct ieee80211_channel *channel, 1270/* Misc PHY functions */
1255 unsigned int mode); 1271u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan);
1256int ath5k_hw_rfgain_init(struct ath5k_hw *ah, unsigned int freq); 1272int ath5k_hw_phy_disable(struct ath5k_hw *ah);
1273/* Gain_F optimization */
1257enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah); 1274enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah);
1258int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah); 1275int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah);
1259/* PHY/RF channel functions */ 1276/* PHY/RF channel functions */
1260bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags); 1277bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags);
1261int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel);
1262/* PHY calibration */ 1278/* PHY calibration */
1263void ath5k_hw_init_nfcal_hist(struct ath5k_hw *ah); 1279void ath5k_hw_init_nfcal_hist(struct ath5k_hw *ah);
1264int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, 1280int 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 */
1268bool ath5k_hw_chan_has_spur_noise(struct ath5k_hw *ah, 1284bool ath5k_hw_chan_has_spur_noise(struct ath5k_hw *ah,
1269 struct ieee80211_channel *channel); 1285 struct ieee80211_channel *channel);
1270void ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah,
1271 struct ieee80211_channel *channel);
1272/* Misc PHY functions */
1273u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan);
1274int ath5k_hw_phy_disable(struct ath5k_hw *ah);
1275/* Antenna control */ 1286/* Antenna control */
1276void ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode); 1287void ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode);
1277void ath5k_hw_set_antenna_switch(struct ath5k_hw *ah, u8 ee_mode); 1288void ath5k_hw_set_antenna_switch(struct ath5k_hw *ah, u8 ee_mode);
1278/* TX power setup */ 1289/* TX power setup */
1279int ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
1280 u8 ee_mode, u8 txpower);
1281int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower); 1290int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower);
1291/* Init function */
1292int 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