nl80211: use ieee80211_band in kernel space
PATCH 1/1 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.
--- include/net/cfg80211.h | 4 ++-- net/wireless/nl80211.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
include/net/cfg80211.h +2 -2
@@ -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; };
net/wireless/nl80211.c +1 -1
@@ -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]; }
Signature · 1 line
1.9.1
Quoted 4 lines · Arend van Spriel
The enumeration
nl80211_bandintends to expose the public part ofieee80211_bandenumeration. As such it should not be used in the kernel. This patch changesnl80211_bandusage toieee80211_band.
Not sure if it is any of the trees already.
Quoted 43 lines
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(-)include/net/cfg80211.h +2
-2@@ -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; };net/wireless/nl80211.c +1
-1@@ -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]; }
Johannes Berg
maintainerQuoted 10 lines · Arend Van Spriel
Quoted 4 lines · Arend van Spriel
The enumeration
nl80211_bandintends to expose the public part ofieee80211_bandenumeration. As such it should not be used in the kernel. This patch changesnl80211_bandusage toieee80211_band.Fixes 59ad2160c285 ("nl80211: add feature for BSS selectionsupport")
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