aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2011-04-13 20:27:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-14 15:35:13 -0400
commit572e8f3ead47ad223fb428a4f1db986317e8e0ec (patch)
treeb5542aa018fad9705b229d695e84e4c194f7ccc3 /drivers/net/wireless/mwifiex
parent19a898601ad192d8c59c3a8f1a4501919f53b94d (diff)
mwifiex: remove unused function parameters
Some function parameters become useless after previous cleanup changes. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r--drivers/net/wireless/mwifiex/11n.c13
-rw-r--r--drivers/net/wireless/mwifiex/11n.h50
-rw-r--r--drivers/net/wireless/mwifiex/11n_aggr.c5
-rw-r--r--drivers/net/wireless/mwifiex/11n_rxreorder.c6
-rw-r--r--drivers/net/wireless/mwifiex/11n_rxreorder.h6
-rw-r--r--drivers/net/wireless/mwifiex/cfp.c9
-rw-r--r--drivers/net/wireless/mwifiex/main.h17
-rw-r--r--drivers/net/wireless/mwifiex/scan.c7
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c18
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmd.c40
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmdresp.c13
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c7
-rw-r--r--drivers/net/wireless/mwifiex/wmm.c17
-rw-r--r--drivers/net/wireless/mwifiex/wmm.h8
14 files changed, 80 insertions, 136 deletions
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
index c57107a860d1..d64065ff235c 100644
--- a/drivers/net/wireless/mwifiex/11n.c
+++ b/drivers/net/wireless/mwifiex/11n.c
@@ -242,9 +242,7 @@ int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv,
242 * 242 *
243 * Handling includes changing the header fields into CPU format. 243 * Handling includes changing the header fields into CPU format.
244 */ 244 */
245int mwifiex_ret_11n_cfg(struct mwifiex_private *priv, 245int mwifiex_ret_11n_cfg(struct host_cmd_ds_command *resp, void *data_buf)
246 struct host_cmd_ds_command *resp,
247 void *data_buf)
248{ 246{
249 struct mwifiex_ds_11n_tx_cfg *tx_cfg = NULL; 247 struct mwifiex_ds_11n_tx_cfg *tx_cfg = NULL;
250 struct host_cmd_ds_11n_cfg *htcfg = &resp->params.htcfg; 248 struct host_cmd_ds_11n_cfg *htcfg = &resp->params.htcfg;
@@ -298,8 +296,7 @@ int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv,
298 * - Setting AMSDU control parameters (for SET only) 296 * - Setting AMSDU control parameters (for SET only)
299 * - Ensuring correct endian-ness 297 * - Ensuring correct endian-ness
300 */ 298 */
301int mwifiex_cmd_amsdu_aggr_ctrl(struct mwifiex_private *priv, 299int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd,
302 struct host_cmd_ds_command *cmd,
303 int cmd_action, void *data_buf) 300 int cmd_action, void *data_buf)
304{ 301{
305 struct host_cmd_ds_amsdu_aggr_ctrl *amsdu_ctrl = 302 struct host_cmd_ds_amsdu_aggr_ctrl *amsdu_ctrl =
@@ -331,8 +328,7 @@ int mwifiex_cmd_amsdu_aggr_ctrl(struct mwifiex_private *priv,
331 * 328 *
332 * Handling includes changing the header fields into CPU format. 329 * Handling includes changing the header fields into CPU format.
333 */ 330 */
334int mwifiex_ret_amsdu_aggr_ctrl(struct mwifiex_private *priv, 331int mwifiex_ret_amsdu_aggr_ctrl(struct host_cmd_ds_command *resp,
335 struct host_cmd_ds_command *resp,
336 void *data_buf) 332 void *data_buf)
337{ 333{
338 struct mwifiex_ds_11n_amsdu_aggr_ctrl *amsdu_aggr_ctrl = NULL; 334 struct mwifiex_ds_11n_amsdu_aggr_ctrl *amsdu_aggr_ctrl = NULL;
@@ -357,8 +353,7 @@ int mwifiex_ret_amsdu_aggr_ctrl(struct mwifiex_private *priv,
357 * - Setting HT Tx capability and HT Tx information fields 353 * - Setting HT Tx capability and HT Tx information fields
358 * - Ensuring correct endian-ness 354 * - Ensuring correct endian-ness
359 */ 355 */
360int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv, 356int mwifiex_cmd_11n_cfg(struct host_cmd_ds_command *cmd,
361 struct host_cmd_ds_command *cmd,
362 u16 cmd_action, void *data_buf) 357 u16 cmd_action, void *data_buf)
363{ 358{
364 struct host_cmd_ds_11n_cfg *htcfg = &cmd->params.htcfg; 359 struct host_cmd_ds_11n_cfg *htcfg = &cmd->params.htcfg;
diff --git a/drivers/net/wireless/mwifiex/11n.h b/drivers/net/wireless/mwifiex/11n.h
index 71a853e61b61..9128d2c9638b 100644
--- a/drivers/net/wireless/mwifiex/11n.h
+++ b/drivers/net/wireless/mwifiex/11n.h
@@ -28,15 +28,9 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv,
28 struct host_cmd_ds_command *resp); 28 struct host_cmd_ds_command *resp);
29int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv, 29int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv,
30 struct host_cmd_ds_command *resp); 30 struct host_cmd_ds_command *resp);
31int mwifiex_ret_11n_cfg(struct mwifiex_private *priv, 31int mwifiex_ret_11n_cfg(struct host_cmd_ds_command *resp,
32 struct host_cmd_ds_command *resp,
33 void *data_buf); 32 void *data_buf);
34int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv, 33int mwifiex_cmd_11n_cfg(struct host_cmd_ds_command *cmd,
35 struct host_cmd_ds_command *cmd,
36 u16 cmd_action, void *data_buf);
37
38int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv,
39 struct host_cmd_ds_command *cmd,
40 u16 cmd_action, void *data_buf); 34 u16 cmd_action, void *data_buf);
41 35
42int mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv, 36int mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
@@ -67,24 +61,19 @@ int mwifiex_get_rx_reorder_tbl(struct mwifiex_private *priv,
67 struct mwifiex_ds_rx_reorder_tbl *buf); 61 struct mwifiex_ds_rx_reorder_tbl *buf);
68int mwifiex_get_tx_ba_stream_tbl(struct mwifiex_private *priv, 62int mwifiex_get_tx_ba_stream_tbl(struct mwifiex_private *priv,
69 struct mwifiex_ds_tx_ba_stream_tbl *buf); 63 struct mwifiex_ds_tx_ba_stream_tbl *buf);
70int mwifiex_ret_amsdu_aggr_ctrl(struct mwifiex_private *priv, 64int mwifiex_ret_amsdu_aggr_ctrl(struct host_cmd_ds_command *resp,
71 struct host_cmd_ds_command
72 *resp,
73 void *data_buf); 65 void *data_buf);
74int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv, 66int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv,
75 struct host_cmd_ds_command *cmd, 67 struct host_cmd_ds_command *cmd,
76 int cmd_action, void *data_buf); 68 int cmd_action, void *data_buf);
77int mwifiex_cmd_amsdu_aggr_ctrl(struct mwifiex_private *priv, 69int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd,
78 struct host_cmd_ds_command *cmd, 70 int cmd_action, void *data_buf);
79 int cmd_action,
80 void *data_buf);
81 71
82/* 72/*
83 * This function checks whether AMPDU is allowed or not for a particular TID. 73 * This function checks whether AMPDU is allowed or not for a particular TID.
84 */ 74 */
85static inline u8 75static inline u8
86mwifiex_is_ampdu_allowed(struct mwifiex_private *priv, 76mwifiex_is_ampdu_allowed(struct mwifiex_private *priv, int tid)
87 struct mwifiex_ra_list_tbl *ptr, int tid)
88{ 77{
89 return ((priv->aggr_prio_tbl[tid].ampdu_ap != BA_STREAM_NOT_ALLOWED) 78 return ((priv->aggr_prio_tbl[tid].ampdu_ap != BA_STREAM_NOT_ALLOWED)
90 ? true : false); 79 ? true : false);
@@ -94,8 +83,7 @@ mwifiex_is_ampdu_allowed(struct mwifiex_private *priv,
94 * This function checks whether AMSDU is allowed or not for a particular TID. 83 * This function checks whether AMSDU is allowed or not for a particular TID.
95 */ 84 */
96static inline u8 85static inline u8
97mwifiex_is_amsdu_allowed(struct mwifiex_private *priv, 86mwifiex_is_amsdu_allowed(struct mwifiex_private *priv, int tid)
98 struct mwifiex_ra_list_tbl *ptr, int tid)
99{ 87{
100 return (((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED) 88 return (((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED)
101 && ((priv->is_data_rate_auto) 89 && ((priv->is_data_rate_auto)
@@ -106,21 +94,18 @@ mwifiex_is_amsdu_allowed(struct mwifiex_private *priv,
106/* 94/*
107 * This function checks whether a BA stream is available or not. 95 * This function checks whether a BA stream is available or not.
108 */ 96 */
109static inline u8 97static inline u8 mwifiex_is_ba_stream_avail(struct mwifiex_adapter *adapter)
110mwifiex_is_ba_stream_avail(struct mwifiex_private *priv)
111{ 98{
112 struct mwifiex_private *pmpriv = NULL; 99 struct mwifiex_private *priv;
113 u8 i = 0; 100 u8 i;
114 u32 ba_stream_num = 0; 101 u32 ba_stream_num = 0;
115 102
116 for (i = 0; i < priv->adapter->priv_num; i++) { 103 for (i = 0; i < adapter->priv_num; i++) {
117 pmpriv = priv->adapter->priv[i]; 104 priv = adapter->priv[i];
118 if (pmpriv) 105 if (priv)
119 ba_stream_num += 106 ba_stream_num += mwifiex_wmm_list_len(
120 mwifiex_wmm_list_len(priv->adapter, 107 (struct list_head *)
121 (struct list_head 108 &priv->tx_ba_stream_tbl_ptr);
122 *) &pmpriv->
123 tx_ba_stream_tbl_ptr);
124 } 109 }
125 110
126 return ((ba_stream_num < 111 return ((ba_stream_num <
@@ -133,8 +118,7 @@ mwifiex_is_ba_stream_avail(struct mwifiex_private *priv)
133 * Upon successfully locating, both the TID and the RA are returned. 118 * Upon successfully locating, both the TID and the RA are returned.
134 */ 119 */
135static inline u8 120static inline u8
136mwifiex_find_stream_to_delete(struct mwifiex_private *priv, 121mwifiex_find_stream_to_delete(struct mwifiex_private *priv, int ptr_tid,
137 struct mwifiex_ra_list_tbl *ptr, int ptr_tid,
138 int *ptid, u8 *ra) 122 int *ptid, u8 *ra)
139{ 123{
140 int tid; 124 int tid;
diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c
index c2abced66957..c9fb0627de43 100644
--- a/drivers/net/wireless/mwifiex/11n_aggr.c
+++ b/drivers/net/wireless/mwifiex/11n_aggr.c
@@ -44,8 +44,7 @@
44 * MSDU => |DA|SA|Length|SNAP|...... ..| 44 * MSDU => |DA|SA|Length|SNAP|...... ..|
45 */ 45 */
46static int 46static int
47mwifiex_11n_form_amsdu_pkt(struct mwifiex_adapter *adapter, 47mwifiex_11n_form_amsdu_pkt(struct sk_buff *skb_aggr,
48 struct sk_buff *skb_aggr,
49 struct sk_buff *skb_src, int *pad) 48 struct sk_buff *skb_src, int *pad)
50 49
51{ 50{
@@ -324,7 +323,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
324 323
325 spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, 324 spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
326 ra_list_flags); 325 ra_list_flags);
327 mwifiex_11n_form_amsdu_pkt(adapter, skb_aggr, skb_src, &pad); 326 mwifiex_11n_form_amsdu_pkt(skb_aggr, skb_src, &pad);
328 327
329 mwifiex_write_data_complete(adapter, skb_src, 0); 328 mwifiex_write_data_complete(adapter, skb_src, 0);
330 329
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c
index 6736fc604844..755e5d533c03 100644
--- a/drivers/net/wireless/mwifiex/11n_rxreorder.c
+++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c
@@ -319,8 +319,7 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
319 * - Setting add BA request buffer 319 * - Setting add BA request buffer
320 * - Ensuring correct endian-ness 320 * - Ensuring correct endian-ness
321 */ 321 */
322int mwifiex_cmd_11n_addba_req(struct mwifiex_private *priv, 322int mwifiex_cmd_11n_addba_req(struct host_cmd_ds_command *cmd, void *data_buf)
323 struct host_cmd_ds_command *cmd, void *data_buf)
324{ 323{
325 struct host_cmd_ds_11n_addba_req *add_ba_req = 324 struct host_cmd_ds_11n_addba_req *add_ba_req =
326 (struct host_cmd_ds_11n_addba_req *) 325 (struct host_cmd_ds_11n_addba_req *)
@@ -391,8 +390,7 @@ int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv,
391 * - Setting del BA request buffer 390 * - Setting del BA request buffer
392 * - Ensuring correct endian-ness 391 * - Ensuring correct endian-ness
393 */ 392 */
394int mwifiex_cmd_11n_delba(struct mwifiex_private *priv, 393int mwifiex_cmd_11n_delba(struct host_cmd_ds_command *cmd, void *data_buf)
395 struct host_cmd_ds_command *cmd, void *data_buf)
396{ 394{
397 struct host_cmd_ds_11n_delba *del_ba = (struct host_cmd_ds_11n_delba *) 395 struct host_cmd_ds_11n_delba *del_ba = (struct host_cmd_ds_11n_delba *)
398 &cmd->params.del_ba; 396 &cmd->params.del_ba;
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.h b/drivers/net/wireless/mwifiex/11n_rxreorder.h
index 42f569035745..f3ca8c8c18f9 100644
--- a/drivers/net/wireless/mwifiex/11n_rxreorder.h
+++ b/drivers/net/wireless/mwifiex/11n_rxreorder.h
@@ -49,14 +49,12 @@ void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv,
49int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv, 49int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv,
50 struct host_cmd_ds_command 50 struct host_cmd_ds_command
51 *resp); 51 *resp);
52int mwifiex_cmd_11n_delba(struct mwifiex_private *priv, 52int mwifiex_cmd_11n_delba(struct host_cmd_ds_command *cmd,
53 struct host_cmd_ds_command *cmd,
54 void *data_buf); 53 void *data_buf);
55int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv, 54int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv,
56 struct host_cmd_ds_command 55 struct host_cmd_ds_command
57 *cmd, void *data_buf); 56 *cmd, void *data_buf);
58int mwifiex_cmd_11n_addba_req(struct mwifiex_private *priv, 57int mwifiex_cmd_11n_addba_req(struct host_cmd_ds_command *cmd,
59 struct host_cmd_ds_command *cmd,
60 void *data_buf); 58 void *data_buf);
61void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv); 59void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv);
62struct mwifiex_rx_reorder_tbl *mwifiex_11n_get_rxreorder_tbl(struct 60struct mwifiex_rx_reorder_tbl *mwifiex_11n_get_rxreorder_tbl(struct
diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c
index 07187a405fee..bb73cfe14aeb 100644
--- a/drivers/net/wireless/mwifiex/cfp.c
+++ b/drivers/net/wireless/mwifiex/cfp.c
@@ -75,8 +75,7 @@ u8 supported_rates_n[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 };
75 * This function maps an index in supported rates table into 75 * This function maps an index in supported rates table into
76 * the corresponding data rate. 76 * the corresponding data rate.
77 */ 77 */
78u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index, 78u32 mwifiex_index_to_data_rate(u8 index, u8 ht_info)
79 u8 ht_info)
80{ 79{
81 u16 mcs_rate[4][8] = { 80 u16 mcs_rate[4][8] = {
82 {0x1b, 0x36, 0x51, 0x6c, 0xa2, 0xd8, 0xf3, 0x10e} 81 {0x1b, 0x36, 0x51, 0x6c, 0xa2, 0xd8, 0xf3, 0x10e}
@@ -126,7 +125,7 @@ u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
126 * This function maps a data rate value into corresponding index in supported 125 * This function maps a data rate value into corresponding index in supported
127 * rates table. 126 * rates table.
128 */ 127 */
129u8 mwifiex_data_rate_to_index(struct mwifiex_adapter *adapter, u32 rate) 128u8 mwifiex_data_rate_to_index(u32 rate)
130{ 129{
131 u16 *ptr; 130 u16 *ptr;
132 131
@@ -265,9 +264,7 @@ mwifiex_is_rate_auto(struct mwifiex_private *priv)
265/* 264/*
266 * This function converts rate bitmap into rate index. 265 * This function converts rate bitmap into rate index.
267 */ 266 */
268int 267int mwifiex_get_rate_index(u16 *rate_bitmap, int size)
269mwifiex_get_rate_index(struct mwifiex_adapter *adapter, u16 *rate_bitmap,
270 int size)
271{ 268{
272 int i; 269 int i;
273 270
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 7ead15e1967e..2d296dcc210e 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -767,8 +767,7 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *, struct sk_buff *skb);
767int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta); 767int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta);
768int mwifiex_scan_networks(struct mwifiex_private *priv, 768int mwifiex_scan_networks(struct mwifiex_private *priv,
769 const struct mwifiex_user_scan_cfg *user_scan_in); 769 const struct mwifiex_user_scan_cfg *user_scan_in);
770int mwifiex_cmd_802_11_scan(struct mwifiex_private *priv, 770int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd,
771 struct host_cmd_ds_command *cmd,
772 void *data_buf); 771 void *data_buf);
773void mwifiex_queue_scan_cmd(struct mwifiex_private *priv, 772void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
774 struct cmd_ctrl_node *cmd_node); 773 struct cmd_ctrl_node *cmd_node);
@@ -806,9 +805,7 @@ int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
806 void *data_buf); 805 void *data_buf);
807int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv, 806int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv,
808 struct host_cmd_ds_command *resp); 807 struct host_cmd_ds_command *resp);
809int mwifiex_cmd_802_11_bg_scan_query(struct mwifiex_private *priv, 808int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd);
810 struct host_cmd_ds_command *cmd,
811 void *data_buf);
812struct mwifiex_chan_freq_power * 809struct mwifiex_chan_freq_power *
813 mwifiex_get_cfp_by_band_and_channel_from_cfg80211( 810 mwifiex_get_cfp_by_band_and_channel_from_cfg80211(
814 struct mwifiex_private *priv, 811 struct mwifiex_private *priv,
@@ -816,20 +813,16 @@ struct mwifiex_chan_freq_power *
816struct mwifiex_chan_freq_power *mwifiex_get_cfp_by_band_and_freq_from_cfg80211( 813struct mwifiex_chan_freq_power *mwifiex_get_cfp_by_band_and_freq_from_cfg80211(
817 struct mwifiex_private *priv, 814 struct mwifiex_private *priv,
818 u8 band, u32 freq); 815 u8 band, u32 freq);
819u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index, 816u32 mwifiex_index_to_data_rate(u8 index, u8 ht_info);
820 u8 ht_info);
821u32 mwifiex_find_freq_from_band_chan(u8, u8); 817u32 mwifiex_find_freq_from_band_chan(u8, u8);
822int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, 818int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask,
823 u8 **buffer); 819 u8 **buffer);
824u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
825 u8 ht_info);
826u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv, 820u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv,
827 u8 *rates); 821 u8 *rates);
828u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates); 822u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates);
829u8 mwifiex_data_rate_to_index(struct mwifiex_adapter *adapter, u32 rate); 823u8 mwifiex_data_rate_to_index(u32 rate);
830u8 mwifiex_is_rate_auto(struct mwifiex_private *priv); 824u8 mwifiex_is_rate_auto(struct mwifiex_private *priv);
831int mwifiex_get_rate_index(struct mwifiex_adapter *adapter, 825int mwifiex_get_rate_index(u16 *rateBitmap, int size);
832 u16 *rateBitmap, int size);
833extern u16 region_code_index[MWIFIEX_MAX_REGION_CODE]; 826extern u16 region_code_index[MWIFIEX_MAX_REGION_CODE];
834void mwifiex_save_curr_bcn(struct mwifiex_private *priv); 827void mwifiex_save_curr_bcn(struct mwifiex_private *priv);
835void mwifiex_free_curr_bcn(struct mwifiex_private *priv); 828void mwifiex_free_curr_bcn(struct mwifiex_private *priv);
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 12fe021536d1..84742715893f 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -2364,8 +2364,7 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
2364 * - Setting command ID, and proper size 2364 * - Setting command ID, and proper size
2365 * - Ensuring correct endian-ness 2365 * - Ensuring correct endian-ness
2366 */ 2366 */
2367int mwifiex_cmd_802_11_scan(struct mwifiex_private *priv, 2367int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd, void *data_buf)
2368 struct host_cmd_ds_command *cmd, void *data_buf)
2369{ 2368{
2370 struct host_cmd_ds_802_11_scan *scan_cmd = &cmd->params.scan; 2369 struct host_cmd_ds_802_11_scan *scan_cmd = &cmd->params.scan;
2371 struct mwifiex_scan_cmd_config *scan_cfg; 2370 struct mwifiex_scan_cmd_config *scan_cfg;
@@ -2658,9 +2657,7 @@ done:
2658 * - Setting background scan flush parameter 2657 * - Setting background scan flush parameter
2659 * - Ensuring correct endian-ness 2658 * - Ensuring correct endian-ness
2660 */ 2659 */
2661int mwifiex_cmd_802_11_bg_scan_query(struct mwifiex_private *priv, 2660int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd)
2662 struct host_cmd_ds_command *cmd,
2663 void *data_buf)
2664{ 2661{
2665 struct host_cmd_ds_802_11_bg_scan_query *bg_query = 2662 struct host_cmd_ds_802_11_bg_scan_query *bg_query =
2666 &cmd->params.bg_scan_query; 2663 &cmd->params.bg_scan_query;
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index fa46df509757..41c087d3f0f5 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -282,7 +282,7 @@ mwifiex_read_reg(struct mwifiex_adapter *adapter, u32 reg, u32 *data)
282 */ 282 */
283static int 283static int
284mwifiex_write_data_sync(struct mwifiex_adapter *adapter, 284mwifiex_write_data_sync(struct mwifiex_adapter *adapter,
285 u8 *buffer, u32 pkt_len, u32 port, u32 timeout) 285 u8 *buffer, u32 pkt_len, u32 port)
286{ 286{
287 struct sdio_mmc_card *card = adapter->card; 287 struct sdio_mmc_card *card = adapter->card;
288 int ret = -1; 288 int ret = -1;
@@ -314,9 +314,8 @@ mwifiex_write_data_sync(struct mwifiex_adapter *adapter,
314/* 314/*
315 * This function reads multiple data from SDIO card memory. 315 * This function reads multiple data from SDIO card memory.
316 */ 316 */
317static int mwifiex_read_data_sync(struct mwifiex_adapter *adapter, 317static int mwifiex_read_data_sync(struct mwifiex_adapter *adapter, u8 *buffer,
318 u8 *buffer, u32 len, 318 u32 len, u32 port, u8 claim)
319 u32 port, u32 timeout, u8 claim)
320{ 319{
321 struct sdio_mmc_card *card = adapter->card; 320 struct sdio_mmc_card *card = adapter->card;
322 int ret = -1; 321 int ret = -1;
@@ -430,8 +429,7 @@ static int mwifiex_write_data_to_card(struct mwifiex_adapter *adapter,
430 int ret = 0; 429 int ret = 0;
431 430
432 do { 431 do {
433 ret = mwifiex_write_data_sync(adapter, payload, pkt_len, 432 ret = mwifiex_write_data_sync(adapter, payload, pkt_len, port);
434 port, 0);
435 if (ret) { 433 if (ret) {
436 i++; 434 i++;
437 dev_err(adapter->dev, "host_to_card, write iomem" 435 dev_err(adapter->dev, "host_to_card, write iomem"
@@ -630,7 +628,7 @@ static int mwifiex_sdio_card_to_host(struct mwifiex_adapter *adapter,
630 return -1; 628 return -1;
631 } 629 }
632 630
633 ret = mwifiex_read_data_sync(adapter, buffer, npayload, ioport, 0, 1); 631 ret = mwifiex_read_data_sync(adapter, buffer, npayload, ioport, 1);
634 632
635 if (ret) { 633 if (ret) {
636 dev_err(adapter->dev, "%s: read iomem failed: %d\n", __func__, 634 dev_err(adapter->dev, "%s: read iomem failed: %d\n", __func__,
@@ -769,7 +767,7 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
769 767
770 ret = mwifiex_write_data_sync(adapter, fwbuf, tx_blocks * 768 ret = mwifiex_write_data_sync(adapter, fwbuf, tx_blocks *
771 MWIFIEX_SDIO_BLOCK_SIZE, 769 MWIFIEX_SDIO_BLOCK_SIZE,
772 adapter->ioport, 0); 770 adapter->ioport);
773 if (ret) { 771 if (ret) {
774 dev_err(adapter->dev, "FW download, write iomem (%d)" 772 dev_err(adapter->dev, "FW download, write iomem (%d)"
775 " failed @ %d\n", i, offset); 773 " failed @ %d\n", i, offset);
@@ -842,7 +840,7 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
842 unsigned long flags; 840 unsigned long flags;
843 841
844 if (mwifiex_read_data_sync(adapter, card->mp_regs, MAX_MP_REGS, 842 if (mwifiex_read_data_sync(adapter, card->mp_regs, MAX_MP_REGS,
845 REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK, 0, 843 REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK,
846 0)) { 844 0)) {
847 dev_err(adapter->dev, "read mp_regs failed\n"); 845 dev_err(adapter->dev, "read mp_regs failed\n");
848 return; 846 return;
@@ -1050,7 +1048,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
1050 card->mpa_rx.buf_len, 1048 card->mpa_rx.buf_len,
1051 (adapter->ioport | 0x1000 | 1049 (adapter->ioport | 0x1000 |
1052 (card->mpa_rx.ports << 4)) + 1050 (card->mpa_rx.ports << 4)) +
1053 card->mpa_rx.start_port, 0, 1)) 1051 card->mpa_rx.start_port, 1))
1054 return -1; 1052 return -1;
1055 1053
1056 curr_ptr = card->mpa_rx.buf; 1054 curr_ptr = card->mpa_rx.buf;
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index dec496369b95..33c8ba1f5e33 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -190,8 +190,7 @@ static int mwifiex_cmd_802_11_snmp_mib(struct mwifiex_private *priv,
190 * - Ensuring correct endian-ness 190 * - Ensuring correct endian-ness
191 */ 191 */
192static int 192static int
193mwifiex_cmd_802_11_get_log(struct mwifiex_private *priv, 193mwifiex_cmd_802_11_get_log(struct host_cmd_ds_command *cmd)
194 struct host_cmd_ds_command *cmd)
195{ 194{
196 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_GET_LOG); 195 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_GET_LOG);
197 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_get_log) + 196 cmd->size = cpu_to_le16(sizeof(struct host_cmd_ds_802_11_get_log) +
@@ -272,8 +271,7 @@ static int mwifiex_cmd_tx_rate_cfg(struct mwifiex_private *priv,
272 * (as required) 271 * (as required)
273 * - Ensuring correct endian-ness 272 * - Ensuring correct endian-ness
274 */ 273 */
275static int mwifiex_cmd_tx_power_cfg(struct mwifiex_private *priv, 274static int mwifiex_cmd_tx_power_cfg(struct host_cmd_ds_command *cmd,
276 struct host_cmd_ds_command *cmd,
277 u16 cmd_action, void *data_buf) 275 u16 cmd_action, void *data_buf)
278{ 276{
279 struct mwifiex_types_power_group *pg_tlv = NULL; 277 struct mwifiex_types_power_group *pg_tlv = NULL;
@@ -407,8 +405,7 @@ static int mwifiex_cmd_802_11_mac_address(struct mwifiex_private *priv,
407 * - Setting MAC multicast address 405 * - Setting MAC multicast address
408 * - Ensuring correct endian-ness 406 * - Ensuring correct endian-ness
409 */ 407 */
410static int mwifiex_cmd_mac_multicast_adr(struct mwifiex_private *priv, 408static int mwifiex_cmd_mac_multicast_adr(struct host_cmd_ds_command *cmd,
411 struct host_cmd_ds_command *cmd,
412 u16 cmd_action, void *data_buf) 409 u16 cmd_action, void *data_buf)
413{ 410{
414 struct mwifiex_multicast_list *mcast_list = 411 struct mwifiex_multicast_list *mcast_list =
@@ -463,8 +460,7 @@ static int mwifiex_cmd_802_11_deauthenticate(struct mwifiex_private *priv,
463 * - Setting command ID and proper size 460 * - Setting command ID and proper size
464 * - Ensuring correct endian-ness 461 * - Ensuring correct endian-ness
465 */ 462 */
466static int mwifiex_cmd_802_11_ad_hoc_stop(struct mwifiex_private *priv, 463static int mwifiex_cmd_802_11_ad_hoc_stop(struct host_cmd_ds_command *cmd)
467 struct host_cmd_ds_command *cmd)
468{ 464{
469 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_STOP); 465 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_AD_HOC_STOP);
470 cmd->size = cpu_to_le16(S_DS_GEN); 466 cmd->size = cpu_to_le16(S_DS_GEN);
@@ -777,8 +773,7 @@ static int mwifiex_cmd_802_11_rf_channel(struct mwifiex_private *priv,
777 * - Setting status to enable or disable (for SET only) 773 * - Setting status to enable or disable (for SET only)
778 * - Ensuring correct endian-ness 774 * - Ensuring correct endian-ness
779 */ 775 */
780static int mwifiex_cmd_ibss_coalescing_status(struct mwifiex_private *priv, 776static int mwifiex_cmd_ibss_coalescing_status(struct host_cmd_ds_command *cmd,
781 struct host_cmd_ds_command *cmd,
782 u16 cmd_action, void *data_buf) 777 u16 cmd_action, void *data_buf)
783{ 778{
784 struct host_cmd_ds_802_11_ibss_status *ibss_coal = 779 struct host_cmd_ds_802_11_ibss_status *ibss_coal =
@@ -946,7 +941,7 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
946 cmd_action); 941 cmd_action);
947 break; 942 break;
948 case HostCmd_CMD_MAC_MULTICAST_ADR: 943 case HostCmd_CMD_MAC_MULTICAST_ADR:
949 ret = mwifiex_cmd_mac_multicast_adr(priv, cmd_ptr, cmd_action, 944 ret = mwifiex_cmd_mac_multicast_adr(cmd_ptr, cmd_action,
950 data_buf); 945 data_buf);
951 break; 946 break;
952 case HostCmd_CMD_TX_RATE_CFG: 947 case HostCmd_CMD_TX_RATE_CFG:
@@ -954,7 +949,7 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
954 data_buf); 949 data_buf);
955 break; 950 break;
956 case HostCmd_CMD_TXPWR_CFG: 951 case HostCmd_CMD_TXPWR_CFG:
957 ret = mwifiex_cmd_tx_power_cfg(priv, cmd_ptr, cmd_action, 952 ret = mwifiex_cmd_tx_power_cfg(cmd_ptr, cmd_action,
958 data_buf); 953 data_buf);
959 break; 954 break;
960 case HostCmd_CMD_802_11_PS_MODE_ENH: 955 case HostCmd_CMD_802_11_PS_MODE_ENH:
@@ -966,11 +961,10 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
966 (struct mwifiex_hs_config_param *) data_buf); 961 (struct mwifiex_hs_config_param *) data_buf);
967 break; 962 break;
968 case HostCmd_CMD_802_11_SCAN: 963 case HostCmd_CMD_802_11_SCAN:
969 ret = mwifiex_cmd_802_11_scan(priv, cmd_ptr, data_buf); 964 ret = mwifiex_cmd_802_11_scan(cmd_ptr, data_buf);
970 break; 965 break;
971 case HostCmd_CMD_802_11_BG_SCAN_QUERY: 966 case HostCmd_CMD_802_11_BG_SCAN_QUERY:
972 ret = mwifiex_cmd_802_11_bg_scan_query(priv, cmd_ptr, 967 ret = mwifiex_cmd_802_11_bg_scan_query(cmd_ptr);
973 data_buf);
974 break; 968 break;
975 case HostCmd_CMD_802_11_ASSOCIATE: 969 case HostCmd_CMD_802_11_ASSOCIATE:
976 ret = mwifiex_cmd_802_11_associate(priv, cmd_ptr, data_buf); 970 ret = mwifiex_cmd_802_11_associate(priv, cmd_ptr, data_buf);
@@ -984,14 +978,14 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
984 data_buf); 978 data_buf);
985 break; 979 break;
986 case HostCmd_CMD_802_11_GET_LOG: 980 case HostCmd_CMD_802_11_GET_LOG:
987 ret = mwifiex_cmd_802_11_get_log(priv, cmd_ptr); 981 ret = mwifiex_cmd_802_11_get_log(cmd_ptr);
988 break; 982 break;
989 case HostCmd_CMD_802_11_AD_HOC_JOIN: 983 case HostCmd_CMD_802_11_AD_HOC_JOIN:
990 ret = mwifiex_cmd_802_11_ad_hoc_join(priv, cmd_ptr, 984 ret = mwifiex_cmd_802_11_ad_hoc_join(priv, cmd_ptr,
991 data_buf); 985 data_buf);
992 break; 986 break;
993 case HostCmd_CMD_802_11_AD_HOC_STOP: 987 case HostCmd_CMD_802_11_AD_HOC_STOP:
994 ret = mwifiex_cmd_802_11_ad_hoc_stop(priv, cmd_ptr); 988 ret = mwifiex_cmd_802_11_ad_hoc_stop(cmd_ptr);
995 break; 989 break;
996 case HostCmd_CMD_RSSI_INFO: 990 case HostCmd_CMD_RSSI_INFO:
997 ret = mwifiex_cmd_802_11_rssi_info(priv, cmd_ptr, cmd_action); 991 ret = mwifiex_cmd_802_11_rssi_info(priv, cmd_ptr, cmd_action);
@@ -1036,10 +1030,10 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
1036 cmd_ptr->size = cpu_to_le16(S_DS_GEN); 1030 cmd_ptr->size = cpu_to_le16(S_DS_GEN);
1037 break; 1031 break;
1038 case HostCmd_CMD_11N_ADDBA_REQ: 1032 case HostCmd_CMD_11N_ADDBA_REQ:
1039 ret = mwifiex_cmd_11n_addba_req(priv, cmd_ptr, data_buf); 1033 ret = mwifiex_cmd_11n_addba_req(cmd_ptr, data_buf);
1040 break; 1034 break;
1041 case HostCmd_CMD_11N_DELBA: 1035 case HostCmd_CMD_11N_DELBA:
1042 ret = mwifiex_cmd_11n_delba(priv, cmd_ptr, data_buf); 1036 ret = mwifiex_cmd_11n_delba(cmd_ptr, data_buf);
1043 break; 1037 break;
1044 case HostCmd_CMD_11N_ADDBA_RSP: 1038 case HostCmd_CMD_11N_ADDBA_RSP:
1045 ret = mwifiex_cmd_11n_addba_rsp_gen(priv, cmd_ptr, data_buf); 1039 ret = mwifiex_cmd_11n_addba_rsp_gen(priv, cmd_ptr, data_buf);
@@ -1058,11 +1052,11 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
1058 data_buf); 1052 data_buf);
1059 break; 1053 break;
1060 case HostCmd_CMD_AMSDU_AGGR_CTRL: 1054 case HostCmd_CMD_AMSDU_AGGR_CTRL:
1061 ret = mwifiex_cmd_amsdu_aggr_ctrl(priv, cmd_ptr, cmd_action, 1055 ret = mwifiex_cmd_amsdu_aggr_ctrl(cmd_ptr, cmd_action,
1062 data_buf); 1056 data_buf);
1063 break; 1057 break;
1064 case HostCmd_CMD_11N_CFG: 1058 case HostCmd_CMD_11N_CFG:
1065 ret = mwifiex_cmd_11n_cfg(priv, cmd_ptr, cmd_action, 1059 ret = mwifiex_cmd_11n_cfg(cmd_ptr, cmd_action,
1066 data_buf); 1060 data_buf);
1067 break; 1061 break;
1068 case HostCmd_CMD_WMM_GET_STATUS: 1062 case HostCmd_CMD_WMM_GET_STATUS:
@@ -1075,8 +1069,8 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
1075 ret = 0; 1069 ret = 0;
1076 break; 1070 break;
1077 case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS: 1071 case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS:
1078 ret = mwifiex_cmd_ibss_coalescing_status(priv, cmd_ptr, 1072 ret = mwifiex_cmd_ibss_coalescing_status(cmd_ptr, cmd_action,
1079 cmd_action, data_buf); 1073 data_buf);
1080 break; 1074 break;
1081 case HostCmd_CMD_MAC_REG_ACCESS: 1075 case HostCmd_CMD_MAC_REG_ACCESS:
1082 case HostCmd_CMD_BBP_REG_ACCESS: 1076 case HostCmd_CMD_BBP_REG_ACCESS:
diff --git a/drivers/net/wireless/mwifiex/sta_cmdresp.c b/drivers/net/wireless/mwifiex/sta_cmdresp.c
index 20ce8cb39186..7f4f10b752fb 100644
--- a/drivers/net/wireless/mwifiex/sta_cmdresp.c
+++ b/drivers/net/wireless/mwifiex/sta_cmdresp.c
@@ -280,7 +280,6 @@ static int mwifiex_ret_tx_rate_cfg(struct mwifiex_private *priv,
280 struct host_cmd_ds_command *resp, 280 struct host_cmd_ds_command *resp,
281 void *data_buf) 281 void *data_buf)
282{ 282{
283 struct mwifiex_adapter *adapter = priv->adapter;
284 struct mwifiex_rate_cfg *ds_rate = NULL; 283 struct mwifiex_rate_cfg *ds_rate = NULL;
285 struct host_cmd_ds_tx_rate_cfg *rate_cfg = &resp->params.tx_rate_cfg; 284 struct host_cmd_ds_tx_rate_cfg *rate_cfg = &resp->params.tx_rate_cfg;
286 struct mwifiex_rate_scope *rate_scope; 285 struct mwifiex_rate_scope *rate_scope;
@@ -336,9 +335,7 @@ static int mwifiex_ret_tx_rate_cfg(struct mwifiex_private *priv,
336 if (priv->is_data_rate_auto) { 335 if (priv->is_data_rate_auto) {
337 ds_rate->is_rate_auto = 1; 336 ds_rate->is_rate_auto = 1;
338 } else { 337 } else {
339 ds_rate->rate = 338 ds_rate->rate = mwifiex_get_rate_index(priv->
340 mwifiex_get_rate_index(adapter,
341 priv->
342 bitmap_rates, 339 bitmap_rates,
343 sizeof(priv-> 340 sizeof(priv->
344 bitmap_rates)); 341 bitmap_rates));
@@ -514,13 +511,11 @@ static int mwifiex_ret_mac_multicast_adr(struct mwifiex_private *priv,
514static int mwifiex_ret_802_11_tx_rate_query(struct mwifiex_private *priv, 511static int mwifiex_ret_802_11_tx_rate_query(struct mwifiex_private *priv,
515 struct host_cmd_ds_command *resp) 512 struct host_cmd_ds_command *resp)
516{ 513{
517 struct mwifiex_adapter *adapter = priv->adapter;
518
519 priv->tx_rate = resp->params.tx_rate.tx_rate; 514 priv->tx_rate = resp->params.tx_rate.tx_rate;
520 priv->tx_htinfo = resp->params.tx_rate.ht_info; 515 priv->tx_htinfo = resp->params.tx_rate.ht_info;
521 if (!priv->is_data_rate_auto) 516 if (!priv->is_data_rate_auto)
522 priv->data_rate = 517 priv->data_rate =
523 mwifiex_index_to_data_rate(adapter, priv->tx_rate, 518 mwifiex_index_to_data_rate(priv->tx_rate,
524 priv->tx_htinfo); 519 priv->tx_htinfo);
525 520
526 return 0; 521 return 0;
@@ -946,7 +941,7 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv,
946 mp_end_port)); 941 mp_end_port));
947 break; 942 break;
948 case HostCmd_CMD_AMSDU_AGGR_CTRL: 943 case HostCmd_CMD_AMSDU_AGGR_CTRL:
949 ret = mwifiex_ret_amsdu_aggr_ctrl(priv, resp, data_buf); 944 ret = mwifiex_ret_amsdu_aggr_ctrl(resp, data_buf);
950 break; 945 break;
951 case HostCmd_CMD_WMM_GET_STATUS: 946 case HostCmd_CMD_WMM_GET_STATUS:
952 ret = mwifiex_ret_wmm_get_status(priv, resp); 947 ret = mwifiex_ret_wmm_get_status(priv, resp);
@@ -965,7 +960,7 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv,
965 case HostCmd_CMD_SET_BSS_MODE: 960 case HostCmd_CMD_SET_BSS_MODE:
966 break; 961 break;
967 case HostCmd_CMD_11N_CFG: 962 case HostCmd_CMD_11N_CFG:
968 ret = mwifiex_ret_11n_cfg(priv, resp, data_buf); 963 ret = mwifiex_ret_11n_cfg(resp, data_buf);
969 break; 964 break;
970 default: 965 default:
971 dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n", 966 dev_err(adapter->dev, "CMD_RESP: unknown cmd response %#x\n",
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 5f2ce9459d26..6489f264ef5f 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -812,8 +812,7 @@ static int mwifiex_rate_ioctl_set_rate_value(struct mwifiex_private *priv,
812 } 812 }
813 memset(bitmap_rates, 0, sizeof(bitmap_rates)); 813 memset(bitmap_rates, 0, sizeof(bitmap_rates));
814 814
815 rate_index = 815 rate_index = mwifiex_data_rate_to_index(rate_cfg->rate);
816 mwifiex_data_rate_to_index(adapter, rate_cfg->rate);
817 816
818 /* Only allow b/g rates to be set */ 817 /* Only allow b/g rates to be set */
819 if (rate_index >= MWIFIEX_RATE_INDEX_HRDSSS0 && 818 if (rate_index >= MWIFIEX_RATE_INDEX_HRDSSS0 &&
@@ -874,8 +873,8 @@ int mwifiex_drv_get_data_rate(struct mwifiex_private *priv,
874 873
875 if (!ret) { 874 if (!ret) {
876 if (rate && rate->is_rate_auto) 875 if (rate && rate->is_rate_auto)
877 rate->rate = mwifiex_index_to_data_rate(priv->adapter, 876 rate->rate = mwifiex_index_to_data_rate(priv->tx_rate,
878 priv->tx_rate, priv->tx_htinfo); 877 priv->tx_htinfo);
879 else if (rate) 878 else if (rate)
880 rate->rate = priv->data_rate; 879 rate->rate = priv->data_rate;
881 } else { 880 } else {
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index 6ce6f94e222b..57b98c59235d 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -177,8 +177,7 @@ static void mwifiex_wmm_default_queue_priorities(struct mwifiex_private *priv)
177 * This function map ACs to TIDs. 177 * This function map ACs to TIDs.
178 */ 178 */
179static void 179static void
180mwifiex_wmm_queue_priorities_tid(struct mwifiex_private *priv, 180mwifiex_wmm_queue_priorities_tid(u8 queue_priority[])
181 u8 queue_priority[])
182{ 181{
183 int i; 182 int i;
184 183
@@ -247,7 +246,7 @@ mwifiex_wmm_setup_queue_priorities(struct mwifiex_private *priv,
247 } 246 }
248 } 247 }
249 248
250 mwifiex_wmm_queue_priorities_tid(priv, priv->wmm.queue_priority); 249 mwifiex_wmm_queue_priorities_tid(priv->wmm.queue_priority);
251} 250}
252 251
253/* 252/*
@@ -416,7 +415,7 @@ mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter)
416 priv = adapter->priv[j]; 415 priv = adapter->priv[j];
417 if (priv) { 416 if (priv) {
418 for (i = 0; i < MAX_NUM_TID; i++) 417 for (i = 0; i < MAX_NUM_TID; i++)
419 if (!mwifiex_wmm_is_ra_list_empty(adapter, 418 if (!mwifiex_wmm_is_ra_list_empty(
420 &priv->wmm.tid_tbl_ptr[i].ra_list)) 419 &priv->wmm.tid_tbl_ptr[i].ra_list))
421 return false; 420 return false;
422 } 421 }
@@ -1161,7 +1160,7 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter)
1161 if (!ptr) 1160 if (!ptr)
1162 return -1; 1161 return -1;
1163 1162
1164 tid = mwifiex_get_tid(priv->adapter, ptr); 1163 tid = mwifiex_get_tid(ptr);
1165 1164
1166 dev_dbg(adapter->dev, "data: tid=%d\n", tid); 1165 dev_dbg(adapter->dev, "data: tid=%d\n", tid);
1167 1166
@@ -1186,14 +1185,14 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter)
1186 /* ra_list_spinlock has been freed in 1185 /* ra_list_spinlock has been freed in
1187 mwifiex_send_single_packet() */ 1186 mwifiex_send_single_packet() */
1188 } else { 1187 } else {
1189 if (mwifiex_is_ampdu_allowed(priv, ptr, tid)) { 1188 if (mwifiex_is_ampdu_allowed(priv, tid)) {
1190 if (mwifiex_is_ba_stream_avail(priv)) { 1189 if (mwifiex_is_ba_stream_avail(adapter)) {
1191 mwifiex_11n_create_tx_ba_stream_tbl(priv, 1190 mwifiex_11n_create_tx_ba_stream_tbl(priv,
1192 ptr->ra, tid, 1191 ptr->ra, tid,
1193 BA_STREAM_SETUP_INPROGRESS); 1192 BA_STREAM_SETUP_INPROGRESS);
1194 mwifiex_send_addba(priv, tid, ptr->ra); 1193 mwifiex_send_addba(priv, tid, ptr->ra);
1195 } else if (mwifiex_find_stream_to_delete 1194 } else if (mwifiex_find_stream_to_delete
1196 (priv, ptr, tid, &tid_del, ra)) { 1195 (priv, tid, &tid_del, ra)) {
1197 mwifiex_11n_create_tx_ba_stream_tbl(priv, 1196 mwifiex_11n_create_tx_ba_stream_tbl(priv,
1198 ptr->ra, tid, 1197 ptr->ra, tid,
1199 BA_STREAM_SETUP_INPROGRESS); 1198 BA_STREAM_SETUP_INPROGRESS);
@@ -1202,7 +1201,7 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter)
1202 } 1201 }
1203/* Minimum number of AMSDU */ 1202/* Minimum number of AMSDU */
1204#define MIN_NUM_AMSDU 2 1203#define MIN_NUM_AMSDU 2
1205 if (mwifiex_is_amsdu_allowed(priv, ptr, tid) && 1204 if (mwifiex_is_amsdu_allowed(priv, tid) &&
1206 (mwifiex_num_pkts_in_txq(priv, ptr, adapter->tx_buf_size) >= 1205 (mwifiex_num_pkts_in_txq(priv, ptr, adapter->tx_buf_size) >=
1207 MIN_NUM_AMSDU)) 1206 MIN_NUM_AMSDU))
1208 mwifiex_11n_aggregate_pkt(priv, ptr, INTF_HEADER_LEN, 1207 mwifiex_11n_aggregate_pkt(priv, ptr, INTF_HEADER_LEN,
diff --git a/drivers/net/wireless/mwifiex/wmm.h b/drivers/net/wireless/mwifiex/wmm.h
index 241f1b0b77f9..fcea1f68792f 100644
--- a/drivers/net/wireless/mwifiex/wmm.h
+++ b/drivers/net/wireless/mwifiex/wmm.h
@@ -35,8 +35,7 @@ enum ieee_types_wmm_ecw_bitmasks {
35 * This function retrieves the TID of the given RA list. 35 * This function retrieves the TID of the given RA list.
36 */ 36 */
37static inline int 37static inline int
38mwifiex_get_tid(struct mwifiex_adapter *adapter, 38mwifiex_get_tid(struct mwifiex_ra_list_tbl *ptr)
39 struct mwifiex_ra_list_tbl *ptr)
40{ 39{
41 struct sk_buff *skb; 40 struct sk_buff *skb;
42 41
@@ -52,7 +51,7 @@ mwifiex_get_tid(struct mwifiex_adapter *adapter,
52 * This function gets the length of a list. 51 * This function gets the length of a list.
53 */ 52 */
54static inline int 53static inline int
55mwifiex_wmm_list_len(struct mwifiex_adapter *adapter, struct list_head *head) 54mwifiex_wmm_list_len(struct list_head *head)
56{ 55{
57 struct list_head *pos; 56 struct list_head *pos;
58 int count = 0; 57 int count = 0;
@@ -67,8 +66,7 @@ mwifiex_wmm_list_len(struct mwifiex_adapter *adapter, struct list_head *head)
67 * This function checks if a RA list is empty or not. 66 * This function checks if a RA list is empty or not.
68 */ 67 */
69static inline u8 68static inline u8
70mwifiex_wmm_is_ra_list_empty(struct mwifiex_adapter *adapter, 69mwifiex_wmm_is_ra_list_empty(struct list_head *ra_list_hhead)
71 struct list_head *ra_list_hhead)
72{ 70{
73 struct mwifiex_ra_list_tbl *ra_list; 71 struct mwifiex_ra_list_tbl *ra_list;
74 int is_list_empty; 72 int is_list_empty;