ath5k: replace modparam_all_channels with CONFIG_ATH5K_TEST_CHANNELS
This stashes away this feature from standard kernel builds. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Esse commit está contido em:

commit de
John W. Linville

pai
ce8126c334
commit
2f8684ce7a
@@ -74,10 +74,6 @@ bool ath5k_modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, ath5k_modparam_nohwcrypt, bool, S_IRUGO);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
static bool modparam_all_channels;
|
||||
module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO);
|
||||
MODULE_PARM_DESC(all_channels, "Expose all channels the device can use.");
|
||||
|
||||
static bool modparam_fastchanswitch;
|
||||
module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO);
|
||||
MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");
|
||||
@@ -258,8 +254,15 @@ static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *re
|
||||
\********************/
|
||||
|
||||
/*
|
||||
* Returns true for the channel numbers used without all_channels modparam.
|
||||
* Returns true for the channel numbers used.
|
||||
*/
|
||||
#ifdef CONFIG_ATH5K_TEST_CHANNELS
|
||||
static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
|
||||
{
|
||||
if (band == IEEE80211_BAND_2GHZ && chan <= 14)
|
||||
@@ -276,6 +279,7 @@ static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
|
||||
/* 802.11j 4.9GHz (20MHz) */
|
||||
(chan == 184 || chan == 188 || chan == 192 || chan == 196));
|
||||
}
|
||||
#endif
|
||||
|
||||
static unsigned int
|
||||
ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
|
||||
@@ -316,8 +320,7 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
|
||||
if (!ath5k_channel_ok(ah, &channels[count]))
|
||||
continue;
|
||||
|
||||
if (!modparam_all_channels &&
|
||||
!ath5k_is_standard_channel(ch, band))
|
||||
if (!ath5k_is_standard_channel(ch, band))
|
||||
continue;
|
||||
|
||||
count++;
|
||||
|
Referência em uma nova issue
Block a user