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

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

For files sta_rx.c, sta_tx.c, txrx.c, util.c and wmm.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 500f747c
......@@ -43,8 +43,9 @@ int mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
{
int ret;
struct mwifiex_rxinfo *rx_info = MWIFIEX_SKB_RXCB(skb);
struct mwifiex_private *priv = mwifiex_get_priv_by_id(adapter,
rx_info->bss_num, rx_info->bss_type);
struct mwifiex_private *priv =
mwifiex_get_priv_by_id(adapter, rx_info->bss_num,
rx_info->bss_type);
struct rx_packet_hdr *rx_pkt_hdr;
struct rxpd *local_rx_pd;
int hdr_chop;
......@@ -125,8 +126,9 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *adapter,
struct rx_packet_hdr *rx_pkt_hdr;
u8 ta[ETH_ALEN];
u16 rx_pkt_type;
struct mwifiex_private *priv = mwifiex_get_priv_by_id(adapter,
rx_info->bss_num, rx_info->bss_type);
struct mwifiex_private *priv =
mwifiex_get_priv_by_id(adapter, rx_info->bss_num,
rx_info->bss_type);
if (!priv)
return -1;
......
......@@ -50,8 +50,7 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *priv,
u8 pad;
if (!skb->len) {
dev_err(adapter->dev, "Tx: bad packet length: %d\n",
skb->len);
dev_err(adapter->dev, "Tx: bad packet length: %d\n", skb->len);
tx_info->status_code = -1;
return skb->data;
}
......@@ -67,8 +66,9 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *priv,
memset(local_tx_pd, 0, sizeof(struct txpd));
local_tx_pd->bss_num = priv->bss_num;
local_tx_pd->bss_type = priv->bss_type;
local_tx_pd->tx_pkt_length = cpu_to_le16((u16) (skb->len -
(sizeof(struct txpd) + pad)));
local_tx_pd->tx_pkt_length = cpu_to_le16((u16)(skb->len -
(sizeof(struct txpd)
+ pad)));
local_tx_pd->priority = (u8) skb->priority;
local_tx_pd->pkt_delay_2ms =
......@@ -192,8 +192,8 @@ mwifiex_check_last_packet_indication(struct mwifiex_private *priv)
if (mwifiex_wmm_lists_empty(adapter))
ret = true;
if (ret && !adapter->cmd_sent && !adapter->curr_cmd
&& !is_command_pending(adapter)) {
if (ret && !adapter->cmd_sent && !adapter->curr_cmd &&
!is_command_pending(adapter)) {
adapter->delay_null_pkt = false;
ret = true;
} else {
......
......@@ -85,8 +85,7 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
switch (ret) {
case -EBUSY:
if ((GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) &&
(adapter->pps_uapsd_mode) &&
(adapter->tx_lock_flag)) {
(adapter->pps_uapsd_mode) && (adapter->tx_lock_flag)) {
priv->adapter->tx_lock_flag = false;
if (local_tx_pd)
local_tx_pd->flags = 0;
......@@ -151,8 +150,8 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
tpriv = adapter->priv[i];
if ((GET_BSS_ROLE(tpriv) == MWIFIEX_BSS_ROLE_STA)
&& (tpriv->media_connected)) {
if ((GET_BSS_ROLE(tpriv) == MWIFIEX_BSS_ROLE_STA) &&
(tpriv->media_connected)) {
if (netif_queue_stopped(tpriv->netdev))
mwifiex_wake_up_net_dev_queue(tpriv->netdev,
adapter);
......
......@@ -93,10 +93,10 @@ int mwifiex_get_debug_info(struct mwifiex_private *priv,
sizeof(priv->wmm.packets_out));
info->max_tx_buf_size = (u32) adapter->max_tx_buf_size;
info->tx_buf_size = (u32) adapter->tx_buf_size;
info->rx_tbl_num = mwifiex_get_rx_reorder_tbl(
priv, info->rx_tbl);
info->tx_tbl_num = mwifiex_get_tx_ba_stream_tbl(
priv, info->tx_tbl);
info->rx_tbl_num = mwifiex_get_rx_reorder_tbl(priv,
info->rx_tbl);
info->tx_tbl_num = mwifiex_get_tx_ba_stream_tbl(priv,
info->tx_tbl);
info->ps_mode = adapter->ps_mode;
info->ps_state = adapter->ps_state;
info->is_deep_sleep = adapter->is_deep_sleep;
......
......@@ -217,21 +217,18 @@ mwifiex_wmm_setup_queue_priorities(struct mwifiex_private *priv,
wmm_ie->reserved);
for (num_ac = 0; num_ac < ARRAY_SIZE(wmm_ie->ac_params); num_ac++) {
cw_min = (1 << (wmm_ie->ac_params[num_ac].ecw_bitmap &
MWIFIEX_ECW_MIN)) - 1;
avg_back_off = (cw_min >> 1) +
(wmm_ie->ac_params[num_ac].aci_aifsn_bitmap &
MWIFIEX_AIFSN);
ac_idx = wmm_aci_to_qidx_map[(wmm_ie->ac_params[num_ac].
aci_aifsn_bitmap &
MWIFIEX_ACI) >> 5];
u8 ecw = wmm_ie->ac_params[num_ac].ecw_bitmap;
u8 aci_aifsn = wmm_ie->ac_params[num_ac].aci_aifsn_bitmap;
cw_min = (1 << (ecw & MWIFIEX_ECW_MIN)) - 1;
avg_back_off = (cw_min >> 1) + (aci_aifsn & MWIFIEX_AIFSN);
ac_idx = wmm_aci_to_qidx_map[(aci_aifsn & MWIFIEX_ACI) >> 5];
priv->wmm.queue_priority[ac_idx] = ac_idx;
tmp[ac_idx] = avg_back_off;
dev_dbg(priv->adapter->dev, "info: WMM: CWmax=%d CWmin=%d Avg Back-off=%d\n",
(1 << ((wmm_ie->ac_params[num_ac].ecw_bitmap &
MWIFIEX_ECW_MAX) >> 4)) - 1,
dev_dbg(priv->adapter->dev,
"info: WMM: CWmax=%d CWmin=%d Avg Back-off=%d\n",
(1 << ((ecw & MWIFIEX_ECW_MAX) >> 4)) - 1,
cw_min, avg_back_off);
mwifiex_wmm_ac_debug_print(&wmm_ie->ac_params[num_ac]);
}
......@@ -318,7 +315,8 @@ mwifiex_wmm_setup_ac_downgrade(struct mwifiex_private *priv)
priv->wmm.ac_down_graded_vals[ac_val]
= mwifiex_wmm_eval_downgrade_ac(priv,
(enum mwifiex_wmm_ac_e) ac_val);
dev_dbg(priv->adapter->dev, "info: WMM: AC PRIO %d maps to %d\n",
dev_dbg(priv->adapter->dev,
"info: WMM: AC PRIO %d maps to %d\n",
ac_val, priv->wmm.ac_down_graded_vals[ac_val]);
}
}
......@@ -490,7 +488,8 @@ static void mwifiex_wmm_delete_all_ralist(struct mwifiex_private *priv)
dev_dbg(priv->adapter->dev,
"info: ra_list: freeing buf for tid %d\n", i);
list_for_each_entry_safe(ra_list, tmp_node,
&priv->wmm.tid_tbl_ptr[i].ra_list, list) {
&priv->wmm.tid_tbl_ptr[i].ra_list,
list) {
list_del(&ra_list->list);
kfree(ra_list);
}
......@@ -772,15 +771,14 @@ mwifiex_wmm_process_association_req(struct mwifiex_private *priv,
if (!wmm_ie)
return 0;
dev_dbg(priv->adapter->dev, "info: WMM: process assoc req:"
"bss->wmmIe=0x%x\n",
dev_dbg(priv->adapter->dev,
"info: WMM: process assoc req: bss->wmm_ie=%#x\n",
wmm_ie->vend_hdr.element_id);
if ((priv->wmm_required
|| (ht_cap && (priv->adapter->config_bands & BAND_GN
|| priv->adapter->config_bands & BAND_AN))
)
&& wmm_ie->vend_hdr.element_id == WLAN_EID_VENDOR_SPECIFIC) {
if ((priv->wmm_required ||
(ht_cap && (priv->adapter->config_bands & BAND_GN ||
priv->adapter->config_bands & BAND_AN))) &&
wmm_ie->vend_hdr.element_id == WLAN_EID_VENDOR_SPECIFIC) {
wmm_tlv = (struct mwifiex_ie_types_wmm_param_set *) *assoc_buf;
wmm_tlv->header.type = cpu_to_le16((u16) wmm_info_ie[0]);
wmm_tlv->header.len = cpu_to_le16((u16) wmm_info_ie[1]);
......@@ -790,8 +788,7 @@ mwifiex_wmm_process_association_req(struct mwifiex_private *priv,
memcpy((u8 *) (wmm_tlv->wmm_ie
+ le16_to_cpu(wmm_tlv->header.len)
- sizeof(priv->wmm_qosinfo)),
&priv->wmm_qosinfo,
sizeof(priv->wmm_qosinfo));
&priv->wmm_qosinfo, sizeof(priv->wmm_qosinfo));
ret_len = sizeof(wmm_tlv->header)
+ le16_to_cpu(wmm_tlv->header.len);
......@@ -1210,10 +1207,11 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter)
return 0;
}
if (!ptr->is_11n_enabled || mwifiex_is_ba_stream_setup(priv, ptr, tid)
|| ((priv->sec_info.wpa_enabled
|| priv->sec_info.wpa2_enabled) && !priv->wpa_is_gtk_set)
) {
if (!ptr->is_11n_enabled ||
mwifiex_is_ba_stream_setup(priv, ptr, tid) ||
((priv->sec_info.wpa_enabled ||
priv->sec_info.wpa2_enabled) &&
!priv->wpa_is_gtk_set)) {
mwifiex_send_single_packet(priv, ptr, ptr_index, flags);
/* ra_list_spinlock has been freed in
mwifiex_send_single_packet() */
......
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