aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/common.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c
index 905f1b313961..344fdde1d7a3 100644
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -27,20 +27,6 @@ MODULE_AUTHOR("Atheros Communications");
27MODULE_DESCRIPTION("Shared library for Atheros wireless 802.11n LAN cards."); 27MODULE_DESCRIPTION("Shared library for Atheros wireless 802.11n LAN cards.");
28MODULE_LICENSE("Dual BSD/GPL"); 28MODULE_LICENSE("Dual BSD/GPL");
29 29
30int ath9k_cmn_padpos(__le16 frame_control)
31{
32 int padpos = 24;
33 if (ieee80211_has_a4(frame_control)) {
34 padpos += ETH_ALEN;
35 }
36 if (ieee80211_is_data_qos(frame_control)) {
37 padpos += IEEE80211_QOS_CTL_LEN;
38 }
39
40 return padpos;
41}
42EXPORT_SYMBOL(ath9k_cmn_padpos);
43
44int ath9k_cmn_get_hw_crypto_keytype(struct sk_buff *skb) 30int ath9k_cmn_get_hw_crypto_keytype(struct sk_buff *skb)
45{ 31{
46 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 32 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -133,13 +119,14 @@ EXPORT_SYMBOL(ath9k_cmn_update_ichannel);
133struct ath9k_channel *ath9k_cmn_get_curchannel(struct ieee80211_hw *hw, 119struct ath9k_channel *ath9k_cmn_get_curchannel(struct ieee80211_hw *hw,
134 struct ath_hw *ah) 120 struct ath_hw *ah)
135{ 121{
136 struct ieee80211_channel *curchan = hw->conf.channel; 122 struct ieee80211_channel *curchan = hw->conf.chandef.chan;
137 struct ath9k_channel *channel; 123 struct ath9k_channel *channel;
138 u8 chan_idx; 124 u8 chan_idx;
139 125
140 chan_idx = curchan->hw_value; 126 chan_idx = curchan->hw_value;
141 channel = &ah->channels[chan_idx]; 127 channel = &ah->channels[chan_idx];
142 ath9k_cmn_update_ichannel(channel, curchan, hw->conf.channel_type); 128 ath9k_cmn_update_ichannel(channel, curchan,
129 cfg80211_get_chandef_type(&hw->conf.chandef));
143 130
144 return channel; 131 return channel;
145} 132}