ath10k: fix monitor vdev for receiving other bss frames
authorManoharan, Rajkumar <rmanohar@qca.qualcomm.com>
Wed, 23 Nov 2016 14:58:11 +0000 (16:58 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 23 Nov 2016 19:41:37 +0000 (21:41 +0200)
In order to receive other BSS entries in mesh mode, Monitor vdev
is created whenever filter flag is set with OTHER_BSS. Recently
it is root caused that setting promisc filter for Mesh interface
is causing performance and stability issues. To fix this issue,
firmware will configure appropriate rxfilters by default for mesh
vdev during vdev creation. This change fixes monitor vdev creation
based on firmware IE

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/mac.c

index 7005e2a9872676b1c77433ae489fb9bd64b763d8..b796be1d631823dd7875d486db119df2cfc5abc4 100644 (file)
@@ -326,6 +326,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
        [ATH10K_FW_FEATURE_PEER_FLOW_CONTROL] = "peer-flow-ctrl",
        [ATH10K_FW_FEATURE_BTCOEX_PARAM] = "btcoex-param",
        [ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR] = "skip-null-func-war",
+       [ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST] = "allows-mesh-bcast",
 };
 
 static unsigned int ath10k_core_get_fw_feature_str(char *buf,
index 6f2608a501e22295903ec6549e351f4fc26708cf..6d06ec5cd087fcfc6f928c2689043263f61b8c2a 100644 (file)
@@ -562,6 +562,13 @@ enum ath10k_fw_features {
         */
        ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR = 15,
 
+       /* Firmware allow other BSS mesh broadcast/multicast frames without
+        * creating monitor interface. Appropriate rxfilters are programmed for
+        * mesh vdev by firmware itself. This feature flags will be used for
+        * not creating monitor vdev while configuring mesh node.
+        */
+       ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST = 16,
+
        /* keep last */
        ATH10K_FW_FEATURE_COUNT,
 };
index 3918097ee46fa278b0de7742a28f63bd79daaebf..d06a12d548fde97e77b34bb3a0eff7ffb60ce818 100644 (file)
@@ -1167,7 +1167,9 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar)
                return false;
 
        return ar->monitor ||
-              ar->filter_flags & FIF_OTHER_BSS ||
+              (!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST,
+                         ar->running_fw->fw_file.fw_features) &&
+               (ar->filter_flags & FIF_OTHER_BSS)) ||
               test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags);
 }