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 7 years ago
parent
commit
75d246bd84
1 changed files with 6 additions and 0 deletions
  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;