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