aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.h
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2014-09-12 10:38:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-15 15:00:52 -0400
commit6e251174c77a28a4ebaad9be963843898b658039 (patch)
tree2f52e5110018cb9189f5149ad50893485d6cd947 /drivers/net/wireless/mwifiex/main.h
parentd8d91253ba11bb6e98105c2bc88a40d08fac06ff (diff)
mwifiex: add rx workqueue support
This patch adds RX work queue support to mwifiex. Packets received are queued to internal queue which are then processed by scheduling a work item for RX process. RX work is enabled only on SMP systems. Reviewed-by: James Cameron <quozl@laptop.org> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.h')
-rw-r--r--drivers/net/wireless/mwifiex/main.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index e9cd4ab4902d..1a999999b391 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -58,6 +58,9 @@ enum {
58#define MAX_TX_PENDING 100 58#define MAX_TX_PENDING 100
59#define LOW_TX_PENDING 80 59#define LOW_TX_PENDING 80
60 60
61#define HIGH_RX_PENDING 50
62#define LOW_RX_PENDING 20
63
61#define MWIFIEX_UPLD_SIZE (2312) 64#define MWIFIEX_UPLD_SIZE (2312)
62 65
63#define MAX_EVENT_SIZE 2048 66#define MAX_EVENT_SIZE 2048
@@ -714,6 +717,12 @@ struct mwifiex_adapter {
714 atomic_t cmd_pending; 717 atomic_t cmd_pending;
715 struct workqueue_struct *workqueue; 718 struct workqueue_struct *workqueue;
716 struct work_struct main_work; 719 struct work_struct main_work;
720 struct workqueue_struct *rx_workqueue;
721 struct work_struct rx_work;
722 bool rx_work_enabled;
723 bool rx_processing;
724 bool delay_main_work;
725 bool rx_locked;
717 struct mwifiex_bss_prio_tbl bss_prio_tbl[MWIFIEX_MAX_BSS_NUM]; 726 struct mwifiex_bss_prio_tbl bss_prio_tbl[MWIFIEX_MAX_BSS_NUM];
718 /* spin lock for init/shutdown */ 727 /* spin lock for init/shutdown */
719 spinlock_t mwifiex_lock; 728 spinlock_t mwifiex_lock;
@@ -754,6 +763,10 @@ struct mwifiex_adapter {
754 struct list_head scan_pending_q; 763 struct list_head scan_pending_q;
755 /* spin lock for scan_pending_q */ 764 /* spin lock for scan_pending_q */
756 spinlock_t scan_pending_q_lock; 765 spinlock_t scan_pending_q_lock;
766 /* spin lock for RX queue */
767 spinlock_t rx_q_lock;
768 /* spin lock for RX processing routine */
769 spinlock_t rx_proc_lock;
757 struct sk_buff_head usb_rx_data_q; 770 struct sk_buff_head usb_rx_data_q;
758 u32 scan_processing; 771 u32 scan_processing;
759 u16 region_code; 772 u16 region_code;
@@ -831,6 +844,7 @@ struct mwifiex_adapter {
831 u8 num_mem_types; 844 u8 num_mem_types;
832 u8 curr_mem_idx; 845 u8 curr_mem_idx;
833 bool scan_chan_gap_enabled; 846 bool scan_chan_gap_enabled;
847 struct sk_buff_head rx_data_q;
834}; 848};
835 849
836int mwifiex_init_lock_list(struct mwifiex_adapter *adapter); 850int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);