Skip to contentSkip to conversation

nl80211: use ieee80211_band in kernel space

PATCH In review Arend van Spriel 3 participants 3 messages Feb 25, 2016 – Mar 3, 2016 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

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
index 1dfb890..c6ddb69 100644
@@ -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
index 52ce26f..1f6d8e4 100644
@@ -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
#1 lore raw
Quoted 4 lines · Arend van Spriel

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.

Quoted 43 lines
---
 include/net/cfg80211.h | 4 ++--
 net/wireless/nl80211.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
include/net/cfg80211.h +2 -2
index 1dfb890..c6ddb69 100644
@@ -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
index 52ce26f..1f6d8e4 100644
@@ -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];
 }
maintainer
#2 lore raw
Quoted 10 lines · Arend Van Spriel
Quoted 4 lines · Arend van Spriel

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