2011/1/19 Bruno Randolf <br1@xxxxxxxxxxx>: > Add the 802.11j (20MHz channel width) channels to the allowed channels. This > still does not enable 802.11j in ath5k since these frequencies are out of the > configured range. A later patch will deal with that. > > Signed-off-by: Bruno Randolf <br1@xxxxxxxxxxx> > --- > Âdrivers/net/wireless/ath/ath5k/base.c | Â 19 +++++++++++++------ > Â1 files changed, 13 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c > index a28ad58..6900543 100644 > --- a/drivers/net/wireless/ath/ath5k/base.c > +++ b/drivers/net/wireless/ath/ath5k/base.c > @@ -244,15 +244,21 @@ static int ath5k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *re > Â/* > Â* Returns true for the channel numbers used without all_channels modparam. > Â*/ > -static bool ath5k_is_standard_channel(short chan) > +static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band) > Â{ > - Â Â Â return ((chan <= 14) || > - Â Â Â Â Â Â Â /* UNII 1,2 */ > - Â Â Â Â Â Â Â ((chan & 3) == 0 && chan >= 36 && chan <= 64) || > + Â Â Â if (band == IEEE80211_BAND_2GHZ && chan <= 14) > + Â Â Â Â Â Â Â return true; > + > + Â Â Â return Â/* UNII 1,2 */ > + Â Â Â Â Â Â Â (((chan & 3) == 0 && chan >= 36 && chan <= 64) || > Â Â Â Â Â Â Â Â/* midband */ > Â Â Â Â Â Â Â Â((chan & 3) == 0 && chan >= 100 && chan <= 140) || > Â Â Â Â Â Â Â Â/* UNII-3 */ > - Â Â Â Â Â Â Â ((chan & 3) == 1 && chan >= 149 && chan <= 165)); > + Â Â Â Â Â Â Â ((chan & 3) == 1 && chan >= 149 && chan <= 165) || > + Â Â Â Â Â Â Â /* 802.11j 5.030-5.080 GHz (20MHz) */ > + Â Â Â Â Â Â Â (chan == 8 || chan == 12 || chan == 16) || > + Â Â Â Â Â Â Â /* 802.11j 4.9GHz (20MHz) */ > + Â Â Â Â Â Â Â (chan == 184 || chan == 188 || chan == 192 || chan == 196)); > Â} > > Âstatic unsigned int > @@ -291,7 +297,8 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels, > Â Â Â Â Â Â Â Âif (!ath5k_channel_ok(ah, freq, chfreq)) > Â Â Â Â Â Â Â Â Â Â Â Âcontinue; > > - Â Â Â Â Â Â Â if (!modparam_all_channels && !ath5k_is_standard_channel(ch)) > + Â Â Â Â Â Â Â if (!modparam_all_channels && > + Â Â Â Â Â Â Â Â Â !ath5k_is_standard_channel(ch, band)) > Â Â Â Â Â Â Â Â Â Â Â Âcontinue; > > Â Â Â Â Â Â Â Â/* Write channel info and increment counter */ > Acked-by: Nick Kossifidis <mickflemm@xxxxxxxxx> -- GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html