ソースを参照

qcacld-3.0: Don't allow SR operation in disconnected state

Currently, SR enable can be set even if sta is not connected
to AP due to which success is returned to userspace but command
is not sent to FW.
Fix is to not to entertain any SR operation if station is not
connected or connected AP is not supporting SR.

Change-Id: Ie46e5f4db12a1ecf8eea44847a97355f26163ed8
CRs-Fixed: 3321577
Sheenam Monga 2 年 前
コミット
26ee5aa617
1 ファイル変更10 行追加0 行削除
  1. 10 0
      core/hdd/src/wlan_hdd_he.c

+ 10 - 0
core/hdd/src/wlan_hdd_he.c

@@ -610,6 +610,16 @@ static int __wlan_hdd_cfg80211_sr_operations(struct wiphy *wiphy,
 		hdd_err("Command not allowed in FTM or Monitor mode");
 		return -EPERM;
 	}
+
+	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))))) {
+		hdd_err("station is not connected to AP that supports SR");
+		return -EPERM;
+	}
+
 	/**
 	 * Reject command if SR concurrency is not allowed and
 	 * only STA mode is set in ini to enable SR.