Commit 9c05fd72 authored by Yogesh Ashok Powar's avatar Yogesh Ashok Powar Committed by John W. Linville

mwifiex: fix checkpatch --strict warnings/errors Part 7

For sta_cmd.c and sta_cmdresp.c
Signed-off-by: default avatarYogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5dbd326c
This diff is collapsed.
...@@ -49,7 +49,7 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv, ...@@ -49,7 +49,7 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
unsigned long flags; unsigned long flags;
dev_err(adapter->dev, "CMD_RESP: cmd %#x error, result=%#x\n", dev_err(adapter->dev, "CMD_RESP: cmd %#x error, result=%#x\n",
resp->command, resp->result); resp->command, resp->result);
if (adapter->curr_cmd->wait_q_enabled) if (adapter->curr_cmd->wait_q_enabled)
adapter->cmd_wait_q.status = -1; adapter->cmd_wait_q.status = -1;
...@@ -57,13 +57,13 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv, ...@@ -57,13 +57,13 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
switch (le16_to_cpu(resp->command)) { switch (le16_to_cpu(resp->command)) {
case HostCmd_CMD_802_11_PS_MODE_ENH: case HostCmd_CMD_802_11_PS_MODE_ENH:
pm = &resp->params.psmode_enh; pm = &resp->params.psmode_enh;
dev_err(adapter->dev, "PS_MODE_ENH cmd failed: " dev_err(adapter->dev,
"result=0x%x action=0x%X\n", "PS_MODE_ENH cmd failed: result=0x%x action=0x%X\n",
resp->result, le16_to_cpu(pm->action)); resp->result, le16_to_cpu(pm->action));
/* We do not re-try enter-ps command in ad-hoc mode. */ /* We do not re-try enter-ps command in ad-hoc mode. */
if (le16_to_cpu(pm->action) == EN_AUTO_PS && if (le16_to_cpu(pm->action) == EN_AUTO_PS &&
(le16_to_cpu(pm->params.ps_bitmap) & BITMAP_STA_PS) && (le16_to_cpu(pm->params.ps_bitmap) & BITMAP_STA_PS) &&
priv->bss_mode == NL80211_IFTYPE_ADHOC) priv->bss_mode == NL80211_IFTYPE_ADHOC)
adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM; adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM;
break; break;
...@@ -123,7 +123,7 @@ static int mwifiex_ret_802_11_rssi_info(struct mwifiex_private *priv, ...@@ -123,7 +123,7 @@ static int mwifiex_ret_802_11_rssi_info(struct mwifiex_private *priv,
struct mwifiex_ds_get_signal *signal) struct mwifiex_ds_get_signal *signal)
{ {
struct host_cmd_ds_802_11_rssi_info_rsp *rssi_info_rsp = struct host_cmd_ds_802_11_rssi_info_rsp *rssi_info_rsp =
&resp->params.rssi_info_rsp; &resp->params.rssi_info_rsp;
priv->data_rssi_last = le16_to_cpu(rssi_info_rsp->data_rssi_last); priv->data_rssi_last = le16_to_cpu(rssi_info_rsp->data_rssi_last);
priv->data_nf_last = le16_to_cpu(rssi_info_rsp->data_nf_last); priv->data_nf_last = le16_to_cpu(rssi_info_rsp->data_nf_last);
...@@ -191,8 +191,8 @@ static int mwifiex_ret_802_11_snmp_mib(struct mwifiex_private *priv, ...@@ -191,8 +191,8 @@ static int mwifiex_ret_802_11_snmp_mib(struct mwifiex_private *priv,
u32 ul_temp; u32 ul_temp;
dev_dbg(priv->adapter->dev, "info: SNMP_RESP: oid value = %#x," dev_dbg(priv->adapter->dev, "info: SNMP_RESP: oid value = %#x,"
" query_type = %#x, buf size = %#x\n", " query_type = %#x, buf size = %#x\n",
oid, query_type, le16_to_cpu(smib->buf_size)); oid, query_type, le16_to_cpu(smib->buf_size));
if (query_type == HostCmd_ACT_GEN_GET) { if (query_type == HostCmd_ACT_GEN_GET) {
ul_temp = le16_to_cpu(*((__le16 *) (smib->value))); ul_temp = le16_to_cpu(*((__le16 *) (smib->value)));
if (data_buf) if (data_buf)
...@@ -444,7 +444,7 @@ static int mwifiex_ret_tx_power_cfg(struct mwifiex_private *priv, ...@@ -444,7 +444,7 @@ static int mwifiex_ret_tx_power_cfg(struct mwifiex_private *priv,
break; break;
default: default:
dev_err(adapter->dev, "CMD_RESP: unknown cmd action %d\n", dev_err(adapter->dev, "CMD_RESP: unknown cmd action %d\n",
action); action);
return 0; return 0;
} }
dev_dbg(adapter->dev, dev_dbg(adapter->dev,
...@@ -464,7 +464,7 @@ static int mwifiex_ret_802_11_mac_address(struct mwifiex_private *priv, ...@@ -464,7 +464,7 @@ static int mwifiex_ret_802_11_mac_address(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp) struct host_cmd_ds_command *resp)
{ {
struct host_cmd_ds_802_11_mac_address *cmd_mac_addr = struct host_cmd_ds_802_11_mac_address *cmd_mac_addr =
&resp->params.mac_addr; &resp->params.mac_addr;
memcpy(priv->curr_addr, cmd_mac_addr->mac_addr, ETH_ALEN); memcpy(priv->curr_addr, cmd_mac_addr->mac_addr, ETH_ALEN);
...@@ -549,7 +549,7 @@ static int mwifiex_ret_802_11_key_material(struct mwifiex_private *priv, ...@@ -549,7 +549,7 @@ static int mwifiex_ret_802_11_key_material(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp) struct host_cmd_ds_command *resp)
{ {
struct host_cmd_ds_802_11_key_material *key = struct host_cmd_ds_802_11_key_material *key =
&resp->params.key_material; &resp->params.key_material;
if (le16_to_cpu(key->action) == HostCmd_ACT_GEN_SET) { if (le16_to_cpu(key->action) == HostCmd_ACT_GEN_SET) {
if ((le16_to_cpu(key->key_param_set.key_info) & KEY_MCAST)) { if ((le16_to_cpu(key->key_param_set.key_info) & KEY_MCAST)) {
...@@ -580,17 +580,18 @@ static int mwifiex_ret_802_11d_domain_info(struct mwifiex_private *priv, ...@@ -580,17 +580,18 @@ static int mwifiex_ret_802_11d_domain_info(struct mwifiex_private *priv,
u16 action = le16_to_cpu(domain_info->action); u16 action = le16_to_cpu(domain_info->action);
u8 no_of_triplet; u8 no_of_triplet;
no_of_triplet = (u8) ((le16_to_cpu(domain->header.len) - no_of_triplet = (u8) ((le16_to_cpu(domain->header.len)
IEEE80211_COUNTRY_STRING_LEN) / - IEEE80211_COUNTRY_STRING_LEN)
sizeof(struct ieee80211_country_ie_triplet)); / sizeof(struct ieee80211_country_ie_triplet));
dev_dbg(priv->adapter->dev, "info: 11D Domain Info Resp:" dev_dbg(priv->adapter->dev,
" no_of_triplet=%d\n", no_of_triplet); "info: 11D Domain Info Resp: no_of_triplet=%d\n",
no_of_triplet);
if (no_of_triplet > MWIFIEX_MAX_TRIPLET_802_11D) { if (no_of_triplet > MWIFIEX_MAX_TRIPLET_802_11D) {
dev_warn(priv->adapter->dev, dev_warn(priv->adapter->dev,
"11D: invalid number of triplets %d " "11D: invalid number of triplets %d returned\n",
"returned!!\n", no_of_triplet); no_of_triplet);
return -1; return -1;
} }
...@@ -624,8 +625,8 @@ static int mwifiex_ret_802_11_rf_channel(struct mwifiex_private *priv, ...@@ -624,8 +625,8 @@ static int mwifiex_ret_802_11_rf_channel(struct mwifiex_private *priv,
if (priv->curr_bss_params.bss_descriptor.channel != new_channel) { if (priv->curr_bss_params.bss_descriptor.channel != new_channel) {
dev_dbg(priv->adapter->dev, "cmd: Channel Switch: %d to %d\n", dev_dbg(priv->adapter->dev, "cmd: Channel Switch: %d to %d\n",
priv->curr_bss_params.bss_descriptor.channel, priv->curr_bss_params.bss_descriptor.channel,
new_channel); new_channel);
/* Update the channel again */ /* Update the channel again */
priv->curr_bss_params.bss_descriptor.channel = new_channel; priv->curr_bss_params.bss_descriptor.channel = new_channel;
} }
...@@ -747,7 +748,7 @@ static int mwifiex_ret_ibss_coalescing_status(struct mwifiex_private *priv, ...@@ -747,7 +748,7 @@ static int mwifiex_ret_ibss_coalescing_status(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp) struct host_cmd_ds_command *resp)
{ {
struct host_cmd_ds_802_11_ibss_status *ibss_coal_resp = struct host_cmd_ds_802_11_ibss_status *ibss_coal_resp =
&(resp->params.ibss_coalescing); &(resp->params.ibss_coalescing);
u8 zero_mac[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 }; u8 zero_mac[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
if (le16_to_cpu(ibss_coal_resp->action) == HostCmd_ACT_GEN_SET) if (le16_to_cpu(ibss_coal_resp->action) == HostCmd_ACT_GEN_SET)
...@@ -887,20 +888,17 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no, ...@@ -887,20 +888,17 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
case HostCmd_CMD_RECONFIGURE_TX_BUFF: case HostCmd_CMD_RECONFIGURE_TX_BUFF:
adapter->tx_buf_size = (u16) le16_to_cpu(resp->params. adapter->tx_buf_size = (u16) le16_to_cpu(resp->params.
tx_buf.buff_size); tx_buf.buff_size);
adapter->tx_buf_size = (adapter->tx_buf_size / adapter->tx_buf_size = (adapter->tx_buf_size
MWIFIEX_SDIO_BLOCK_SIZE) * / MWIFIEX_SDIO_BLOCK_SIZE)
MWIFIEX_SDIO_BLOCK_SIZE; * MWIFIEX_SDIO_BLOCK_SIZE;
adapter->curr_tx_buf_size = adapter->tx_buf_size; adapter->curr_tx_buf_size = adapter->tx_buf_size;
dev_dbg(adapter->dev, dev_dbg(adapter->dev,
"cmd: max_tx_buf_size=%d, tx_buf_size=%d\n", "cmd: max_tx_buf_size=%d, tx_buf_size=%d\n",
adapter->max_tx_buf_size, adapter->tx_buf_size); adapter->max_tx_buf_size, adapter->tx_buf_size);
if (adapter->if_ops.update_mp_end_port) if (adapter->if_ops.update_mp_end_port)
adapter->if_ops.update_mp_end_port(adapter, adapter->if_ops.update_mp_end_port(adapter,
le16_to_cpu(resp-> le16_to_cpu(resp->params.tx_buf.mp_end_port));
params.
tx_buf.
mp_end_port));
break; break;
case HostCmd_CMD_AMSDU_AGGR_CTRL: case HostCmd_CMD_AMSDU_AGGR_CTRL:
ret = mwifiex_ret_amsdu_aggr_ctrl(resp, data_buf); ret = mwifiex_ret_amsdu_aggr_ctrl(resp, data_buf);
...@@ -928,7 +926,7 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no, ...@@ -928,7 +926,7 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
break; break;
default: default:
dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n", dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n",
resp->command); resp->command);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment