Search Linux Wireless

Re: [PATCH 08/13] cfg80211: save original values on regulatory hints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-01-15 at 16:12 -0800, Luis R. Rodriguez wrote:
> When a driver issues a regulatory_hint() lets save the received
> values as original channel settings. This allows users to change
> regulatory domains multiple times while always respecting the driver's
> own regulatory setings.

This definitely isn't the right way to do things here. This means that
my card that's programmed to US can never do channel 13 here, something
which on b43 we definitely want to allow.

> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
> ---
>  net/wireless/reg.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index 499bbbe..f0ad937 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -914,6 +914,9 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
>  					chan->center_freq, wiphy_name(wiphy));
>  #endif
>  			chan->flags = IEEE80211_CHAN_DISABLED;
> +			if (last_request->initiator == REGDOM_SET_BY_DRIVER &&
> +			    last_request->wiphy && last_request->wiphy == wiphy)
> +				chan->orig_flags = chan->flags;
>  		}
>  		return;
>  	}
> @@ -934,6 +937,13 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
>  			(int) MBM_TO_DBM(power_rule->max_eirp));
>  	else
>  		chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp);
> +
> +	if (last_request->initiator == REGDOM_SET_BY_DRIVER &&
> +	    last_request->wiphy && last_request->wiphy == wiphy) {
> +		chan->orig_flags = chan->flags;
> +		chan->orig_mag = chan->max_antenna_gain;
> +		chan->orig_mpwr = chan->max_power;
> +	}
>  }
>  
>  static void handle_channel_custom(struct wiphy *wiphy,

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux