diff options
| author | Srinivas Girigowda <sgirigow@qca.qualcomm.com> | 2014-10-28 12:07:24 -0700 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2014-10-30 17:28:22 +0530 |
| commit | 09d4960aa0f01501a98732d3e3390d0834debaed (patch) | |
| tree | 55664f71ac900dcc28db6bc93f142c140f2ca370 | |
| parent | dfdc7da921ff5f35ee395a939ced689099fb89d2 (diff) | |
qcacld: Add "rssi" support to device ioctl handler hdd_ioctl()
The "rssi" command is currently supported by the wireless extensions
private command handler, but is not supported by the device ioctl
handler hdd_ioctl(). Add this command to hdd_ioctl() so that we can
wean folks from wireless extensions.
Change-Id: I63446ae95f2cb92f109688935a3111abfc3012e6
CRs-Fixed: 679645
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 8796ded50f7a..29720b170892 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -6035,7 +6035,20 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, ret = hdd_set_tdls_offchannel(pHddCtx, set_value); } #endif - else { + else if (strncasecmp(command, "RSSI", 4) == 0) { + v_S7_t s7Rssi = 0; + char extra[32]; + tANI_U8 len = 0; + + wlan_hdd_get_rssi(pAdapter, &s7Rssi); + + len = scnprintf(extra, sizeof(extra), "%s %d", command, s7Rssi); + if (copy_to_user(priv_data.buf, &extra, len + 1)) { + hddLog(LOGE, FL("Failed to copy data to user buffer")); + ret = -EFAULT; + goto exit; + } + } else { MTRACE(vos_trace(VOS_MODULE_ID_HDD, TRACE_CODE_HDD_UNSUPPORTED_IOCTL, pAdapter->sessionId, 0)); |
