Przeglądaj źródła

qcacld-3.0: Don't allow SR command for NON-SR AP

Don't allow SR (Spatial Reuse) command for NON-SR AP
i.e if NON-SRG disallowed and SRG info is not advertised
by connected AP.

Change-Id: Ida0ff3945adf1256f45f72af97a724bd0b91a96a
CRs-Fixed: 3336945
Sheenam Monga 2 lat temu
rodzic
commit
528c16e5fa
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      core/hdd/src/wlan_hdd_he.c

+ 3 - 2
core/hdd/src/wlan_hdd_he.c

@@ -617,8 +617,9 @@ static int __wlan_hdd_cfg80211_sr_operations(struct wiphy *wiphy,
 	sr_ctrl = wlan_vdev_mlme_get_sr_ctrl(adapter->vdev);
 	if ((adapter->device_mode == QDF_STA_MODE) &&
 	    (!ucfg_cm_is_vdev_connected(adapter->vdev) ||
-	     !(sr_ctrl && ((sr_ctrl & NON_SRG_PD_SR_DISALLOWED) ||
-	     !(sr_ctrl & SRG_INFO_PRESENT))))) {
+	     !sr_ctrl ||
+	    ((sr_ctrl & NON_SRG_PD_SR_DISALLOWED) &&
+	    !(sr_ctrl & SRG_INFO_PRESENT)))) {
 		hdd_err("station is not connected to AP that supports SR");
 		return -EPERM;
 	}