mac80211: update to version 5.4-rc8
This updates mac80211 to backports based on kernel 5.4-rc8. The deleted patches were applied upstream. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
@@ -1,118 +0,0 @@
|
||||
From dc0c18ed229cdcca283dd78fefa38273ec37a42c Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Komisar <aaron.komisar@tandemg.com>
|
||||
Date: Wed, 2 Oct 2019 13:59:07 +0000
|
||||
Subject: mac80211: fix scan when operating on DFS channels in ETSI domains
|
||||
|
||||
In non-ETSI regulatory domains scan is blocked when operating channel
|
||||
is a DFS channel. For ETSI, however, once DFS channel is marked as
|
||||
available after the CAC, this channel will remain available (for some
|
||||
time) even after leaving this channel.
|
||||
|
||||
Therefore a scan can be done without any impact on the availability
|
||||
of the DFS channel as no new CAC is required after the scan.
|
||||
|
||||
Enable scan in mac80211 in these cases.
|
||||
|
||||
Signed-off-by: Aaron Komisar <aaron.komisar@tandemg.com>
|
||||
Link: https://lore.kernel.org/r/1570024728-17284-1-git-send-email-aaron.komisar@tandemg.com
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
include/net/cfg80211.h | 8 ++++++++
|
||||
net/mac80211/scan.c | 30 ++++++++++++++++++++++++++++--
|
||||
net/wireless/reg.c | 1 +
|
||||
net/wireless/reg.h | 8 --------
|
||||
4 files changed, 37 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -5554,6 +5554,14 @@ const struct ieee80211_reg_rule *freq_re
|
||||
const char *reg_initiator_name(enum nl80211_reg_initiator initiator);
|
||||
|
||||
/**
|
||||
+ * regulatory_pre_cac_allowed - check if pre-CAC allowed in the current regdom
|
||||
+ * @wiphy: wiphy for which pre-CAC capability is checked.
|
||||
+ *
|
||||
+ * Pre-CAC is allowed only in some regdomains (notable ETSI).
|
||||
+ */
|
||||
+bool regulatory_pre_cac_allowed(struct wiphy *wiphy);
|
||||
+
|
||||
+/**
|
||||
* DOC: Internal regulatory db functions
|
||||
*
|
||||
*/
|
||||
--- a/net/mac80211/scan.c
|
||||
+++ b/net/mac80211/scan.c
|
||||
@@ -520,10 +520,33 @@ static int ieee80211_start_sw_scan(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static bool __ieee80211_can_leave_ch(struct ieee80211_sub_if_data *sdata)
|
||||
+{
|
||||
+ struct ieee80211_local *local = sdata->local;
|
||||
+ struct ieee80211_sub_if_data *sdata_iter;
|
||||
+
|
||||
+ if (!ieee80211_is_radar_required(local))
|
||||
+ return true;
|
||||
+
|
||||
+ if (!regulatory_pre_cac_allowed(local->hw.wiphy))
|
||||
+ return false;
|
||||
+
|
||||
+ mutex_lock(&local->iflist_mtx);
|
||||
+ list_for_each_entry(sdata_iter, &local->interfaces, list) {
|
||||
+ if (sdata_iter->wdev.cac_started) {
|
||||
+ mutex_unlock(&local->iflist_mtx);
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ mutex_unlock(&local->iflist_mtx);
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static bool ieee80211_can_scan(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata)
|
||||
{
|
||||
- if (ieee80211_is_radar_required(local))
|
||||
+ if (!__ieee80211_can_leave_ch(sdata))
|
||||
return false;
|
||||
|
||||
if (!list_empty(&local->roc_list))
|
||||
@@ -630,7 +653,10 @@ static int __ieee80211_start_scan(struct
|
||||
|
||||
lockdep_assert_held(&local->mtx);
|
||||
|
||||
- if (local->scan_req || ieee80211_is_radar_required(local))
|
||||
+ if (local->scan_req)
|
||||
+ return -EBUSY;
|
||||
+
|
||||
+ if (!__ieee80211_can_leave_ch(sdata))
|
||||
return -EBUSY;
|
||||
|
||||
if (!ieee80211_can_scan(local, sdata)) {
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -3883,6 +3883,7 @@ bool regulatory_pre_cac_allowed(struct w
|
||||
|
||||
return pre_cac_allowed;
|
||||
}
|
||||
+EXPORT_SYMBOL(regulatory_pre_cac_allowed);
|
||||
|
||||
void regulatory_propagate_dfs_state(struct wiphy *wiphy,
|
||||
struct cfg80211_chan_def *chandef,
|
||||
--- a/net/wireless/reg.h
|
||||
+++ b/net/wireless/reg.h
|
||||
@@ -156,14 +156,6 @@ bool regulatory_indoor_allowed(void);
|
||||
#define REG_PRE_CAC_EXPIRY_GRACE_MS 2000
|
||||
|
||||
/**
|
||||
- * regulatory_pre_cac_allowed - if pre-CAC allowed in the current dfs domain
|
||||
- * @wiphy: wiphy for which pre-CAC capability is checked.
|
||||
-
|
||||
- * Pre-CAC is allowed only in ETSI domain.
|
||||
- */
|
||||
-bool regulatory_pre_cac_allowed(struct wiphy *wiphy);
|
||||
-
|
||||
-/**
|
||||
* regulatory_propagate_dfs_state - Propagate DFS channel state to other wiphys
|
||||
* @wiphy - wiphy on which radar is detected and the event will be propagated
|
||||
* to other available wiphys having the same DFS domain
|
||||
@@ -1,39 +0,0 @@
|
||||
From 95697f9907bfe3eab0ef20265a766b22e27dde64 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Fri, 4 Oct 2019 15:37:05 +0300
|
||||
Subject: [PATCH] mac80211: accept deauth frames in IBSS mode
|
||||
|
||||
We can process deauth frames and all, but we drop them very
|
||||
early in the RX path today - this could never have worked.
|
||||
|
||||
Fixes: 2cc59e784b54 ("mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSS")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
|
||||
Link: https://lore.kernel.org/r/20191004123706.15768-2-luca@coelho.fi
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
net/mac80211/rx.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -3467,9 +3467,18 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
|
||||
case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP):
|
||||
/* process for all: mesh, mlme, ibss */
|
||||
break;
|
||||
+ case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
|
||||
+ if (is_multicast_ether_addr(mgmt->da) &&
|
||||
+ !is_broadcast_ether_addr(mgmt->da))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
+ /* process only for station/IBSS */
|
||||
+ if (sdata->vif.type != NL80211_IFTYPE_STATION &&
|
||||
+ sdata->vif.type != NL80211_IFTYPE_ADHOC)
|
||||
+ return RX_DROP_MONITOR;
|
||||
+ break;
|
||||
case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP):
|
||||
case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP):
|
||||
- case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
|
||||
case cpu_to_le16(IEEE80211_STYPE_DISASSOC):
|
||||
if (is_multicast_ether_addr(mgmt->da) &&
|
||||
!is_broadcast_ether_addr(mgmt->da))
|
||||
Reference in New Issue
Block a user