Search Linux Wireless

Re: [PATCH 1/4] cfg80211: regulatory, introduce DFS CAC time

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

 



On Wed, 2014-02-12 at 19:54 +0100, Janusz Dziedzic wrote:

> +++ b/include/net/regulatory.h
> @@ -155,6 +155,7 @@ struct ieee80211_reg_rule {
>  	struct ieee80211_freq_range freq_range;
>  	struct ieee80211_power_rule power_rule;
>  	u32 flags;
> +	u32 dfs_cac_ms;
>  };

Does that really have to be per channel? That's a significant investment
into bss size since we have a lot of channel structs.

> +	if (rule1->dfs_cac_ms > rule2->dfs_cac_ms)
> +		intersected_rule->dfs_cac_ms = rule1->dfs_cac_ms;
> +	else
> +		intersected_rule->dfs_cac_ms = rule2->dfs_cac_ms;

please just use max() or max_t() if needed (shouldn't be)

> @@ -2245,9 +2258,10 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
>  	const struct ieee80211_reg_rule *reg_rule = NULL;
>  	const struct ieee80211_freq_range *freq_range = NULL;
>  	const struct ieee80211_power_rule *power_rule = NULL;
> -	char bw[32];
> +	const int size = 32;
> +	char bw[size], cac_time[size];

I don't like that, size is const but it seems likely that sparse/smatch
may complain. I've already changed some of the below code to just use
sizeof(bw), please do that here as well.

johannes

--
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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux