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

For files fw.h, init.c and join.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Yogesh Ashok Powar 2012-03-13 19:22:36 -07:00 committed by John W. Linville
parent aea0701e22
commit 931f15842a
3 changed files with 97 additions and 100 deletions

View File

@ -117,8 +117,8 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
#define BA_STREAM_NOT_ALLOWED 0xff
#define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
priv->adapter->config_bands & BAND_AN) \
&& priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
priv->adapter->config_bands & BAND_AN) && \
priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
#define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)

View File

@ -35,6 +35,7 @@ static int mwifiex_add_bss_prio_tbl(struct mwifiex_private *priv)
{
struct mwifiex_adapter *adapter = priv->adapter;
struct mwifiex_bss_prio_node *bss_prio;
struct mwifiex_bss_prio_tbl *tbl = adapter->bss_prio_tbl;
unsigned long flags;
bss_prio = kzalloc(sizeof(struct mwifiex_bss_prio_node), GFP_KERNEL);
@ -46,17 +47,12 @@ static int mwifiex_add_bss_prio_tbl(struct mwifiex_private *priv)
bss_prio->priv = priv;
INIT_LIST_HEAD(&bss_prio->list);
if (!adapter->bss_prio_tbl[priv->bss_priority].bss_prio_cur)
adapter->bss_prio_tbl[priv->bss_priority].bss_prio_cur =
bss_prio;
if (!tbl[priv->bss_priority].bss_prio_cur)
tbl[priv->bss_priority].bss_prio_cur = bss_prio;
spin_lock_irqsave(&adapter->bss_prio_tbl[priv->bss_priority]
.bss_prio_lock, flags);
list_add_tail(&bss_prio->list,
&adapter->bss_prio_tbl[priv->bss_priority]
.bss_prio_head);
spin_unlock_irqrestore(&adapter->bss_prio_tbl[priv->bss_priority]
.bss_prio_lock, flags);
spin_lock_irqsave(&tbl[priv->bss_priority].bss_prio_lock, flags);
list_add_tail(&bss_prio->list, &tbl[priv->bss_priority].bss_prio_head);
spin_unlock_irqrestore(&tbl[priv->bss_priority].bss_prio_lock, flags);
return 0;
}
@ -520,7 +516,7 @@ static void mwifiex_delete_bss_prio_tbl(struct mwifiex_private *priv)
struct mwifiex_adapter *adapter = priv->adapter;
struct mwifiex_bss_prio_node *bssprio_node, *tmp_node, **cur;
struct list_head *head;
spinlock_t *lock;
spinlock_t *lock; /* bss priority lock */
unsigned long flags;
for (i = 0; i < adapter->priv_num; ++i) {
@ -646,8 +642,7 @@ int mwifiex_dnld_fw(struct mwifiex_adapter *adapter,
/* Check if we are the winner for downloading FW */
if (!adapter->winner) {
dev_notice(adapter->dev,
"Other interface already running!"
" Skip FW download\n");
"Other intf already running! Skip FW download\n");
poll_num = MAX_MULTI_INTERFACE_POLL_TRIES;
goto poll_fw;
}

View File

@ -52,7 +52,8 @@ mwifiex_cmd_append_generic_ie(struct mwifiex_private *priv, u8 **buffer)
* parameter buffer pointer.
*/
if (priv->gen_ie_buf_len) {
dev_dbg(priv->adapter->dev, "info: %s: append generic %d to %p\n",
dev_dbg(priv->adapter->dev,
"info: %s: append generic ie len %d to %p\n",
__func__, priv->gen_ie_buf_len, *buffer);
/* Wrap the generic IE buffer with a pass through TLV type */
@ -123,8 +124,9 @@ mwifiex_cmd_append_tsf_tlv(struct mwifiex_private *priv, u8 **buffer,
memcpy(&tsf_val, bss_desc->time_stamp, sizeof(tsf_val));
dev_dbg(priv->adapter->dev, "info: %s: TSF offset calc: %016llx - "
"%016llx\n", __func__, tsf_val, bss_desc->network_tsf);
dev_dbg(priv->adapter->dev,
"info: %s: TSF offset calc: %016llx - %016llx\n",
__func__, tsf_val, bss_desc->network_tsf);
memcpy(*buffer, &tsf_val, sizeof(tsf_val));
*buffer += sizeof(tsf_val);
@ -425,12 +427,12 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
pos += sizeof(auth_tlv->header) + le16_to_cpu(auth_tlv->header.len);
if (IS_SUPPORT_MULTI_BANDS(priv->adapter)
&& !(ISSUPP_11NENABLED(priv->adapter->fw_cap_info)
&& (!bss_desc->disable_11n)
&& (priv->adapter->config_bands & BAND_GN
|| priv->adapter->config_bands & BAND_AN)
&& (bss_desc->bcn_ht_cap)
if (IS_SUPPORT_MULTI_BANDS(priv->adapter) &&
!(ISSUPP_11NENABLED(priv->adapter->fw_cap_info) &&
(!bss_desc->disable_11n) &&
(priv->adapter->config_bands & BAND_GN ||
priv->adapter->config_bands & BAND_AN) &&
(bss_desc->bcn_ht_cap)
)
) {
/* Append a channel TLV for the channel the attempted AP was
@ -464,10 +466,10 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
return -1;
}
if (ISSUPP_11NENABLED(priv->adapter->fw_cap_info)
&& (!bss_desc->disable_11n)
&& (priv->adapter->config_bands & BAND_GN
|| priv->adapter->config_bands & BAND_AN))
if (ISSUPP_11NENABLED(priv->adapter->fw_cap_info) &&
(!bss_desc->disable_11n) &&
(priv->adapter->config_bands & BAND_GN ||
priv->adapter->config_bands & BAND_AN))
mwifiex_cmd_append_11n_tlv(priv, bss_desc, &pos);
/* Append vendor specific IE TLV */
@ -579,8 +581,8 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
if (le16_to_cpu(assoc_rsp->status_code)) {
priv->adapter->dbg.num_cmd_assoc_failure++;
dev_err(priv->adapter->dev, "ASSOC_RESP: association failed, "
"status code = %d, error = 0x%x, a_id = 0x%x\n",
dev_err(priv->adapter->dev,
"ASSOC_RESP: failed, status code=%d err=%#x a_id=%#x\n",
le16_to_cpu(assoc_rsp->status_code),
le16_to_cpu(assoc_rsp->cap_info_bitmap),
le16_to_cpu(assoc_rsp->a_id));
@ -617,8 +619,8 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
else
priv->curr_bss_params.wmm_enabled = false;
if ((priv->wmm_required || bss_desc->bcn_ht_cap)
&& priv->curr_bss_params.wmm_enabled)
if ((priv->wmm_required || bss_desc->bcn_ht_cap) &&
priv->curr_bss_params.wmm_enabled)
priv->wmm_enabled = true;
else
priv->wmm_enabled = false;
@ -882,8 +884,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
chan_tlv->chan_scan_param[0].radio_type
= mwifiex_band_to_radio_type(priv->curr_bss_params.band);
if (adapter->adhoc_start_band & BAND_GN
|| adapter->adhoc_start_band & BAND_AN) {
if (adapter->adhoc_start_band & BAND_GN ||
adapter->adhoc_start_band & BAND_AN) {
if (adapter->sec_chan_offset ==
IEEE80211_HT_PARAM_CHA_SEC_ABOVE)
chan_tlv->chan_scan_param[0].radio_type |=
@ -925,8 +927,7 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
mwifiex_fill_cap_info(priv, radio_type, ht_cap);
pos += sizeof(struct mwifiex_ie_types_htcap);
cmd_append_size +=
sizeof(struct mwifiex_ie_types_htcap);
cmd_append_size += sizeof(struct mwifiex_ie_types_htcap);
/* Fill HT INFORMATION */
ht_info = (struct mwifiex_ie_types_htinfo *) pos;
@ -950,8 +951,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
sizeof(struct mwifiex_ie_types_htinfo);
}
cmd->size = cpu_to_le16((u16)
(sizeof(struct host_cmd_ds_802_11_ad_hoc_start)
cmd->size =
cpu_to_le16((u16)(sizeof(struct host_cmd_ds_802_11_ad_hoc_start)
+ S_DS_GEN + cmd_append_size));
if (adapter->adhoc_start_band == BAND_B)
@ -1039,11 +1040,12 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
tmp_cap &= CAPINFO_MASK;
dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: tmp_cap=%4X"
" CAPINFO_MASK=%4lX\n", tmp_cap, CAPINFO_MASK);
dev_dbg(priv->adapter->dev,
"info: ADHOC_J_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n",
tmp_cap, CAPINFO_MASK);
/* Information on BSSID descriptor passed to FW */
dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: BSSID = %pM, SSID = %s\n",
dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: BSSID=%pM, SSID='%s'\n",
adhoc_join->bss_descriptor.bssid,
adhoc_join->bss_descriptor.ssid);
@ -1082,13 +1084,13 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
sizeof(struct mwifiex_chan_scan_param_set));
chan_tlv->chan_scan_param[0].chan_number =
(bss_desc->phy_param_set.ds_param_set.current_chan);
dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Chan = %d\n",
dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Chan=%d\n",
chan_tlv->chan_scan_param[0].chan_number);
chan_tlv->chan_scan_param[0].radio_type =
mwifiex_band_to_radio_type((u8) bss_desc->bss_band);
dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Band = %d\n",
dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Band=%d\n",
chan_tlv->chan_scan_param[0].radio_type);
pos += sizeof(chan_tlv->header) +
sizeof(struct mwifiex_chan_scan_param_set);
@ -1110,8 +1112,8 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
cmd_append_size += mwifiex_cmd_append_vsie_tlv(priv,
MWIFIEX_VSIE_MASK_ADHOC, &pos);
cmd->size = cpu_to_le16((u16)
(sizeof(struct host_cmd_ds_802_11_ad_hoc_join)
cmd->size = cpu_to_le16
((u16) (sizeof(struct host_cmd_ds_802_11_ad_hoc_join)
+ S_DS_GEN + cmd_append_size));
adhoc_join->bss_descriptor.cap_info_bitmap = cpu_to_le16(tmp_cap);