diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 40 | 
1 files changed, 31 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 0ba81a66061..8c4c040a47b 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -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++; @@ -1045,11 +1048,11 @@ ath5k_drain_tx_buffs(struct ath5k_hw *ah)  				ath5k_txbuf_free_skb(ah, bf); -				spin_lock_bh(&ah->txbuflock); +				spin_lock(&ah->txbuflock);  				list_move_tail(&bf->list, &ah->txbuf);  				ah->txbuf_len++;  				txq->txq_len--; -				spin_unlock_bh(&ah->txbuflock); +				spin_unlock(&ah->txbuflock);  			}  			txq->link = NULL;  			txq->txq_poll_mark = false; @@ -2415,6 +2418,22 @@ ath5k_tx_complete_poll_work(struct work_struct *work)  * Initialization routines *  \*************************/ +static const struct ieee80211_iface_limit if_limits[] = { +	{ .max = 2048,	.types = BIT(NL80211_IFTYPE_STATION) }, +	{ .max = 4,	.types = +#ifdef CONFIG_MAC80211_MESH +				 BIT(NL80211_IFTYPE_MESH_POINT) | +#endif +				 BIT(NL80211_IFTYPE_AP) }, +}; + +static const struct ieee80211_iface_combination if_comb = { +	.limits = if_limits, +	.n_limits = ARRAY_SIZE(if_limits), +	.max_interfaces = 2048, +	.num_different_channels = 1, +}; +  int __devinit  ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)  { @@ -2436,6 +2455,9 @@ ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)  		BIT(NL80211_IFTYPE_ADHOC) |  		BIT(NL80211_IFTYPE_MESH_POINT); +	hw->wiphy->iface_combinations = &if_comb; +	hw->wiphy->n_iface_combinations = 1; +  	/* SW support for IBSS_RSN is provided by mac80211 */  	hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;  |