Browse Source

qcacld-3.0: Reject set packet filter params for invalid device mode

Packet filter params is supported only for Station mode presently,
configuring the filter for other modes results in failure in fw.
To mitigate the issue reject the packet filter for other modes than
Station mode.

CRs-Fixed: 2029356
Change-Id: Ic2c1786dcf8d8980a104af2ee6916489dd2ec423
Arun Khandavalli 8 năm trước cách đây
mục cha
commit
75d246bd84
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      core/hdd/src/wlan_hdd_wext.c

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

@@ -12122,6 +12122,12 @@ static int __iw_set_packet_filter_params(struct net_device *dev,
 		return -EINVAL;
 	}
 
+	if (adapter->device_mode != QDF_STA_MODE) {
+		hdd_err("Packet filter not supported for this mode :%d",
+			adapter->device_mode);
+		return -ENOTSUPP;
+	}
+
 	if (!hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(adapter))) {
 		hdd_err("Packet filter not supported in disconnected state");
 		return -ENOTSUPP;