summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/common.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-10-11 23:30:57 +0200
committerJohn W. Linville <linville@tuxdriver.com>2013-10-14 13:39:59 -0400
commit2297f1c7beec785e437da3da0157666bca525c99 (patch)
tree1c6e13d2725f847fda293d2887a0c7f3befdbf35 /drivers/net/wireless/ath/ath9k/common.c
parent6b21fd2027f8deb6fb7d3283b4c2eacabc8eeb95 (diff)
downloadlinux-2297f1c7beec785e437da3da0157666bca525c99.tar.gz
linux-2297f1c7beec785e437da3da0157666bca525c99.tar.bz2
linux-2297f1c7beec785e437da3da0157666bca525c99.zip
ath9k: make ath9k_cmn_update_ichannel static
Rework its wrapper function to make it more generic, using it as a replacement for previous calls to ath9k_cmn_update_ichannel. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/common.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c
index b5ac26994f19..a7e5a05b2eff 100644
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -52,8 +52,8 @@ EXPORT_SYMBOL(ath9k_cmn_get_hw_crypto_keytype);
/*
* Update internal channel flags.
*/
-void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
- struct cfg80211_chan_def *chandef)
+static void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
+ struct cfg80211_chan_def *chandef)
{
struct ieee80211_channel *chan = chandef->chan;
u16 flags = 0;
@@ -88,25 +88,25 @@ void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan,
ichan->channelFlags = flags;
}
-EXPORT_SYMBOL(ath9k_cmn_update_ichannel);
/*
* Get the internal channel reference.
*/
-struct ath9k_channel *ath9k_cmn_get_curchannel(struct ieee80211_hw *hw,
- struct ath_hw *ah)
+struct ath9k_channel *ath9k_cmn_get_channel(struct ieee80211_hw *hw,
+ struct ath_hw *ah,
+ struct cfg80211_chan_def *chandef)
{
- struct ieee80211_channel *curchan = hw->conf.chandef.chan;
+ struct ieee80211_channel *curchan = chandef->chan;
struct ath9k_channel *channel;
u8 chan_idx;
chan_idx = curchan->hw_value;
channel = &ah->channels[chan_idx];
- ath9k_cmn_update_ichannel(channel, &hw->conf.chandef);
+ ath9k_cmn_update_ichannel(channel, chandef);
return channel;
}
-EXPORT_SYMBOL(ath9k_cmn_get_curchannel);
+EXPORT_SYMBOL(ath9k_cmn_get_channel);
int ath9k_cmn_count_streams(unsigned int chainmask, int max)
{