summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Xu <pxu@codeaurora.org>2016-07-14 21:18:14 -0700
committerVishwajith Upendra <vishwaji@codeaurora.org>2016-07-24 19:16:58 -0700
commit4225c15300cfe8b2f7f8ce22a42ceb2d2348b62d (patch)
tree881d6d62de12e0af1bc5b346ed7ea1c1f80c3c2f
parentd222096dc8110abb8d107e5c11d260fe9a032dc2 (diff)
qcacld-3.0: Add vendor ID and fix WMI command parameters
For P2P listen offload feature, add vendor ID information in wiphy vendor command structure, also add missing data length assignment when sending WMI command to FW. Change-Id: Ia889d794cae156814056aeefdfdf339429bf1401 CRs-fixed: 1040310
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c1
-rw-r--r--core/wma/src/wma_features.c20
2 files changed, 14 insertions, 7 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 9a4665f98d48..a26d14894d0e 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -6759,6 +6759,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = {
.doit = wlan_hdd_cfg80211_sap_configuration_set
},
{
+ .info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd =
QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_START,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index c0bb0ff209c9..c0c8c233826d 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -7493,15 +7493,20 @@ QDF_STATUS wma_p2p_lo_start(struct sir_p2p_lo_start *params)
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
uint8_t *buf_ptr;
int ret;
+ int device_types_len_aligned, probe_resp_len_aligned;
if (NULL == wma) {
WMA_LOGE("%s: wma context is NULL", __func__);
return QDF_STATUS_E_INVAL;
}
- len += 2 * WMI_TLV_HDR_SIZE +
- qdf_roundup(params->dev_types_len, sizeof(A_UINT32)) +
- qdf_roundup(params->probe_resp_len, sizeof(A_UINT32));
+ device_types_len_aligned = qdf_roundup(params->dev_types_len,
+ sizeof(A_UINT32));
+ probe_resp_len_aligned = qdf_roundup(params->probe_resp_len,
+ sizeof(A_UINT32));
+
+ len += 2 * WMI_TLV_HDR_SIZE + device_types_len_aligned +
+ probe_resp_len_aligned;
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
@@ -7524,16 +7529,17 @@ QDF_STATUS wma_p2p_lo_start(struct sir_p2p_lo_start *params)
cmd->period = params->period;
cmd->interval = params->interval;
cmd->count = params->count;
+ cmd->device_types_len = params->dev_types_len;
+ cmd->prob_resp_len = params->probe_resp_len;
buf_ptr += sizeof(wmi_p2p_lo_start_cmd_fixed_param);
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
- qdf_roundup(params->dev_types_len, sizeof(A_UINT32)));
+ device_types_len_aligned);
buf_ptr += WMI_TLV_HDR_SIZE;
qdf_mem_copy(buf_ptr, params->device_types, params->dev_types_len);
- buf_ptr += qdf_roundup(params->dev_types_len, sizeof(A_UINT32));
- WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
- qdf_roundup(params->probe_resp_len, sizeof(A_UINT32)));
+ buf_ptr += device_types_len_aligned;
+ WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, probe_resp_len_aligned);
buf_ptr += WMI_TLV_HDR_SIZE;
qdf_mem_copy(buf_ptr, params->probe_resp_tmplt, params->probe_resp_len);