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

mwifiex: rename long function names to shorter ones

This saves some space and adds better readability.
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 a8286911
...@@ -69,8 +69,8 @@ mwifiex_fill_cap_info(struct mwifiex_private *priv, u8 radio_type, ...@@ -69,8 +69,8 @@ mwifiex_fill_cap_info(struct mwifiex_private *priv, u8 radio_type,
* table which matches the requested BA status. * table which matches the requested BA status.
*/ */
static struct mwifiex_tx_ba_stream_tbl * static struct mwifiex_tx_ba_stream_tbl *
mwifiex_11n_get_tx_ba_stream_status(struct mwifiex_private *priv, mwifiex_get_ba_status(struct mwifiex_private *priv,
enum mwifiex_ba_status ba_status) enum mwifiex_ba_status ba_status)
{ {
struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl; struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl;
unsigned long flags; unsigned long flags;
...@@ -107,12 +107,11 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv, ...@@ -107,12 +107,11 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv,
tid = del_ba_param_set >> DELBA_TID_POS; tid = del_ba_param_set >> DELBA_TID_POS;
if (del_ba->del_result == BA_RESULT_SUCCESS) { if (del_ba->del_result == BA_RESULT_SUCCESS) {
mwifiex_11n_delete_ba_stream_tbl(priv, tid, mwifiex_del_ba_tbl(priv, tid, del_ba->peer_mac_addr,
del_ba->peer_mac_addr, TYPE_DELBA_SENT, TYPE_DELBA_SENT,
INITIATOR_BIT(del_ba_param_set)); INITIATOR_BIT(del_ba_param_set));
tx_ba_tbl = mwifiex_11n_get_tx_ba_stream_status(priv, tx_ba_tbl = mwifiex_get_ba_status(priv, BA_SETUP_INPROGRESS);
BA_STREAM_SETUP_INPROGRESS);
if (tx_ba_tbl) if (tx_ba_tbl)
mwifiex_send_addba(priv, tx_ba_tbl->tid, mwifiex_send_addba(priv, tx_ba_tbl->tid,
tx_ba_tbl->ra); tx_ba_tbl->ra);
...@@ -120,18 +119,17 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv, ...@@ -120,18 +119,17 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv,
* In case of failure, recreate the deleted stream in case * In case of failure, recreate the deleted stream in case
* we initiated the ADDBA * we initiated the ADDBA
*/ */
if (INITIATOR_BIT(del_ba_param_set)) { if (!INITIATOR_BIT(del_ba_param_set))
mwifiex_11n_create_tx_ba_stream_tbl(priv, return 0;
del_ba->peer_mac_addr, tid,
BA_STREAM_SETUP_INPROGRESS); mwifiex_create_ba_tbl(priv, del_ba->peer_mac_addr, tid,
BA_SETUP_INPROGRESS);
tx_ba_tbl = mwifiex_11n_get_tx_ba_stream_status(priv,
BA_STREAM_SETUP_INPROGRESS); tx_ba_tbl = mwifiex_get_ba_status(priv, BA_SETUP_INPROGRESS);
if (tx_ba_tbl)
mwifiex_11n_delete_ba_stream_tbl(priv, if (tx_ba_tbl)
tx_ba_tbl->tid, tx_ba_tbl->ra, mwifiex_del_ba_tbl(priv, tx_ba_tbl->tid, tx_ba_tbl->ra,
TYPE_DELBA_SENT, true); TYPE_DELBA_SENT, true);
}
} }
return 0; return 0;
...@@ -160,18 +158,17 @@ int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv, ...@@ -160,18 +158,17 @@ int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv,
& IEEE80211_ADDBA_PARAM_TID_MASK) & IEEE80211_ADDBA_PARAM_TID_MASK)
>> BLOCKACKPARAM_TID_POS; >> BLOCKACKPARAM_TID_POS;
if (le16_to_cpu(add_ba_rsp->status_code) == BA_RESULT_SUCCESS) { if (le16_to_cpu(add_ba_rsp->status_code) == BA_RESULT_SUCCESS) {
tx_ba_tbl = mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, tx_ba_tbl = mwifiex_get_ba_tbl(priv, tid,
add_ba_rsp->peer_mac_addr); add_ba_rsp->peer_mac_addr);
if (tx_ba_tbl) { if (tx_ba_tbl) {
dev_dbg(priv->adapter->dev, "info: BA stream complete\n"); dev_dbg(priv->adapter->dev, "info: BA stream complete\n");
tx_ba_tbl->ba_status = BA_STREAM_SETUP_COMPLETE; tx_ba_tbl->ba_status = BA_SETUP_COMPLETE;
} else { } else {
dev_err(priv->adapter->dev, "BA stream not created\n"); dev_err(priv->adapter->dev, "BA stream not created\n");
} }
} else { } else {
mwifiex_11n_delete_ba_stream_tbl(priv, tid, mwifiex_del_ba_tbl(priv, tid, add_ba_rsp->peer_mac_addr,
add_ba_rsp->peer_mac_addr, TYPE_DELBA_SENT, true);
TYPE_DELBA_SENT, true);
if (add_ba_rsp->add_rsp_result != BA_RESULT_TIMEOUT) if (add_ba_rsp->add_rsp_result != BA_RESULT_TIMEOUT)
priv->aggr_prio_tbl[tid].ampdu_ap = priv->aggr_prio_tbl[tid].ampdu_ap =
BA_STREAM_NOT_ALLOWED; BA_STREAM_NOT_ALLOWED;
...@@ -544,8 +541,7 @@ void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv) ...@@ -544,8 +541,7 @@ void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv)
* table which matches the given RA/TID pair. * table which matches the given RA/TID pair.
*/ */
struct mwifiex_tx_ba_stream_tbl * struct mwifiex_tx_ba_stream_tbl *
mwifiex_11n_get_tx_ba_stream_tbl(struct mwifiex_private *priv, mwifiex_get_ba_tbl(struct mwifiex_private *priv, int tid, u8 *ra)
int tid, u8 *ra)
{ {
struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl; struct mwifiex_tx_ba_stream_tbl *tx_ba_tsr_tbl;
unsigned long flags; unsigned long flags;
...@@ -567,14 +563,13 @@ mwifiex_11n_get_tx_ba_stream_tbl(struct mwifiex_private *priv, ...@@ -567,14 +563,13 @@ mwifiex_11n_get_tx_ba_stream_tbl(struct mwifiex_private *priv,
* This function creates an entry in Tx BA stream table for the * This function creates an entry in Tx BA stream table for the
* given RA/TID pair. * given RA/TID pair.
*/ */
void mwifiex_11n_create_tx_ba_stream_tbl(struct mwifiex_private *priv, void mwifiex_create_ba_tbl(struct mwifiex_private *priv, u8 *ra, int tid,
u8 *ra, int tid, enum mwifiex_ba_status ba_status)
enum mwifiex_ba_status ba_status)
{ {
struct mwifiex_tx_ba_stream_tbl *new_node; struct mwifiex_tx_ba_stream_tbl *new_node;
unsigned long flags; unsigned long flags;
if (!mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, ra)) { if (!mwifiex_get_ba_tbl(priv, tid, ra)) {
new_node = kzalloc(sizeof(struct mwifiex_tx_ba_stream_tbl), new_node = kzalloc(sizeof(struct mwifiex_tx_ba_stream_tbl),
GFP_ATOMIC); GFP_ATOMIC);
if (!new_node) { if (!new_node) {
...@@ -668,9 +663,8 @@ void mwifiex_11n_delete_ba_stream(struct mwifiex_private *priv, u8 *del_ba) ...@@ -668,9 +663,8 @@ void mwifiex_11n_delete_ba_stream(struct mwifiex_private *priv, u8 *del_ba)
tid = del_ba_param_set >> DELBA_TID_POS; tid = del_ba_param_set >> DELBA_TID_POS;
mwifiex_11n_delete_ba_stream_tbl(priv, tid, cmd_del_ba->peer_mac_addr, mwifiex_del_ba_tbl(priv, tid, cmd_del_ba->peer_mac_addr,
TYPE_DELBA_RECEIVE, TYPE_DELBA_RECEIVE, INITIATOR_BIT(del_ba_param_set));
INITIATOR_BIT(del_ba_param_set));
} }
/* /*
......
...@@ -46,13 +46,12 @@ void mwifiex_11n_delete_tx_ba_stream_tbl_entry(struct mwifiex_private *priv, ...@@ -46,13 +46,12 @@ void mwifiex_11n_delete_tx_ba_stream_tbl_entry(struct mwifiex_private *priv,
struct mwifiex_tx_ba_stream_tbl struct mwifiex_tx_ba_stream_tbl
*tx_tbl); *tx_tbl);
void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv); void mwifiex_11n_delete_all_tx_ba_stream_tbl(struct mwifiex_private *priv);
struct mwifiex_tx_ba_stream_tbl *mwifiex_11n_get_tx_ba_stream_tbl(struct struct mwifiex_tx_ba_stream_tbl *mwifiex_get_ba_tbl(struct
mwifiex_private mwifiex_private
*priv, int tid, *priv, int tid,
u8 *ra); u8 *ra);
void mwifiex_11n_create_tx_ba_stream_tbl(struct mwifiex_private *priv, u8 *ra, void mwifiex_create_ba_tbl(struct mwifiex_private *priv, u8 *ra, int tid,
int tid, enum mwifiex_ba_status ba_status);
enum mwifiex_ba_status ba_status);
int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac); int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac);
int mwifiex_send_delba(struct mwifiex_private *priv, int tid, u8 *peer_mac, int mwifiex_send_delba(struct mwifiex_private *priv, int tid, u8 *peer_mac,
int initiator); int initiator);
...@@ -154,7 +153,7 @@ mwifiex_is_ba_stream_setup(struct mwifiex_private *priv, ...@@ -154,7 +153,7 @@ mwifiex_is_ba_stream_setup(struct mwifiex_private *priv,
{ {
struct mwifiex_tx_ba_stream_tbl *tx_tbl; struct mwifiex_tx_ba_stream_tbl *tx_tbl;
tx_tbl = mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, ptr->ra); tx_tbl = mwifiex_get_ba_tbl(priv, tid, ptr->ra);
if (tx_tbl && IS_BASTREAM_SETUP(tx_tbl)) if (tx_tbl && IS_BASTREAM_SETUP(tx_tbl))
return true; return true;
......
...@@ -480,8 +480,8 @@ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *priv, ...@@ -480,8 +480,8 @@ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *priv,
* The TID/TA are taken from del BA event body. * The TID/TA are taken from del BA event body.
*/ */
void void
mwifiex_11n_delete_ba_stream_tbl(struct mwifiex_private *priv, int tid, mwifiex_del_ba_tbl(struct mwifiex_private *priv, int tid, u8 *peer_mac,
u8 *peer_mac, u8 type, int initiator) u8 type, int initiator)
{ {
struct mwifiex_rx_reorder_tbl *rx_reor_tbl_ptr; struct mwifiex_rx_reorder_tbl *rx_reor_tbl_ptr;
struct mwifiex_tx_ba_stream_tbl *ptx_tbl; 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,7 +506,7 @@ mwifiex_11n_delete_ba_stream_tbl(struct mwifiex_private *priv, int tid,
} }
mwifiex_11n_delete_rx_reorder_tbl_entry(priv, rx_reor_tbl_ptr); mwifiex_11n_delete_rx_reorder_tbl_entry(priv, rx_reor_tbl_ptr);
} else { } else {
ptx_tbl = mwifiex_11n_get_tx_ba_stream_tbl(priv, tid, peer_mac); ptx_tbl = mwifiex_get_ba_tbl(priv, tid, peer_mac);
if (!ptx_tbl) { if (!ptx_tbl) {
dev_dbg(priv->adapter->dev, dev_dbg(priv->adapter->dev,
"event: TID, RA not found in table\n"); "event: TID, RA not found in table\n");
......
...@@ -41,9 +41,8 @@ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *, ...@@ -41,9 +41,8 @@ int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *,
u16 seqNum, u16 seqNum,
u16 tid, u8 *ta, u16 tid, u8 *ta,
u8 pkttype, void *payload); u8 pkttype, void *payload);
void mwifiex_11n_delete_ba_stream_tbl(struct mwifiex_private *priv, int Tid, void mwifiex_del_ba_tbl(struct mwifiex_private *priv, int Tid,
u8 *PeerMACAddr, u8 type, u8 *PeerMACAddr, u8 type, int initiator);
int initiator);
void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv, void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv,
struct host_cmd_ds_11n_batimeout *event); struct host_cmd_ds_11n_batimeout *event);
int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv, int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv,
......
...@@ -462,9 +462,9 @@ struct mwifiex_private { ...@@ -462,9 +462,9 @@ struct mwifiex_private {
}; };
enum mwifiex_ba_status { enum mwifiex_ba_status {
BA_STREAM_NOT_SETUP = 0, BA_SETUP_NONE = 0,
BA_STREAM_SETUP_INPROGRESS, BA_SETUP_INPROGRESS,
BA_STREAM_SETUP_COMPLETE BA_SETUP_COMPLETE
}; };
struct mwifiex_tx_ba_stream_tbl { struct mwifiex_tx_ba_stream_tbl {
......
...@@ -1218,15 +1218,13 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter) ...@@ -1218,15 +1218,13 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter)
} else { } else {
if (mwifiex_is_ampdu_allowed(priv, tid)) { if (mwifiex_is_ampdu_allowed(priv, tid)) {
if (mwifiex_space_avail_for_new_ba_stream(adapter)) { if (mwifiex_space_avail_for_new_ba_stream(adapter)) {
mwifiex_11n_create_tx_ba_stream_tbl(priv, mwifiex_create_ba_tbl(priv, ptr->ra, tid,
ptr->ra, tid, BA_SETUP_INPROGRESS);
BA_STREAM_SETUP_INPROGRESS);
mwifiex_send_addba(priv, tid, ptr->ra); mwifiex_send_addba(priv, tid, ptr->ra);
} else if (mwifiex_find_stream_to_delete } else if (mwifiex_find_stream_to_delete
(priv, tid, &tid_del, ra)) { (priv, tid, &tid_del, ra)) {
mwifiex_11n_create_tx_ba_stream_tbl(priv, mwifiex_create_ba_tbl(priv, ptr->ra, tid,
ptr->ra, tid, BA_SETUP_INPROGRESS);
BA_STREAM_SETUP_INPROGRESS);
mwifiex_send_delba(priv, tid_del, ra, 1); mwifiex_send_delba(priv, tid_del, ra, 1);
} }
} }
......
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