aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h21
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c7
-rw-r--r--drivers/net/wireless/ath/ath5k/reset.c1
3 files changed, 10 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 6358233bac9..91375113916 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -713,8 +713,8 @@ struct ath5k_gain {
713 * Used internaly for reset_tx_queue). 713 * Used internaly for reset_tx_queue).
714 * Also see struct struct ieee80211_channel. 714 * Also see struct struct ieee80211_channel.
715 */ 715 */
716#define IS_CHAN_XR(_c) ((_c.hw_value & CHANNEL_XR) != 0) 716#define IS_CHAN_XR(_c) ((_c->hw_value & CHANNEL_XR) != 0)
717#define IS_CHAN_B(_c) ((_c.hw_value & CHANNEL_B) != 0) 717#define IS_CHAN_B(_c) ((_c->hw_value & CHANNEL_B) != 0)
718 718
719/* 719/*
720 * The following structure is used to map 2GHz channels to 720 * The following structure is used to map 2GHz channels to
@@ -1029,14 +1029,15 @@ struct ath5k_hw {
1029 enum ath5k_int ah_imr; 1029 enum ath5k_int ah_imr;
1030 1030
1031 enum nl80211_iftype ah_op_mode; 1031 enum nl80211_iftype ah_op_mode;
1032 enum ath5k_power_mode ah_power_mode; 1032 struct ieee80211_channel *ah_current_channel;
1033 struct ieee80211_channel ah_current_channel;
1034 bool ah_turbo; 1033 bool ah_turbo;
1035 bool ah_calibration; 1034 bool ah_calibration;
1036 bool ah_running;
1037 bool ah_single_chip; 1035 bool ah_single_chip;
1038 bool ah_combined_mic; 1036 bool ah_combined_mic;
1039 1037
1038 enum ath5k_version ah_version;
1039 enum ath5k_radio ah_radio;
1040 u32 ah_phy;
1040 u32 ah_mac_srev; 1041 u32 ah_mac_srev;
1041 u16 ah_mac_version; 1042 u16 ah_mac_version;
1042 u16 ah_mac_revision; 1043 u16 ah_mac_revision;
@@ -1044,13 +1045,6 @@ struct ath5k_hw {
1044 u16 ah_radio_5ghz_revision; 1045 u16 ah_radio_5ghz_revision;
1045 u16 ah_radio_2ghz_revision; 1046 u16 ah_radio_2ghz_revision;
1046 1047
1047 enum ath5k_version ah_version;
1048 enum ath5k_radio ah_radio;
1049 u32 ah_phy;
1050
1051 bool ah_5ghz;
1052 bool ah_2ghz;
1053
1054#define ah_modes ah_capabilities.cap_mode 1048#define ah_modes ah_capabilities.cap_mode
1055#define ah_ee_version ah_capabilities.cap_eeprom.ee_version 1049#define ah_ee_version ah_capabilities.cap_eeprom.ee_version
1056 1050
@@ -1058,7 +1052,6 @@ struct ath5k_hw {
1058 u32 ah_aifs; 1052 u32 ah_aifs;
1059 u32 ah_cw_min; 1053 u32 ah_cw_min;
1060 u32 ah_cw_max; 1054 u32 ah_cw_max;
1061 bool ah_software_retry;
1062 u32 ah_limit_tx_retries; 1055 u32 ah_limit_tx_retries;
1063 1056
1064 /* Antenna Control */ 1057 /* Antenna Control */
@@ -1066,6 +1059,7 @@ struct ath5k_hw {
1066 u8 ah_ant_mode; 1059 u8 ah_ant_mode;
1067 u8 ah_tx_ant; 1060 u8 ah_tx_ant;
1068 u8 ah_def_ant; 1061 u8 ah_def_ant;
1062 bool ah_software_retry;
1069 1063
1070 u8 ah_sta_id[ETH_ALEN]; 1064 u8 ah_sta_id[ETH_ALEN];
1071 1065
@@ -1075,7 +1069,6 @@ struct ath5k_hw {
1075 u8 ah_bssid[ETH_ALEN]; 1069 u8 ah_bssid[ETH_ALEN];
1076 u8 ah_bssid_mask[ETH_ALEN]; 1070 u8 ah_bssid_mask[ETH_ALEN];
1077 1071
1078 u32 ah_gpio[AR5K_MAX_GPIO];
1079 int ah_gpio_npins; 1072 int ah_gpio_npins;
1080 1073
1081 struct ath_regulatory ah_regulatory; 1074 struct ath_regulatory ah_regulatory;
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index a876ca8d69e..2075ba99396 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1085,8 +1085,7 @@ int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel)
1085 AR5K_PHY_CCKTXCTL_WORLD); 1085 AR5K_PHY_CCKTXCTL_WORLD);
1086 } 1086 }
1087 1087
1088 ah->ah_current_channel.center_freq = channel->center_freq; 1088 ah->ah_current_channel = channel;
1089 ah->ah_current_channel.hw_value = channel->hw_value;
1090 ah->ah_turbo = channel->hw_value == CHANNEL_T ? true : false; 1089 ah->ah_turbo = channel->hw_value == CHANNEL_T ? true : false;
1091 1090
1092 return 0; 1091 return 0;
@@ -1731,7 +1730,7 @@ ath5k_hw_set_fast_div(struct ath5k_hw *ah, u8 ee_mode, bool enable)
1731void 1730void
1732ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode) 1731ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode)
1733{ 1732{
1734 struct ieee80211_channel *channel = &ah->ah_current_channel; 1733 struct ieee80211_channel *channel = ah->ah_current_channel;
1735 bool use_def_for_tx, update_def_on_tx, use_def_for_rts, fast_div; 1734 bool use_def_for_tx, update_def_on_tx, use_def_for_rts, fast_div;
1736 bool use_def_for_sg; 1735 bool use_def_for_sg;
1737 u8 def_ant, tx_ant, ee_mode; 1736 u8 def_ant, tx_ant, ee_mode;
@@ -3011,7 +3010,7 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3011int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower) 3010int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 txpower)
3012{ 3011{
3013 /*Just a try M.F.*/ 3012 /*Just a try M.F.*/
3014 struct ieee80211_channel *channel = &ah->ah_current_channel; 3013 struct ieee80211_channel *channel = ah->ah_current_channel;
3015 u8 ee_mode; 3014 u8 ee_mode;
3016 3015
3017 ATH5K_TRACE(ah->ah_sc); 3016 ATH5K_TRACE(ah->ah_sc);
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index bd0a97a38d3..86733fdb477 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -290,7 +290,6 @@ int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode,
290 } 290 }
291 291
292commit: 292commit:
293 ah->ah_power_mode = mode;
294 ath5k_hw_reg_write(ah, staid, AR5K_STA_ID1); 293 ath5k_hw_reg_write(ah, staid, AR5K_STA_ID1);
295 294
296 return 0; 295 return 0;