|
@@ -1490,7 +1490,7 @@ hdd_parse_set_roam_scan_channels(struct hdd_adapter *adapter, const char *comman
|
|
|
/**
|
|
|
* hdd_parse_plm_cmd() - HDD Parse Plm command
|
|
|
* @command: Pointer to input data
|
|
|
- * @pPlmRequest: Pointer to output struct plm_req
|
|
|
+ * @req: Pointer to output struct plm_req
|
|
|
*
|
|
|
* This function parses the plm command passed in the format
|
|
|
* CCXPLMREQ<space><enable><space><dialog_token><space>
|
|
@@ -1502,7 +1502,7 @@ hdd_parse_set_roam_scan_channels(struct hdd_adapter *adapter, const char *comman
|
|
|
* Return: 0 for success non-zero for failure
|
|
|
*/
|
|
|
static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
- struct plm_req *pPlmRequest)
|
|
|
+ struct plm_req *req)
|
|
|
{
|
|
|
uint8_t *cmdPtr = NULL;
|
|
|
int count, content = 0, ret = 0;
|
|
@@ -1530,7 +1530,7 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (ret < 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->enable = content;
|
|
|
+ req->enable = content;
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
|
if (NULL == cmdPtr)
|
|
@@ -1549,8 +1549,8 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (ret < 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->diag_token = content;
|
|
|
- hdd_debug("diag token %d", pPlmRequest->diag_token);
|
|
|
+ req->diag_token = content;
|
|
|
+ hdd_debug("diag token %d", req->diag_token);
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
|
if (NULL == cmdPtr)
|
|
@@ -1569,11 +1569,11 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (ret < 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->meas_token = content;
|
|
|
- hdd_debug("meas token %d", pPlmRequest->meas_token);
|
|
|
+ req->meas_token = content;
|
|
|
+ hdd_debug("meas token %d", req->meas_token);
|
|
|
|
|
|
- hdd_debug("PLM req %s", pPlmRequest->enable ? "START" : "STOP");
|
|
|
- if (pPlmRequest->enable) {
|
|
|
+ hdd_debug("PLM req %s", req->enable ? "START" : "STOP");
|
|
|
+ if (req->enable) {
|
|
|
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
@@ -1596,8 +1596,8 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (content < 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->numBursts = content;
|
|
|
- hdd_debug("num burst %d", pPlmRequest->numBursts);
|
|
|
+ req->numBursts = content;
|
|
|
+ hdd_debug("num burst %d", req->numBursts);
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
|
if (NULL == cmdPtr)
|
|
@@ -1619,8 +1619,8 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (content <= 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->burstInt = content;
|
|
|
- hdd_debug("burst Int %d", pPlmRequest->burstInt);
|
|
|
+ req->burstInt = content;
|
|
|
+ hdd_debug("burst Int %d", req->burstInt);
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
|
if (NULL == cmdPtr)
|
|
@@ -1642,8 +1642,8 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (content <= 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->measDuration = content;
|
|
|
- hdd_debug("measDur %d", pPlmRequest->measDuration);
|
|
|
+ req->measDuration = content;
|
|
|
+ hdd_debug("measDur %d", req->measDuration);
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
|
if (NULL == cmdPtr)
|
|
@@ -1665,8 +1665,8 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (content <= 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->burstLen = content;
|
|
|
- hdd_debug("burstLen %d", pPlmRequest->burstLen);
|
|
|
+ req->burstLen = content;
|
|
|
+ hdd_debug("burstLen %d", req->burstLen);
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
|
if (NULL == cmdPtr)
|
|
@@ -1688,9 +1688,9 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (content <= 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->desiredTxPwr = content;
|
|
|
+ req->desiredTxPwr = content;
|
|
|
hdd_debug("desiredTxPwr %d",
|
|
|
- pPlmRequest->desiredTxPwr);
|
|
|
+ req->desiredTxPwr);
|
|
|
|
|
|
for (count = 0; count < QDF_MAC_ADDR_SIZE; count++) {
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
@@ -1711,11 +1711,11 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
if (ret < 0)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->mac_addr.bytes[count] = content;
|
|
|
+ req->mac_addr.bytes[count] = content;
|
|
|
}
|
|
|
|
|
|
hdd_debug("MC addr " MAC_ADDRESS_STR,
|
|
|
- MAC_ADDR_ARRAY(pPlmRequest->mac_addr.bytes));
|
|
|
+ MAC_ADDR_ARRAY(req->mac_addr.bytes));
|
|
|
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
@@ -1739,11 +1739,11 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
content = QDF_MIN(content, CFG_VALID_CHANNEL_LIST_LEN);
|
|
|
- pPlmRequest->plmNumCh = content;
|
|
|
- hdd_debug("numch: %d", pPlmRequest->plmNumCh);
|
|
|
+ req->plmNumCh = content;
|
|
|
+ hdd_debug("numch: %d", req->plmNumCh);
|
|
|
|
|
|
/* Channel numbers */
|
|
|
- for (count = 0; count < pPlmRequest->plmNumCh; count++) {
|
|
|
+ for (count = 0; count < req->plmNumCh; count++) {
|
|
|
cmdPtr = strpbrk(cmdPtr, " ");
|
|
|
|
|
|
if (NULL == cmdPtr)
|
|
@@ -1763,8 +1763,8 @@ static QDF_STATUS hdd_parse_plm_cmd(uint8_t *command,
|
|
|
content > WNI_CFG_CURRENT_CHANNEL_STAMAX)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
- pPlmRequest->plmChList[count] = content;
|
|
|
- hdd_debug(" ch- %d", pPlmRequest->plmChList[count]);
|
|
|
+ req->plmChList[count] = content;
|
|
|
+ hdd_debug(" ch- %d", req->plmChList[count]);
|
|
|
}
|
|
|
}
|
|
|
/* If PLM START */
|
|
@@ -5639,27 +5639,27 @@ static int drv_cmd_ccx_plm_req(struct hdd_adapter *adapter,
|
|
|
int ret = 0;
|
|
|
uint8_t *value = command;
|
|
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
- struct plm_req *pPlmRequest = NULL;
|
|
|
+ struct plm_req *req = NULL;
|
|
|
|
|
|
- pPlmRequest = qdf_mem_malloc(sizeof(struct plm_req));
|
|
|
- if (NULL == pPlmRequest) {
|
|
|
+ req = qdf_mem_malloc(sizeof(struct plm_req));
|
|
|
+ if (NULL == req) {
|
|
|
ret = -ENOMEM;
|
|
|
goto exit;
|
|
|
}
|
|
|
|
|
|
- status = hdd_parse_plm_cmd(value, pPlmRequest);
|
|
|
+ status = hdd_parse_plm_cmd(value, req);
|
|
|
if (QDF_STATUS_SUCCESS != status) {
|
|
|
- qdf_mem_free(pPlmRequest);
|
|
|
- pPlmRequest = NULL;
|
|
|
+ qdf_mem_free(req);
|
|
|
+ req = NULL;
|
|
|
ret = -EINVAL;
|
|
|
goto exit;
|
|
|
}
|
|
|
- pPlmRequest->sessionId = adapter->vdev_id;
|
|
|
+ req->sessionId = adapter->vdev_id;
|
|
|
|
|
|
- status = sme_set_plm_request(hdd_ctx->mac_handle, pPlmRequest);
|
|
|
+ status = sme_set_plm_request(hdd_ctx->mac_handle, req);
|
|
|
if (QDF_STATUS_SUCCESS != status) {
|
|
|
- qdf_mem_free(pPlmRequest);
|
|
|
- pPlmRequest = NULL;
|
|
|
+ qdf_mem_free(req);
|
|
|
+ req = NULL;
|
|
|
ret = -EINVAL;
|
|
|
goto exit;
|
|
|
}
|