From 0628e831520aa2e57aed02aee4a1772b40ce4f9d Mon Sep 17 00:00:00 2001 From: Nagarajan Maran Date: Thu, 30 Jun 2022 17:20:29 +0530 Subject: [PATCH] mac80211: fix dynamic vlan warning with monitor interface restart When monitor interface restarts, in nss offload disabled case, the encap and decap offload flags are removed from all the interfaces in that phy#. However when dynamic VLAN and monitor interfaces are created in the same phy#, these flags are not updated correctly, due to which warning calltrace is observed. Add condition check to update the correct flags in dynamic VLAN case. Signed-off-by: Nagarajan Maran --- net/mac80211/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -1011,7 +1011,8 @@ static bool ieee80211_set_sdata_offload_ flags |= IEEE80211_OFFLOAD_DECAP_ENABLED; if (local->monitors && - !ieee80211_hw_check(&local->hw, SUPPORTS_CONC_MON_RX_DECAP)) + (!ieee80211_hw_check(&local->hw, SUPPORTS_NSS_OFFLOAD) || + !ieee80211_hw_check(&local->hw, SUPPORTS_CONC_MON_RX_DECAP))) flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED; } else { flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED;