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

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

For files main.c, main.h and pcie.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 931f1584
...@@ -64,11 +64,10 @@ static int mwifiex_register(void *card, struct mwifiex_if_ops *if_ops, ...@@ -64,11 +64,10 @@ static int mwifiex_register(void *card, struct mwifiex_if_ops *if_ops,
adapter->priv_num = 0; adapter->priv_num = 0;
/* Allocate memory for private structure */ /* Allocate memory for private structure */
adapter->priv[0] = kzalloc(sizeof(struct mwifiex_private), adapter->priv[0] = kzalloc(sizeof(struct mwifiex_private), GFP_KERNEL);
GFP_KERNEL);
if (!adapter->priv[0]) { if (!adapter->priv[0]) {
dev_err(adapter->dev, "%s: failed to alloc priv[0]\n", dev_err(adapter->dev,
__func__); "%s: failed to alloc priv[0]\n", __func__);
goto error; goto error;
} }
...@@ -169,8 +168,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter) ...@@ -169,8 +168,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
if ((adapter->ps_state == PS_STATE_SLEEP) && if ((adapter->ps_state == PS_STATE_SLEEP) &&
(adapter->pm_wakeup_card_req && (adapter->pm_wakeup_card_req &&
!adapter->pm_wakeup_fw_try) && !adapter->pm_wakeup_fw_try) &&
(is_command_pending(adapter) (is_command_pending(adapter) ||
|| !mwifiex_wmm_lists_empty(adapter))) { !mwifiex_wmm_lists_empty(adapter))) {
adapter->pm_wakeup_fw_try = true; adapter->pm_wakeup_fw_try = true;
adapter->if_ops.wakeup(adapter); adapter->if_ops.wakeup(adapter);
continue; continue;
...@@ -187,10 +186,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter) ...@@ -187,10 +186,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
adapter->tx_lock_flag) adapter->tx_lock_flag)
break; break;
if (adapter->scan_processing || adapter->data_sent if (adapter->scan_processing || adapter->data_sent ||
|| mwifiex_wmm_lists_empty(adapter)) { mwifiex_wmm_lists_empty(adapter)) {
if (adapter->cmd_sent || adapter->curr_cmd if (adapter->cmd_sent || adapter->curr_cmd ||
|| (!is_command_pending(adapter))) (!is_command_pending(adapter)))
break; break;
} }
} }
...@@ -223,10 +222,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter) ...@@ -223,10 +222,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
/* * The ps_state may have been changed during processing of /* * The ps_state may have been changed during processing of
* Sleep Request event. * Sleep Request event.
*/ */
if ((adapter->ps_state == PS_STATE_SLEEP) if ((adapter->ps_state == PS_STATE_SLEEP) ||
|| (adapter->ps_state == PS_STATE_PRE_SLEEP) (adapter->ps_state == PS_STATE_PRE_SLEEP) ||
|| (adapter->ps_state == PS_STATE_SLEEP_CFM) (adapter->ps_state == PS_STATE_SLEEP_CFM) ||
|| adapter->tx_lock_flag) adapter->tx_lock_flag)
continue; continue;
if (!adapter->cmd_sent && !adapter->curr_cmd) { if (!adapter->cmd_sent && !adapter->curr_cmd) {
...@@ -249,8 +248,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter) ...@@ -249,8 +248,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
} }
if (adapter->delay_null_pkt && !adapter->cmd_sent && if (adapter->delay_null_pkt && !adapter->cmd_sent &&
!adapter->curr_cmd && !is_command_pending(adapter) !adapter->curr_cmd && !is_command_pending(adapter) &&
&& mwifiex_wmm_lists_empty(adapter)) { mwifiex_wmm_lists_empty(adapter)) {
if (!mwifiex_send_null_packet if (!mwifiex_send_null_packet
(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), (mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET | MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET |
...@@ -494,8 +493,8 @@ mwifiex_set_mac_address(struct net_device *dev, void *addr) ...@@ -494,8 +493,8 @@ mwifiex_set_mac_address(struct net_device *dev, void *addr)
if (!ret) if (!ret)
memcpy(priv->netdev->dev_addr, priv->curr_addr, ETH_ALEN); memcpy(priv->netdev->dev_addr, priv->curr_addr, ETH_ALEN);
else else
dev_err(priv->adapter->dev, "set mac address failed: ret=%d" dev_err(priv->adapter->dev,
"\n", ret); "set mac address failed: ret=%d\n", ret);
memcpy(dev->dev_addr, priv->curr_addr, ETH_ALEN); memcpy(dev->dev_addr, priv->curr_addr, ETH_ALEN);
......
...@@ -841,8 +841,8 @@ mwifiex_get_priv_by_id(struct mwifiex_adapter *adapter, ...@@ -841,8 +841,8 @@ mwifiex_get_priv_by_id(struct mwifiex_adapter *adapter,
for (i = 0; i < adapter->priv_num; i++) { for (i = 0; i < adapter->priv_num; i++) {
if (adapter->priv[i]) { if (adapter->priv[i]) {
if ((adapter->priv[i]->bss_num == bss_num) if ((adapter->priv[i]->bss_num == bss_num) &&
&& (adapter->priv[i]->bss_type == bss_type)) (adapter->priv[i]->bss_type == bss_type))
break; break;
} }
} }
......
This diff is collapsed.
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