瀏覽代碼

qcacld-3.0: Add sta connection check in NUD stats

Add check for sta connection during NUD stats request because FW may
assert if NUD stats request is sent to FW when the station is disconnected.

Change-Id: I0521356f677154cd5f4f0ae08b5fcfec2e9cef56
CRs-Fixed: 2610267
Alan Chen 5 年之前
父節點
當前提交
7890bebcbc
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 6 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -12830,6 +12830,7 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy,
 	struct nlattr *tb[STATS_SET_MAX + 1];
 	struct net_device   *dev = wdev->netdev;
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
+	struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
 	struct set_arp_stats_params arp_stats_params = {0};
 	int err = 0;
@@ -12856,6 +12857,11 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
+	if (eConnectionState_Associated != sta_ctx->conn_info.conn_state) {
+		hdd_debug("Not Associated");
+		return 0;
+	}
+
 	err = wlan_cfg80211_nla_parse(tb, STATS_SET_MAX, data, data_len,
 				      qca_wlan_vendor_set_nud_stats);
 	if (err) {