Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: linux-wireless@vger.kernel.org, mcgrof@do-not-panic.com,
	linville@tuxdriver.com
Subject: Re: [PATCH 1/4] cfg80211: regulatory, introduce DFS CAC time
Date: Fri, 21 Feb 2014 09:52:28 +0100	[thread overview]
Message-ID: <1392972748.4346.37.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1392231266-28479-1-git-send-email-janusz.dziedzic@tieto.com> (sfid-20140212_195443_300379_ECEC4EEB)

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


  parent reply	other threads:[~2014-02-21  8:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 18:54 [PATCH 1/4] cfg80211: regulatory, introduce DFS CAC time Janusz Dziedzic
2014-02-12 18:54 ` [PATCH 2/4] cfg80211: parse DFS CAC time for internal regdb option Janusz Dziedzic
2014-02-12 18:54 ` [PATCH 3/4] cfg80211/mac80211: DFS pass CAC time as a parameter Janusz Dziedzic
2014-02-21  8:53   ` Johannes Berg
2014-02-12 18:54 ` [PATCH 4/4] cfg80211: DFS get CAC time from regulatory Janusz Dziedzic
2014-02-21  8:54   ` Johannes Berg
2014-02-12 18:54 ` [PATCH] wireless-regdb: add DFS CAC time parameter Janusz Dziedzic
2014-02-12 18:54 ` [PATCH] crda: add DFS CAC time support Janusz Dziedzic
2014-02-12 18:54 ` [PATCH] iw: handle DFS CAC time param Janusz Dziedzic
2014-02-19  0:31 ` [PATCH 1/4] cfg80211: regulatory, introduce DFS CAC time Luis R. Rodriguez
2014-02-19 11:03 ` Johannes Berg
2014-02-19 11:27   ` Janusz Dziedzic
2014-02-19 11:28     ` Johannes Berg
2014-02-19 22:11       ` Luis R. Rodriguez
2014-02-20  7:12         ` Janusz Dziedzic
2014-02-22  0:31           ` Luis R. Rodriguez
2014-02-21  8:52 ` Johannes Berg [this message]
2014-02-21  9:47   ` Janusz Dziedzic
2014-02-21  9:55     ` Johannes Berg
2014-02-21 10:09       ` Janusz Dziedzic
2014-02-21 10:11         ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392972748.4346.37.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=janusz.dziedzic@tieto.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@do-not-panic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox