diff options
author | Avinash Patil <patila@marvell.com> | 2012-01-24 23:50:24 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-27 14:57:02 -0500 |
commit | 2690e1bb35e97a3b15f0064e9176cd2ec61c2511 (patch) | |
tree | 5c682419e1fb513c3723f812c97d851226b98fd5 /drivers/net/wireless/mwifiex | |
parent | 10ef6a8f1567739192c29f11375556ce0d53ec74 (diff) |
mwifiex: pass priv pointer instead of adapter
Pass mwifiex_private pointer directly to wmm_add_buf_txqueue()
instead of passing adapter and then deriving priv again in
mwifiex_get_priv_by_id(). This reduces a 'for' loop in TX path.
Signed-off-by: Avinash Patil <patila@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/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/wmm.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/wmm.h | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 1a0775d19ade..80e44566bf6e 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c | |||
@@ -462,7 +462,7 @@ mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
462 | tx_info->bss_type = priv->bss_type; | 462 | tx_info->bss_type = priv->bss_type; |
463 | mwifiex_fill_buffer(skb); | 463 | mwifiex_fill_buffer(skb); |
464 | 464 | ||
465 | mwifiex_wmm_add_buf_txqueue(priv->adapter, skb); | 465 | mwifiex_wmm_add_buf_txqueue(priv, skb); |
466 | atomic_inc(&priv->adapter->tx_pending); | 466 | atomic_inc(&priv->adapter->tx_pending); |
467 | 467 | ||
468 | if (atomic_read(&priv->adapter->tx_pending) >= MAX_TX_PENDING) { | 468 | if (atomic_read(&priv->adapter->tx_pending) >= MAX_TX_PENDING) { |
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c index e6a2cb127d2b..75f79ef9f6cf 100644 --- a/drivers/net/wireless/mwifiex/wmm.c +++ b/drivers/net/wireless/mwifiex/wmm.c | |||
@@ -599,12 +599,10 @@ mwifiex_is_ralist_valid(struct mwifiex_private *priv, | |||
599 | * is queued at the list tail. | 599 | * is queued at the list tail. |
600 | */ | 600 | */ |
601 | void | 601 | void |
602 | mwifiex_wmm_add_buf_txqueue(struct mwifiex_adapter *adapter, | 602 | mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv, |
603 | struct sk_buff *skb) | 603 | struct sk_buff *skb) |
604 | { | 604 | { |
605 | struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); | 605 | struct mwifiex_adapter *adapter = priv->adapter; |
606 | struct mwifiex_private *priv = mwifiex_get_priv_by_id(adapter, | ||
607 | tx_info->bss_num, tx_info->bss_type); | ||
608 | u32 tid; | 606 | u32 tid; |
609 | struct mwifiex_ra_list_tbl *ra_list; | 607 | struct mwifiex_ra_list_tbl *ra_list; |
610 | u8 ra[ETH_ALEN], tid_down; | 608 | u8 ra[ETH_ALEN], tid_down; |
diff --git a/drivers/net/wireless/mwifiex/wmm.h b/drivers/net/wireless/mwifiex/wmm.h index fcea1f68792f..ec839952d2e7 100644 --- a/drivers/net/wireless/mwifiex/wmm.h +++ b/drivers/net/wireless/mwifiex/wmm.h | |||
@@ -80,8 +80,8 @@ mwifiex_wmm_is_ra_list_empty(struct list_head *ra_list_hhead) | |||
80 | return true; | 80 | return true; |
81 | } | 81 | } |
82 | 82 | ||
83 | void mwifiex_wmm_add_buf_txqueue(struct mwifiex_adapter *adapter, | 83 | void mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv, |
84 | struct sk_buff *skb); | 84 | struct sk_buff *skb); |
85 | void mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra); | 85 | void mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra); |
86 | 86 | ||
87 | int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter); | 87 | int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter); |