소스 검색

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 년 전
부모
커밋
75d246bd84
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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;