Browse Source

qcacld-3.0: Extend Link speed for STA/SAP

Previous linkspeed only enabled for P2P mode,
and here extend for STA/SAP mode per request.

Change-Id: I0976ee2e4b064b74cc2532a310f20e0ef1b0e7f6
CRs-Fixed: 3205568
Lin Bai 2 years ago
parent
commit
ab486437db
2 changed files with 6 additions and 4 deletions
  1. 3 2
      core/hdd/src/wlan_hdd_hostapd_wext.c
  2. 3 2
      core/hdd/src/wlan_hdd_stats.c

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

@@ -2478,8 +2478,9 @@ int __iw_get_softap_linkspeed(struct net_device *dev,
 
 	hdd_debug("wrqu->data.length(%d)", wrqu->data.length);
 
-	/* Linkspeed is allowed only for P2P mode */
-	if (adapter->device_mode != QDF_P2P_GO_MODE) {
+	/* Linkspeed is allowed for GO/SAP mode */
+	if (adapter->device_mode != QDF_P2P_GO_MODE &&
+	    adapter->device_mode != QDF_SAP_MODE) {
 		hdd_err("Link Speed is not allowed in Device mode %s(%d)",
 			qdf_opmode_str(adapter->device_mode),
 			adapter->device_mode);

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

@@ -7186,8 +7186,9 @@ int wlan_hdd_get_link_speed(struct hdd_adapter *adapter, uint32_t *link_speed)
 	if (ret)
 		return ret;
 
-	/* Linkspeed is allowed only for P2P mode */
-	if (adapter->device_mode != QDF_P2P_CLIENT_MODE) {
+	/* Linkspeed is allowed for CLIENT/STA mode */
+	if (adapter->device_mode != QDF_P2P_CLIENT_MODE &&
+	    adapter->device_mode != QDF_STA_MODE) {
 		hdd_err("Link Speed is not allowed in Device mode %s(%d)",
 			qdf_opmode_str(adapter->device_mode),
 			adapter->device_mode);