2016-02-25 11:32:27

by Arend van Spriel

[permalink] [raw]
Subject: [PATCH] nl80211: use ieee80211_band in kernel space

The enumeration nl80211_band intends to expose the public part of
ieee80211_band enumeration. As such it should not be used in the
kernel. This patch changes nl80211_band usage to ieee80211_band.

Reported-by: kbuild robot <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
---
include/net/cfg80211.h | 4 ++--
net/wireless/nl80211.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1dfb890..c6ddb69 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1863,7 +1863,7 @@ struct cfg80211_ibss_params {
* @delta: value of RSSI level adjustment.
*/
struct cfg80211_bss_select_adjust {
- enum nl80211_band band;
+ enum ieee80211_band band;
s8 delta;
};

@@ -1878,7 +1878,7 @@ struct cfg80211_bss_select_adjust {
struct cfg80211_bss_selection {
enum nl80211_bss_select_attr behaviour;
union {
- enum nl80211_band band_pref;
+ enum ieee80211_band band_pref;
struct cfg80211_bss_select_adjust adjust;
} param;
};
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 52ce26f..1f6d8e4 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -5786,7 +5786,7 @@ static int validate_scan_freqs(struct nlattr *freqs)
return n_channels;
}

-static bool is_band_valid(struct wiphy *wiphy, enum nl80211_band b)
+static bool is_band_valid(struct wiphy *wiphy, enum ieee80211_band b)
{
return b < IEEE80211_NUM_BANDS && wiphy->bands[b];
}
--
1.9.1



2016-02-25 12:59:15

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH] nl80211: use ieee80211_band in kernel space

On 25-2-2016 12:32, Arend van Spriel wrote:
> The enumeration nl80211_band intends to expose the public part of
> ieee80211_band enumeration. As such it should not be used in the
> kernel. This patch changes nl80211_band usage to ieee80211_band.
>
Fixes: 59ad2160c285 ("nl80211: add feature for BSS selection support")

Not sure if it is any of the trees already.

> Reported-by: kbuild robot <[email protected]>
> Signed-off-by: Arend van Spriel <[email protected]>
> ---
> include/net/cfg80211.h | 4 ++--
> net/wireless/nl80211.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index 1dfb890..c6ddb69 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -1863,7 +1863,7 @@ struct cfg80211_ibss_params {
> * @delta: value of RSSI level adjustment.
> */
> struct cfg80211_bss_select_adjust {
> - enum nl80211_band band;
> + enum ieee80211_band band;
> s8 delta;
> };
>
> @@ -1878,7 +1878,7 @@ struct cfg80211_bss_select_adjust {
> struct cfg80211_bss_selection {
> enum nl80211_bss_select_attr behaviour;
> union {
> - enum nl80211_band band_pref;
> + enum ieee80211_band band_pref;
> struct cfg80211_bss_select_adjust adjust;
> } param;
> };
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 52ce26f..1f6d8e4 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -5786,7 +5786,7 @@ static int validate_scan_freqs(struct nlattr *freqs)
> return n_channels;
> }
>
> -static bool is_band_valid(struct wiphy *wiphy, enum nl80211_band b)
> +static bool is_band_valid(struct wiphy *wiphy, enum ieee80211_band b)
> {
> return b < IEEE80211_NUM_BANDS && wiphy->bands[b];
> }
>

2016-03-03 15:03:24

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] nl80211: use ieee80211_band in kernel space

On Thu, 2016-02-25 at 13:59 +0100, Arend Van Spriel wrote:
> On 25-2-2016 12:32, Arend van Spriel wrote:
> > The enumeration nl80211_band intends to expose the public part of
> > ieee80211_band enumeration. As such it should not be used in the
> > kernel. This patch changes nl80211_band usage to ieee80211_band.
> >
> Fixes: 59ad2160c285 ("nl80211: add feature for BSS selection
> support")
>
> Not sure if it is any of the trees already.
>

I'm tempted to just get rid of ieee80211_band and move the NUM thing to
nl80211.h.

Thoughts?

johannes