diff options
author | Yogesh Ashok Powar <yogeshp@marvell.com> | 2012-03-12 22:35:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-13 14:54:17 -0400 |
commit | 3e822635a79c55a7768ec38cd5007081dae95171 (patch) | |
tree | dcb3068d82282ab13d02d2a2c9d243e4571dae53 /drivers | |
parent | a8286911881948c7a2ecc63ee4224c258cce2da3 (diff) |
mwifiex: rename long function names to shorter ones
This saves some space and adds better readability.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mwifiex/11n.c | 60 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n_rxreorder.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n_rxreorder.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/wmm.c | 10 |
6 files changed, 43 insertions, 53 deletions
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c index 34bba5234294..aeb456d6396f 100644 --- a/drivers/net/wireless/mwifiex/11n.c +++ b/drivers/net/wireless/mwifiex/11n.c | |||
@@ -69,8 +69,8 @@ mwifiex_fill_cap_info(struct mwifiex_private *priv, u8 radio_type, | |||
69 | * table which matches the requested BA status. | 69 | * table which matches the requested BA status. |
70 | */ | 70 | */ |
71 | static struct mwifiex_tx_ba_stream_tbl * | 71 | static struct mwifiex_tx_ba_stream_tbl * |
72 | mwifiex_11n_get_tx_ba_stream_status(struct mwifiex_private *priv, | 72 | mwifiex_get_ba_status(struct mwifiex_private *priv, |
73 | enum mwifiex_ba_status ba_status) | 73 | enum mwifiex_ba_status ba_status) |
74 | { | 74 | { |
75 | struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl; | 75 | struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl; |
76 | unsigned long flags; | 76 | unsigned long flags; |
@@ -107,12 +107,11 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv, | |||
107 | 107 | ||
108 | tid = del_ba_param_set >> DELBA_TID_POS; | 108 | tid = del_ba_param_set >> DELBA_TID_POS; |
109 | if (del_ba->del_result == BA_RESULT_SUCCESS) { | 109 | if (del_ba->del_result == BA_RESULT_SUCCESS) { |
110 | mwifiex_11n_delete_ba_stream_tbl(priv, tid, | 110 | mwifiex_del_ba_tbl(priv, tid, del_ba->peer_mac_addr, |
111 | del_ba->peer_mac_addr, TYPE_DELBA_SENT, | 111 | TYPE_DELBA_SENT, |
112 | INITIATOR_BIT(del_ba_param_set)); | 112 | INITIATOR_BIT(del_ba_param_set)); |
113 | 113 | ||
114 | tx_ba_tbl = mwifiex_11n_get_tx_ba_stream_status(priv, | 114 | tx_ba_tbl = mwifiex_get_ba_status(priv, BA_SETUP_INPROGRESS); |
115 | BA_STREAM_SETUP_INPROGRESS); | ||
116 | if (tx_ba_tbl) | 115 | if (tx_ba_tbl) |
117 | mwifiex_send_addba(priv, tx_ba_tbl->tid, | 116 | mwifiex_send_addba(priv, tx_ba_tbl->tid, |
118 | tx_ba_tbl->ra); | 117 | tx_ba_tbl->ra); |
@@ -120,18 +119,17 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv, | |||
120 | * In case of failure, recreate the deleted stream in case | 119 | * In case of failure, recreate the deleted stream in case |
121 | * we initiated the ADDBA | 120 | * we initiated the ADDBA |
122 | */ | 121 | */ |
123 | if (INITIATOR_BIT(del_ba_param_set)) { | 122 | if (!INITIATOR_BIT(del_ba_param_set)) |
124 | mwifiex_11n_create_tx_ba_stream_tbl(priv, | 123 | return 0; |
125 | del_ba->peer_mac_addr, tid, | 124 | |
126 | BA_STREAM_SETUP_INPROGRESS); | 125 | mwifiex_create_ba_tbl(priv, del_ba->peer_mac_addr, tid, |
127 | 126 | BA_SETUP_INPROGRESS); | |
128 | tx_ba_tbl = mwifiex_11n_get_tx_ba_stream_status(priv, | 127 | |
129 | BA_STREAM_SETUP_INPROGRESS); | 128 | tx_ba_tbl = mwifiex_get_ba_status(priv, BA_SETUP_INPROGRESS); |
130 | if (tx_ba_tbl) | 129 | |
131 | mwifiex_11n_delete_ba_stream_tbl(priv, | 130 | if (tx_ba_tbl) |
132 | tx_ba_tbl->tid, tx_ba_tbl->ra, | 131 | mwifiex_del_ba_tbl(priv, tx_ba_tbl->tid, tx_ba_tbl->ra, |
133 | TYPE_DELBA_SENT, true); | 132 | TYPE_DELBA_SENT, true); |
134 | } | ||
135 | } | 133 | } |
136 | 134 | ||
137 | return 0; | 135 | return 0; |
@@ -160,18 +158,17 @@ int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv, | |||
160 | & IEEE80211_ADDBA_PARAM_TID_MASK) | 158 | & IEEE80211_ADDBA_PARAM_TID_MASK) |
161 | >> BLOCKACKPARAM_TID_POS; | 159 | >> BLOCKACKPARAM_TID_POS; |
162 | if (le16_to_cpu(add_ba_rsp->status_code) == BA_RESULT_SUCCESS) { | 160 | if (le16_to_cpu(add_ba_rsp->status_code) == BA_RESULT_SUCCESS) { |
163 | tx_ba_tbl = mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, | 161 | tx_ba_tbl = mwifiex_get_ba_tbl(priv, tid, |
164 | add_ba_rsp->peer_mac_addr); | 162 | add_ba_rsp->peer_mac_addr); |
165 | if (tx_ba_tbl) { | 163 | if (tx_ba_tbl) { |
166 | dev_dbg(priv->adapter->dev, "info: BA stream complete\n"); | 164 | dev_dbg(priv->adapter->dev, "info: BA stream complete\n"); |
167 | tx_ba_tbl->ba_status = BA_STREAM_SETUP_COMPLETE; | 165 | tx_ba_tbl->ba_status = BA_SETUP_COMPLETE; |
168 | } else { | 166 | } else { |
169 | dev_err(priv->adapter->dev, "BA stream not created\n"); | 167 | dev_err(priv->adapter->dev, "BA stream not created\n"); |
170 | } | 168 | } |
171 | } else { | 169 | } else { |
172 | mwifiex_11n_delete_ba_stream_tbl(priv, tid, | 170 | mwifiex_del_ba_tbl(priv, tid, add_ba_rsp->peer_mac_addr, |
173 | add_ba_rsp->peer_mac_addr, | 171 | TYPE_DELBA_SENT, true); |
174 | TYPE_DELBA_SENT, true); | ||
175 | if (add_ba_rsp->add_rsp_result != BA_RESULT_TIMEOUT) | 172 | if (add_ba_rsp->add_rsp_result != BA_RESULT_TIMEOUT) |
176 | priv->aggr_prio_tbl[tid].ampdu_ap = | 173 | priv->aggr_prio_tbl[tid].ampdu_ap = |
177 | BA_STREAM_NOT_ALLOWED; | 174 | BA_STREAM_NOT_ALLOWED; |
@@ -544,8 +541,7 @@ void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv) | |||
544 | * table which matches the given RA/TID pair. | 541 | * table which matches the given RA/TID pair. |
545 | */ | 542 | */ |
546 | struct mwifiex_tx_ba_stream_tbl * | 543 | struct mwifiex_tx_ba_stream_tbl * |
547 | mwifiex_11n_get_tx_ba_stream_tbl(struct mwifiex_private *priv, | 544 | mwifiex_get_ba_tbl(struct mwifiex_private *priv, int tid, u8 *ra) |
548 | int tid, u8 *ra) | ||
549 | { | 545 | { |
550 | struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl; | 546 | struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl; |
551 | unsigned long flags; | 547 | unsigned long flags; |
@@ -567,14 +563,13 @@ mwifiex_11n_get_tx_ba_stream_tbl(struct mwifiex_private *priv, | |||
567 | * This function creates an entry in Tx BA stream table for the | 563 | * This function creates an entry in Tx BA stream table for the |
568 | * given RA/TID pair. | 564 | * given RA/TID pair. |
569 | */ | 565 | */ |
570 | void mwifiex_11n_create_tx_ba_stream_tbl(struct mwifiex_private *priv, | 566 | void mwifiex_create_ba_tbl(struct mwifiex_private *priv, u8 *ra, int tid, |
571 | u8 *ra, int tid, | 567 | enum mwifiex_ba_status ba_status) |
572 | enum mwifiex_ba_status ba_status) | ||
573 | { | 568 | { |
574 | struct mwifiex_tx_ba_stream_tbl *new_node; | 569 | struct mwifiex_tx_ba_stream_tbl *new_node; |
575 | unsigned long flags; | 570 | unsigned long flags; |
576 | 571 | ||
577 | if (!mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, ra)) { | 572 | if (!mwifiex_get_ba_tbl(priv, tid, ra)) { |
578 | new_node = kzalloc(sizeof(struct mwifiex_tx_ba_stream_tbl), | 573 | new_node = kzalloc(sizeof(struct mwifiex_tx_ba_stream_tbl), |
579 | GFP_ATOMIC); | 574 | GFP_ATOMIC); |
580 | if (!new_node) { | 575 | if (!new_node) { |
@@ -668,9 +663,8 @@ void mwifiex_11n_delete_ba_stream(struct mwifiex_private *priv, u8 *del_ba) | |||
668 | 663 | ||
669 | tid = del_ba_param_set >> DELBA_TID_POS; | 664 | tid = del_ba_param_set >> DELBA_TID_POS; |
670 | 665 | ||
671 | mwifiex_11n_delete_ba_stream_tbl(priv, tid, cmd_del_ba->peer_mac_addr, | 666 | mwifiex_del_ba_tbl(priv, tid, cmd_del_ba->peer_mac_addr, |
672 | TYPE_DELBA_RECEIVE, | 667 | TYPE_DELBA_RECEIVE, INITIATOR_BIT(del_ba_param_set)); |
673 | INITIATOR_BIT(del_ba_param_set)); | ||
674 | } | 668 | } |
675 | 669 | ||
676 | /* | 670 | /* |
diff --git a/drivers/net/wireless/mwifiex/11n.h b/drivers/net/wireless/mwifiex/11n.h index 90b421e343d4..139aa6ee1fbe 100644 --- a/drivers/net/wireless/mwifiex/11n.h +++ b/drivers/net/wireless/mwifiex/11n.h | |||
@@ -46,13 +46,12 @@ void mwifiex_11n_delete_tx_ba_stream_tbl_entry(struct mwifiex_private *priv, | |||
46 | struct mwifiex_tx_ba_stream_tbl | 46 | struct mwifiex_tx_ba_stream_tbl |
47 | *tx_tbl); | 47 | *tx_tbl); |
48 | void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv); | 48 | void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv); |
49 | struct mwifiex_tx_ba_stream_tbl *mwifiex_11n_get_tx_ba_stream_tbl(struct | 49 | struct mwifiex_tx_ba_stream_tbl *mwifiex_get_ba_tbl(struct |
50 | mwifiex_private | 50 | mwifiex_private |
51 | *priv, int tid, | 51 | *priv, int tid, |
52 | u8 *ra); | 52 | u8 *ra); |
53 | void mwifiex_11n_create_tx_ba_stream_tbl(struct mwifiex_private *priv, u8 *ra, | 53 | void mwifiex_create_ba_tbl(struct mwifiex_private *priv, u8 *ra, int tid, |
54 | int tid, | 54 | enum mwifiex_ba_status ba_status); |
55 | enum mwifiex_ba_status ba_status); | ||
56 | int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac); | 55 | int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac); |
57 | int mwifiex_send_delba(struct mwifiex_private *priv, int tid, u8 *peer_mac, | 56 | int mwifiex_send_delba(struct mwifiex_private *priv, int tid, u8 *peer_mac, |
58 | int initiator); | 57 | int initiator); |
@@ -154,7 +153,7 @@ mwifiex_is_ba_stream_setup(struct mwifiex_private *priv, | |||
154 | { | 153 | { |
155 | struct mwifiex_tx_ba_stream_tbl *tx_tbl; | 154 | struct mwifiex_tx_ba_stream_tbl *tx_tbl; |
156 | 155 | ||
157 | tx_tbl = mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, ptr->ra); | 156 | tx_tbl = mwifiex_get_ba_tbl(priv, tid, ptr->ra); |
158 | if (tx_tbl && IS_BASTREAM_SETUP(tx_tbl)) | 157 | if (tx_tbl && IS_BASTREAM_SETUP(tx_tbl)) |
159 | return true; | 158 | return true; |
160 | 159 | ||
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c index 681d3f2a4c28..ad41fab970b5 100644 --- a/drivers/net/wireless/mwifiex/11n_rxreorder.c +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c | |||
@@ -480,8 +480,8 @@ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *priv, | |||
480 | * The TID/TA are taken from del BA event body. | 480 | * The TID/TA are taken from del BA event body. |
481 | */ | 481 | */ |
482 | void | 482 | void |
483 | mwifiex_11n_delete_ba_stream_tbl(struct mwifiex_private *priv, int tid, | 483 | mwifiex_del_ba_tbl(struct mwifiex_private *priv, int tid, u8 *peer_mac, |
484 | u8 *peer_mac, u8 type, int initiator) | 484 | u8 type, int initiator) |
485 | { | 485 | { |
486 | struct mwifiex_rx_reorder_tbl *rx_reor_tbl_ptr; | 486 | struct mwifiex_rx_reorder_tbl *rx_reor_tbl_ptr; |
487 | struct mwifiex_tx_ba_stream_tbl *ptx_tbl; | 487 | struct mwifiex_tx_ba_stream_tbl *ptx_tbl; |
@@ -506,7 +506,7 @@ mwifiex_11n_delete_ba_stream_tbl(struct mwifiex_private *priv, int tid, | |||
506 | } | 506 | } |
507 | mwifiex_11n_delete_rx_reorder_tbl_entry(priv, rx_reor_tbl_ptr); | 507 | mwifiex_11n_delete_rx_reorder_tbl_entry(priv, rx_reor_tbl_ptr); |
508 | } else { | 508 | } else { |
509 | ptx_tbl = mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, peer_mac); | 509 | ptx_tbl = mwifiex_get_ba_tbl(priv, tid, peer_mac); |
510 | if (!ptx_tbl) { | 510 | if (!ptx_tbl) { |
511 | dev_dbg(priv->adapter->dev, | 511 | dev_dbg(priv->adapter->dev, |
512 | "event: TID, RA not found in table\n"); | 512 | "event: TID, RA not found in table\n"); |
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.h b/drivers/net/wireless/mwifiex/11n_rxreorder.h index 033c8adbdcd4..f1bffebabc60 100644 --- a/drivers/net/wireless/mwifiex/11n_rxreorder.h +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.h | |||
@@ -41,9 +41,8 @@ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *, | |||
41 | u16 seqNum, | 41 | u16 seqNum, |
42 | u16 tid, u8 *ta, | 42 | u16 tid, u8 *ta, |
43 | u8 pkttype, void *payload); | 43 | u8 pkttype, void *payload); |
44 | void mwifiex_11n_delete_ba_stream_tbl(struct mwifiex_private *priv, int Tid, | 44 | void mwifiex_del_ba_tbl(struct mwifiex_private *priv, int Tid, |
45 | u8 *PeerMACAddr, u8 type, | 45 | u8 *PeerMACAddr, u8 type, int initiator); |
46 | int initiator); | ||
47 | void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv, | 46 | void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv, |
48 | struct host_cmd_ds_11n_batimeout *event); | 47 | struct host_cmd_ds_11n_batimeout *event); |
49 | int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv, | 48 | int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv, |
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index 6dc116647411..58748b143609 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -462,9 +462,9 @@ struct mwifiex_private { | |||
462 | }; | 462 | }; |
463 | 463 | ||
464 | enum mwifiex_ba_status { | 464 | enum mwifiex_ba_status { |
465 | BA_STREAM_NOT_SETUP = 0, | 465 | BA_SETUP_NONE = 0, |
466 | BA_STREAM_SETUP_INPROGRESS, | 466 | BA_SETUP_INPROGRESS, |
467 | BA_STREAM_SETUP_COMPLETE | 467 | BA_SETUP_COMPLETE |
468 | }; | 468 | }; |
469 | 469 | ||
470 | struct mwifiex_tx_ba_stream_tbl { | 470 | struct mwifiex_tx_ba_stream_tbl { |
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c index 75f79ef9f6cf..5757ebd2163a 100644 --- a/drivers/net/wireless/mwifiex/wmm.c +++ b/drivers/net/wireless/mwifiex/wmm.c | |||
@@ -1218,15 +1218,13 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter) | |||
1218 | } else { | 1218 | } else { |
1219 | if (mwifiex_is_ampdu_allowed(priv, tid)) { | 1219 | if (mwifiex_is_ampdu_allowed(priv, tid)) { |
1220 | if (mwifiex_space_avail_for_new_ba_stream(adapter)) { | 1220 | if (mwifiex_space_avail_for_new_ba_stream(adapter)) { |
1221 | mwifiex_11n_create_tx_ba_stream_tbl(priv, | 1221 | mwifiex_create_ba_tbl(priv, ptr->ra, tid, |
1222 | ptr->ra, tid, | 1222 | BA_SETUP_INPROGRESS); |
1223 | BA_STREAM_SETUP_INPROGRESS); | ||
1224 | mwifiex_send_addba(priv, tid, ptr->ra); | 1223 | mwifiex_send_addba(priv, tid, ptr->ra); |
1225 | } else if (mwifiex_find_stream_to_delete | 1224 | } else if (mwifiex_find_stream_to_delete |
1226 | (priv, tid, &tid_del, ra)) { | 1225 | (priv, tid, &tid_del, ra)) { |
1227 | mwifiex_11n_create_tx_ba_stream_tbl(priv, | 1226 | mwifiex_create_ba_tbl(priv, ptr->ra, tid, |
1228 | ptr->ra, tid, | 1227 | BA_SETUP_INPROGRESS); |
1229 | BA_STREAM_SETUP_INPROGRESS); | ||
1230 | mwifiex_send_delba(priv, tid_del, ra, 1); | 1228 | mwifiex_send_delba(priv, tid_del, ra, 1); |
1231 | } | 1229 | } |
1232 | } | 1230 | } |