Search Linux Wireless

[PATCH v2] wifi: mac80211: fix decapsulation offload flag for WDS interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rx decapsulation offload cannot be enabled on WDS interface since its
offload_flags is not configured. Its offload_flags shall be configured
by checking hardware information.

Signed-off-by: Howard Hsu <howard-yh.hsu@xxxxxxxxxxxx>
---
v2:
   - Configure offload_flags in ieee80211_check_fast_rx
   - Update commit message
---
 net/mac80211/rx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index a57811372027..0d8cfe34b088 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -4433,6 +4433,16 @@ void ieee80211_check_fast_rx(struct sta_info *sta)
 	if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED))
 		goto clear;
 
+	if (ieee80211_hw_check(&local->hw, SUPPORTS_RX_DECAP_OFFLOAD)) {
+		sdata->vif.offload_flags |= IEEE80211_OFFLOAD_DECAP_ENABLED;
+
+		if (local->monitors &&
+		    !ieee80211_hw_check(&local->hw, SUPPORTS_CONC_MON_RX_DECAP))
+			sdata->vif.offload_flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED;
+	} else {
+		sdata->vif.offload_flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED;
+	}
+
 	rcu_read_lock();
 	key = rcu_dereference(sta->ptk[sta->ptk_idx]);
 	if (!key)
-- 
2.18.0




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux