diff options
| author | Manikandaraja Venkatachalapathy <vmanikan@qca.qualcomm.com> | 2014-06-13 18:04:34 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-06-17 20:00:12 -0700 |
| commit | a78dbda76c9277bf171cda59173bb6be9fa72740 (patch) | |
| tree | 3699ce31edb7f3290a6b62a751f2789b9b38e9ca | |
| parent | 98ec4609f8644a07a48a3d8b6a088555d1582bd8 (diff) | |
qcacld: Fix hybrid session case for linkspeed estimation.
The miracast session does not pass peermac in non wfd client cases.
Retrieve peermac from first connected client for softap mode.
Change-Id: Iadcb6b7c04321880f73638206ae3d254f247d2e3
CRs-Fixed: 680300
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_hostapd.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index 018ed0f129df..46d068987982 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -4262,7 +4262,7 @@ int iw_get_softap_linkspeed(struct net_device *dev, int len = sizeof(v_U32_t)+1; tSirMacAddr macAddress; VOS_STATUS status = VOS_STATUS_E_FAILURE; - int rc, valid; + int rc, valid, i; pHddCtx = WLAN_HDD_GET_CTX(pHostapdAdapter); valid = wlan_hdd_validate_context(pHddCtx); @@ -4299,13 +4299,22 @@ int iw_get_softap_linkspeed(struct net_device *dev, hddLog(VOS_TRACE_LEVEL_ERROR, FL("String to Hex conversion Failed")); } } - /* If no mac address is passed and/or its length is less than 17, - * return error + * link speed for first connected client will be returned. */ - if (wrqu->data.length < 17 || !VOS_IS_STATUS_SUCCESS(status )) - { - hddLog(VOS_TRACE_LEVEL_ERROR,FL("Invalid peer macaddress")); + if (wrqu->data.length < 17 || !VOS_IS_STATUS_SUCCESS(status )) { + for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { + if (pHostapdAdapter->aStaInfo[i].isUsed && + (!vos_is_macaddr_broadcast(&pHostapdAdapter->aStaInfo[i].macAddrSTA))) { + vos_copy_macaddr((v_MACADDR_t *)macAddress, + &pHostapdAdapter->aStaInfo[i].macAddrSTA); + status = VOS_STATUS_SUCCESS; + break; + } + } + } + if (!VOS_IS_STATUS_SUCCESS(status )) { + hddLog(VOS_TRACE_LEVEL_ERROR, FL("Invalid peer macaddress")); return -EINVAL; } status = wlan_hdd_get_linkspeed_for_peermac(pHostapdAdapter, |
