Search Linux Wireless

Re: [PATCH 07/13] cfg80211: only export disable flag on channel disablement

[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 channel is disabled there is no need to stuff it
> with more flags.

> -	u32 flags;
> +	u32 flags, rule_flags;
>  	u32 max_bandwidth = 0;
>  	const struct ieee80211_reg_rule *reg_rule = NULL;
>  	const struct ieee80211_power_rule *power_rule = NULL;
> @@ -913,15 +913,19 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
>  					"Country IE\n",
>  					chan->center_freq, wiphy_name(wiphy));
>  #endif
> -			flags |= IEEE80211_CHAN_DISABLED;
> -			chan->flags = flags;
> +			chan->flags = IEEE80211_CHAN_DISABLED;
>  		}
>  		return;
>  	}
>  
>  	power_rule = &reg_rule->power_rule;
>  
> -	chan->flags = flags | map_regdom_flags(reg_rule->flags);
> +	rule_flags = map_regdom_flags(reg_rule->flags);
> +	if (flags & IEEE80211_CHAN_DISABLED)
> +		chan->flags = IEEE80211_CHAN_DISABLED;
> +	else
> +		chan->flags = flags | rule_flags;

but why bother with more complicated code when adding a few more flags
doesn't hurt?

johannes

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