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;
...@@ -157,7 +159,7 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *adapter, ...@@ -157,7 +159,7 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *adapter,
skb_trim(skb, local_rx_pd->rx_pkt_length); skb_trim(skb, local_rx_pd->rx_pkt_length);
ieee80211_amsdu_to_8023s(skb, &list, priv->curr_addr, ieee80211_amsdu_to_8023s(skb, &list, priv->curr_addr,
priv->wdev->iftype, 0, false); priv->wdev->iftype, 0, false);
while (!skb_queue_empty(&list)) { while (!skb_queue_empty(&list)) {
rx_skb = __skb_dequeue(&list); rx_skb = __skb_dequeue(&list);
......
...@@ -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;
} }
...@@ -60,19 +59,20 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *priv, ...@@ -60,19 +59,20 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *priv,
pad = (4 - (((void *)skb->data - NULL) & 0x3)) % 4; pad = (4 - (((void *)skb->data - NULL) & 0x3)) % 4;
BUG_ON(skb_headroom(skb) < (sizeof(*local_tx_pd) + INTF_HEADER_LEN BUG_ON(skb_headroom(skb) < (sizeof(*local_tx_pd) + INTF_HEADER_LEN
+ pad)); + pad));
skb_push(skb, sizeof(*local_tx_pd) + pad); skb_push(skb, sizeof(*local_tx_pd) + pad);
local_tx_pd = (struct txpd *) skb->data; local_tx_pd = (struct txpd *) skb->data;
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 =
mwifiex_wmm_compute_drv_pkt_delay(priv, skb); mwifiex_wmm_compute_drv_pkt_delay(priv, skb);
if (local_tx_pd->priority < if (local_tx_pd->priority <
ARRAY_SIZE(priv->wmm.user_pri_pkt_tx_ctrl)) ARRAY_SIZE(priv->wmm.user_pri_pkt_tx_ctrl))
...@@ -82,7 +82,7 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *priv, ...@@ -82,7 +82,7 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *priv,
*/ */
local_tx_pd->tx_control = local_tx_pd->tx_control =
cpu_to_le32(priv->wmm.user_pri_pkt_tx_ctrl[local_tx_pd-> cpu_to_le32(priv->wmm.user_pri_pkt_tx_ctrl[local_tx_pd->
priority]); priority]);
if (adapter->pps_uapsd_mode) { if (adapter->pps_uapsd_mode) {
if (mwifiex_check_last_packet_indication(priv)) { if (mwifiex_check_last_packet_indication(priv)) {
...@@ -160,13 +160,13 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags) ...@@ -160,13 +160,13 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags)
case -1: case -1:
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
dev_err(adapter->dev, "%s: host_to_card failed: ret=%d\n", dev_err(adapter->dev, "%s: host_to_card failed: ret=%d\n",
__func__, ret); __func__, ret);
adapter->dbg.num_tx_host_to_card_failure++; adapter->dbg.num_tx_host_to_card_failure++;
break; break;
case 0: case 0:
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
dev_dbg(adapter->dev, "data: %s: host_to_card succeeded\n", dev_dbg(adapter->dev, "data: %s: host_to_card succeeded\n",
__func__); __func__);
adapter->tx_lock_flag = true; adapter->tx_lock_flag = true;
break; break;
case -EINPROGRESS: case -EINPROGRESS:
...@@ -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;
...@@ -96,7 +95,7 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, ...@@ -96,7 +95,7 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
case -1: case -1:
adapter->data_sent = false; adapter->data_sent = false;
dev_err(adapter->dev, "mwifiex_write_data_async failed: 0x%X\n", dev_err(adapter->dev, "mwifiex_write_data_async failed: 0x%X\n",
ret); ret);
adapter->dbg.num_tx_host_to_card_failure++; adapter->dbg.num_tx_host_to_card_failure++;
mwifiex_write_data_complete(adapter, skb, ret); mwifiex_write_data_complete(adapter, skb, ret);
break; break;
...@@ -132,7 +131,7 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter, ...@@ -132,7 +131,7 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
tx_info = MWIFIEX_SKB_TXCB(skb); tx_info = MWIFIEX_SKB_TXCB(skb);
priv = mwifiex_get_priv_by_id(adapter, tx_info->bss_num, priv = mwifiex_get_priv_by_id(adapter, tx_info->bss_num,
tx_info->bss_type); tx_info->bss_type);
if (!priv) if (!priv)
goto done; goto done;
...@@ -151,11 +150,11 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter, ...@@ -151,11 +150,11 @@ 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);
} }
} }
done: done:
......
...@@ -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;
...@@ -105,19 +105,19 @@ int mwifiex_get_debug_info(struct mwifiex_private *priv, ...@@ -105,19 +105,19 @@ int mwifiex_get_debug_info(struct mwifiex_private *priv,
info->is_hs_configured = adapter->is_hs_configured; info->is_hs_configured = adapter->is_hs_configured;
info->hs_activated = adapter->hs_activated; info->hs_activated = adapter->hs_activated;
info->num_cmd_host_to_card_failure info->num_cmd_host_to_card_failure
= adapter->dbg.num_cmd_host_to_card_failure; = adapter->dbg.num_cmd_host_to_card_failure;
info->num_cmd_sleep_cfm_host_to_card_failure info->num_cmd_sleep_cfm_host_to_card_failure
= adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure; = adapter->dbg.num_cmd_sleep_cfm_host_to_card_failure;
info->num_tx_host_to_card_failure info->num_tx_host_to_card_failure
= adapter->dbg.num_tx_host_to_card_failure; = adapter->dbg.num_tx_host_to_card_failure;
info->num_event_deauth = adapter->dbg.num_event_deauth; info->num_event_deauth = adapter->dbg.num_event_deauth;
info->num_event_disassoc = adapter->dbg.num_event_disassoc; info->num_event_disassoc = adapter->dbg.num_event_disassoc;
info->num_event_link_lost = adapter->dbg.num_event_link_lost; info->num_event_link_lost = adapter->dbg.num_event_link_lost;
info->num_cmd_deauth = adapter->dbg.num_cmd_deauth; info->num_cmd_deauth = adapter->dbg.num_cmd_deauth;
info->num_cmd_assoc_success = info->num_cmd_assoc_success =
adapter->dbg.num_cmd_assoc_success; adapter->dbg.num_cmd_assoc_success;
info->num_cmd_assoc_failure = info->num_cmd_assoc_failure =
adapter->dbg.num_cmd_assoc_failure; adapter->dbg.num_cmd_assoc_failure;
info->num_tx_timeout = adapter->dbg.num_tx_timeout; info->num_tx_timeout = adapter->dbg.num_tx_timeout;
info->num_cmd_timeout = adapter->dbg.num_cmd_timeout; info->num_cmd_timeout = adapter->dbg.num_cmd_timeout;
info->timeout_cmd_id = adapter->dbg.timeout_cmd_id; info->timeout_cmd_id = adapter->dbg.timeout_cmd_id;
...@@ -160,7 +160,7 @@ int mwifiex_recv_packet(struct mwifiex_adapter *adapter, struct sk_buff *skb) ...@@ -160,7 +160,7 @@ int mwifiex_recv_packet(struct mwifiex_adapter *adapter, struct sk_buff *skb)
rx_info = MWIFIEX_SKB_RXCB(skb); rx_info = MWIFIEX_SKB_RXCB(skb);
priv = mwifiex_get_priv_by_id(adapter, rx_info->bss_num, priv = mwifiex_get_priv_by_id(adapter, rx_info->bss_num,
rx_info->bss_type); rx_info->bss_type);
if (!priv) if (!priv)
return -1; return -1;
...@@ -191,7 +191,7 @@ int mwifiex_complete_cmd(struct mwifiex_adapter *adapter, ...@@ -191,7 +191,7 @@ int mwifiex_complete_cmd(struct mwifiex_adapter *adapter,
{ {
atomic_dec(&adapter->cmd_pending); atomic_dec(&adapter->cmd_pending);
dev_dbg(adapter->dev, "cmd completed: status=%d\n", dev_dbg(adapter->dev, "cmd completed: status=%d\n",
adapter->cmd_wait_q.status); adapter->cmd_wait_q.status);
*(cmd_node->condition) = true; *(cmd_node->condition) = true;
......
...@@ -87,15 +87,15 @@ mwifiex_wmm_ac_debug_print(const struct ieee_types_wmm_ac_parameters *ac_param) ...@@ -87,15 +87,15 @@ mwifiex_wmm_ac_debug_print(const struct ieee_types_wmm_ac_parameters *ac_param)
const char *ac_str[] = { "BK", "BE", "VI", "VO" }; const char *ac_str[] = { "BK", "BE", "VI", "VO" };
pr_debug("info: WMM AC_%s: ACI=%d, ACM=%d, Aifsn=%d, " pr_debug("info: WMM AC_%s: ACI=%d, ACM=%d, Aifsn=%d, "
"EcwMin=%d, EcwMax=%d, TxopLimit=%d\n", "EcwMin=%d, EcwMax=%d, TxopLimit=%d\n",
ac_str[wmm_aci_to_qidx_map[(ac_param->aci_aifsn_bitmap ac_str[wmm_aci_to_qidx_map[(ac_param->aci_aifsn_bitmap
& MWIFIEX_ACI) >> 5]], & MWIFIEX_ACI) >> 5]],
(ac_param->aci_aifsn_bitmap & MWIFIEX_ACI) >> 5, (ac_param->aci_aifsn_bitmap & MWIFIEX_ACI) >> 5,
(ac_param->aci_aifsn_bitmap & MWIFIEX_ACM) >> 4, (ac_param->aci_aifsn_bitmap & MWIFIEX_ACM) >> 4,
ac_param->aci_aifsn_bitmap & MWIFIEX_AIFSN, ac_param->aci_aifsn_bitmap & MWIFIEX_AIFSN,
ac_param->ecw_bitmap & MWIFIEX_ECW_MIN, ac_param->ecw_bitmap & MWIFIEX_ECW_MIN,
(ac_param->ecw_bitmap & MWIFIEX_ECW_MAX) >> 4, (ac_param->ecw_bitmap & MWIFIEX_ECW_MAX) >> 4,
le16_to_cpu(ac_param->tx_op_limit)); le16_to_cpu(ac_param->tx_op_limit));
} }
/* /*
...@@ -112,7 +112,7 @@ mwifiex_wmm_allocate_ralist_node(struct mwifiex_adapter *adapter, u8 *ra) ...@@ -112,7 +112,7 @@ mwifiex_wmm_allocate_ralist_node(struct mwifiex_adapter *adapter, u8 *ra)
if (!ra_list) { if (!ra_list) {
dev_err(adapter->dev, "%s: failed to alloc ra_list\n", dev_err(adapter->dev, "%s: failed to alloc ra_list\n",
__func__); __func__);
return NULL; return NULL;
} }
INIT_LIST_HEAD(&ra_list->list); INIT_LIST_HEAD(&ra_list->list);
...@@ -154,7 +154,7 @@ mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra) ...@@ -154,7 +154,7 @@ mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra)
ra_list, ra_list->is_11n_enabled); ra_list, ra_list->is_11n_enabled);
list_add_tail(&ra_list->list, list_add_tail(&ra_list->list,
&priv->wmm.tid_tbl_ptr[i].ra_list); &priv->wmm.tid_tbl_ptr[i].ra_list);
if (!priv->wmm.tid_tbl_ptr[i].ra_list_curr) if (!priv->wmm.tid_tbl_ptr[i].ra_list_curr)
priv->wmm.tid_tbl_ptr[i].ra_list_curr = ra_list; priv->wmm.tid_tbl_ptr[i].ra_list_curr = ra_list;
...@@ -217,22 +217,19 @@ mwifiex_wmm_setup_queue_priorities(struct mwifiex_private *priv, ...@@ -217,22 +217,19 @@ 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]);
} }
...@@ -312,13 +309,14 @@ mwifiex_wmm_setup_ac_downgrade(struct mwifiex_private *priv) ...@@ -312,13 +309,14 @@ mwifiex_wmm_setup_ac_downgrade(struct mwifiex_private *priv)
/* WMM is not enabled, default priorities */ /* WMM is not enabled, default priorities */
for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++) for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++)
priv->wmm.ac_down_graded_vals[ac_val] = priv->wmm.ac_down_graded_vals[ac_val] =
(enum mwifiex_wmm_ac_e) ac_val; (enum mwifiex_wmm_ac_e) ac_val;
} else { } else {
for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++) { for (ac_val = WMM_AC_BK; ac_val <= WMM_AC_VO; ac_val++) {
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]);
} }
} }
...@@ -394,13 +392,13 @@ mwifiex_wmm_init(struct mwifiex_adapter *adapter) ...@@ -394,13 +392,13 @@ mwifiex_wmm_init(struct mwifiex_adapter *adapter)
} }
priv->aggr_prio_tbl[6].amsdu priv->aggr_prio_tbl[6].amsdu
= priv->aggr_prio_tbl[6].ampdu_ap = priv->aggr_prio_tbl[6].ampdu_ap
= priv->aggr_prio_tbl[6].ampdu_user = priv->aggr_prio_tbl[6].ampdu_user
= BA_STREAM_NOT_ALLOWED; = BA_STREAM_NOT_ALLOWED;
priv->aggr_prio_tbl[7].amsdu = priv->aggr_prio_tbl[7].ampdu_ap priv->aggr_prio_tbl[7].amsdu = priv->aggr_prio_tbl[7].ampdu_ap
= priv->aggr_prio_tbl[7].ampdu_user = priv->aggr_prio_tbl[7].ampdu_user
= BA_STREAM_NOT_ALLOWED; = BA_STREAM_NOT_ALLOWED;
priv->add_ba_param.timeout = MWIFIEX_DEFAULT_BLOCK_ACK_TIMEOUT; priv->add_ba_param.timeout = MWIFIEX_DEFAULT_BLOCK_ACK_TIMEOUT;
priv->add_ba_param.tx_win_size = MWIFIEX_AMPDU_DEF_TXWINSIZE; priv->add_ba_param.tx_win_size = MWIFIEX_AMPDU_DEF_TXWINSIZE;
...@@ -472,7 +470,7 @@ static void mwifiex_wmm_cleanup_queues(struct mwifiex_private *priv) ...@@ -472,7 +470,7 @@ static void mwifiex_wmm_cleanup_queues(struct mwifiex_private *priv)
for (i = 0; i < MAX_NUM_TID; i++) for (i = 0; i < MAX_NUM_TID; i++)
mwifiex_wmm_del_pkts_in_ralist(priv, &priv->wmm.tid_tbl_ptr[i]. mwifiex_wmm_del_pkts_in_ralist(priv, &priv->wmm.tid_tbl_ptr[i].
ra_list); ra_list);
atomic_set(&priv->wmm.tx_pkts_queued, 0); atomic_set(&priv->wmm.tx_pkts_queued, 0);
atomic_set(&priv->wmm.highest_queued_prio, HIGH_PRIO_TID); atomic_set(&priv->wmm.highest_queued_prio, HIGH_PRIO_TID);
...@@ -488,9 +486,10 @@ static void mwifiex_wmm_delete_all_ralist(struct mwifiex_private *priv) ...@@ -488,9 +486,10 @@ static void mwifiex_wmm_delete_all_ralist(struct mwifiex_private *priv)
for (i = 0; i < MAX_NUM_TID; ++i) { for (i = 0; i < MAX_NUM_TID; ++i) {
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);
} }
...@@ -652,7 +651,7 @@ mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv, ...@@ -652,7 +651,7 @@ mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv,
if (atomic_read(&priv->wmm.highest_queued_prio) < if (atomic_read(&priv->wmm.highest_queued_prio) <
tos_to_tid_inv[tid_down]) tos_to_tid_inv[tid_down])
atomic_set(&priv->wmm.highest_queued_prio, atomic_set(&priv->wmm.highest_queued_prio,
tos_to_tid_inv[tid_down]); tos_to_tid_inv[tid_down]);
spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags); spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags);
} }
...@@ -681,7 +680,7 @@ int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, ...@@ -681,7 +680,7 @@ int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv,
struct mwifiex_wmm_ac_status *ac_status; struct mwifiex_wmm_ac_status *ac_status;
dev_dbg(priv->adapter->dev, "info: WMM: WMM_GET_STATUS cmdresp received: %d\n", dev_dbg(priv->adapter->dev, "info: WMM: WMM_GET_STATUS cmdresp received: %d\n",
resp_len); resp_len);
while ((resp_len >= sizeof(tlv_hdr->header)) && valid) { while ((resp_len >= sizeof(tlv_hdr->header)) && valid) {
tlv_hdr = (struct mwifiex_ie_types_data *) curr; tlv_hdr = (struct mwifiex_ie_types_data *) curr;
...@@ -695,15 +694,15 @@ int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, ...@@ -695,15 +694,15 @@ int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv,
dev_dbg(priv->adapter->dev, dev_dbg(priv->adapter->dev,
"info: CMD_RESP: WMM_GET_STATUS:" "info: CMD_RESP: WMM_GET_STATUS:"
" QSTATUS TLV: %d, %d, %d\n", " QSTATUS TLV: %d, %d, %d\n",
tlv_wmm_qstatus->queue_index, tlv_wmm_qstatus->queue_index,
tlv_wmm_qstatus->flow_required, tlv_wmm_qstatus->flow_required,
tlv_wmm_qstatus->disabled); tlv_wmm_qstatus->disabled);
ac_status = &priv->wmm.ac_status[tlv_wmm_qstatus-> ac_status = &priv->wmm.ac_status[tlv_wmm_qstatus->
queue_index]; queue_index];
ac_status->disabled = tlv_wmm_qstatus->disabled; ac_status->disabled = tlv_wmm_qstatus->disabled;
ac_status->flow_required = ac_status->flow_required =
tlv_wmm_qstatus->flow_required; tlv_wmm_qstatus->flow_required;
ac_status->flow_created = tlv_wmm_qstatus->flow_created; ac_status->flow_created = tlv_wmm_qstatus->flow_created;
break; break;
...@@ -772,29 +771,27 @@ mwifiex_wmm_process_association_req(struct mwifiex_private *priv, ...@@ -772,29 +771,27 @@ 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]);
memcpy(wmm_tlv->wmm_ie, &wmm_info_ie[2], memcpy(wmm_tlv->wmm_ie, &wmm_info_ie[2],
le16_to_cpu(wmm_tlv->header.len)); le16_to_cpu(wmm_tlv->header.len));
if (wmm_ie->qos_info_bitmap & IEEE80211_WMM_IE_AP_QOSINFO_UAPSD) if (wmm_ie->qos_info_bitmap & IEEE80211_WMM_IE_AP_QOSINFO_UAPSD)
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);
*assoc_buf += ret_len; *assoc_buf += ret_len;
} }
...@@ -813,7 +810,7 @@ mwifiex_wmm_process_association_req(struct mwifiex_private *priv, ...@@ -813,7 +810,7 @@ mwifiex_wmm_process_association_req(struct mwifiex_private *priv,
*/ */
u8 u8
mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv, mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv,
const struct sk_buff *skb) const struct sk_buff *skb)
{ {
u8 ret_val; u8 ret_val;
struct timeval out_tstamp, in_tstamp; struct timeval out_tstamp, in_tstamp;
...@@ -857,11 +854,11 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter, ...@@ -857,11 +854,11 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
for (j = adapter->priv_num - 1; j >= 0; --j) { for (j = adapter->priv_num - 1; j >= 0; --j) {
spin_lock_irqsave(&adapter->bss_prio_tbl[j].bss_prio_lock, spin_lock_irqsave(&adapter->bss_prio_tbl[j].bss_prio_lock,
flags); flags);
is_list_empty = list_empty(&adapter->bss_prio_tbl[j] is_list_empty = list_empty(&adapter->bss_prio_tbl[j]
.bss_prio_head); .bss_prio_head);
spin_unlock_irqrestore(&adapter->bss_prio_tbl[j].bss_prio_lock, spin_unlock_irqrestore(&adapter->bss_prio_tbl[j].bss_prio_lock,
flags); flags);
if (is_list_empty) if (is_list_empty)
continue; continue;
...@@ -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