Skip to content

Commit

Permalink
mac80211: fix HE issues with AP_VLAN interfaces
Browse files Browse the repository at this point in the history
Fixes issues with aggregation

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Jun 23, 2023
1 parent 45176e8 commit 9219b06
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From: Felix Fietkau <[email protected]>
Date: Thu, 22 Jun 2023 18:02:25 +0200
Subject: [PATCH] mac80211: fix sband iftype data lookup for AP_VLAN

AP_VLAN interfaces are virtual, so doesn't really exist as a type for
capabilities. When passed in as a type, AP is the one that's really intended.

Fixes: c4cbaf7973a7 ("cfg80211: Add support for HE")
Signed-off-by: Felix Fietkau <[email protected]>
---

--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -567,6 +567,9 @@ ieee80211_get_sband_iftype_data(const st
if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
return NULL;

+ if (iftype == NL80211_IFTYPE_AP_VLAN)
+ iftype = NL80211_IFTYPE_AP;
+
for (i = 0; i < sband->n_iftype_data; i++) {
const struct ieee80211_sband_iftype_data *data =
&sband->iftype_data[i];
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -567,6 +567,9 @@ ieee80211_get_sband_iftype_data(const st
if (WARN_ON(iftype >= NL80211_IFTYPE_MAX))
return NULL;

+ if (iftype == NL80211_IFTYPE_AP_VLAN)
+ iftype = NL80211_IFTYPE_AP;
+
for (i = 0; i < sband->n_iftype_data; i++) {
const struct ieee80211_sband_iftype_data *data =
&sband->iftype_data[i];
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4081,6 +4081,7 @@ struct mgmt_frame_regs {
@@ -4087,6 +4087,7 @@ struct mgmt_frame_regs {
* (as advertised by the nl80211 feature flag.)
* @get_tx_power: store the current TX power into the dbm variable;
* return 0 if successful
+ * @set_antenna_gain: set antenna gain to reduce maximum tx power if necessary
*
* @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
* functions to adjust rfkill hw state
@@ -4431,6 +4432,7 @@ struct cfg80211_ops {
@@ -4437,6 +4438,7 @@ struct cfg80211_ops {
enum nl80211_tx_power_setting type, int mbm);
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int *dbm);
Expand Down

0 comments on commit 9219b06

Please sign in to comment.