diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-12-23 02:47:05 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-15 07:31:06 -0500 |
commit | 3a3def8dbe65082d2319cac4791139d4ab786b4d (patch) | |
tree | b51d5563aafb0d629eec0bbd71f01f7bd55e5e87 /drivers/net | |
parent | 3a124ed6454a939277c6b51bea542464be43ef6f (diff) |
wil6210: allow to configure ADDBA request
For manual ADDBA configuration, allow to set desired window size or
disable automatic mechanism.
Introduce module parameter (int) agg_wsize. It can be changed on run time,
will be taken into account on the next connect. Interpretation:
- <0 - disable automatic ADDBA; intended for manual testing through debugfs
- 0 - use automatically calculated window size
- >0 - use this for window size. Clipped by maximum supported by the hardware
with current environment.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/rx_reorder.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil6210.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 12 |
4 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/wil6210/rx_reorder.c b/drivers/net/wireless/ath/wil6210/rx_reorder.c index ce1206aff5e5..0865c3430e51 100644 --- a/drivers/net/wireless/ath/wil6210/rx_reorder.c +++ b/drivers/net/wireless/ath/wil6210/rx_reorder.c | |||
@@ -437,7 +437,7 @@ void wil_back_tx_flush(struct wil6210_priv *wil) | |||
437 | mutex_unlock(&wil->back_tx_mutex); | 437 | mutex_unlock(&wil->back_tx_mutex); |
438 | } | 438 | } |
439 | 439 | ||
440 | int wil_addba_tx_request(struct wil6210_priv *wil, u8 ringid) | 440 | int wil_addba_tx_request(struct wil6210_priv *wil, u8 ringid, u16 wsize) |
441 | { | 441 | { |
442 | struct wil_back_tx *req = kzalloc(sizeof(*req), GFP_KERNEL); | 442 | struct wil_back_tx *req = kzalloc(sizeof(*req), GFP_KERNEL); |
443 | 443 | ||
@@ -445,7 +445,7 @@ int wil_addba_tx_request(struct wil6210_priv *wil, u8 ringid) | |||
445 | return -ENOMEM; | 445 | return -ENOMEM; |
446 | 446 | ||
447 | req->ringid = ringid; | 447 | req->ringid = ringid; |
448 | req->agg_wsize = wil_agg_size(wil, 0); | 448 | req->agg_wsize = wil_agg_size(wil, wsize); |
449 | req->agg_timeout = 0; | 449 | req->agg_timeout = 0; |
450 | 450 | ||
451 | mutex_lock(&wil->back_tx_mutex); | 451 | mutex_lock(&wil->back_tx_mutex); |
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 71eaeec50639..b7ffcfb8f38f 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c | |||
@@ -701,8 +701,8 @@ int wil_vring_init_tx(struct wil6210_priv *wil, int id, int size, | |||
701 | vring->hwtail = le32_to_cpu(reply.cmd.tx_vring_tail_ptr); | 701 | vring->hwtail = le32_to_cpu(reply.cmd.tx_vring_tail_ptr); |
702 | 702 | ||
703 | txdata->enabled = 1; | 703 | txdata->enabled = 1; |
704 | if (wil->sta[cid].data_port_open) | 704 | if (wil->sta[cid].data_port_open && (agg_wsize >= 0)) |
705 | wil_addba_tx_request(wil, id); | 705 | wil_addba_tx_request(wil, id, agg_wsize); |
706 | 706 | ||
707 | return 0; | 707 | return 0; |
708 | out_free: | 708 | out_free: |
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 9cd76da3738d..a94d67db59af 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | extern bool no_fw_recovery; | 26 | extern bool no_fw_recovery; |
27 | extern unsigned int mtu_max; | 27 | extern unsigned int mtu_max; |
28 | extern int agg_wsize; | ||
28 | 29 | ||
29 | #define WIL_NAME "wil6210" | 30 | #define WIL_NAME "wil6210" |
30 | #define WIL_FW_NAME "wil6210.fw" | 31 | #define WIL_FW_NAME "wil6210.fw" |
@@ -613,7 +614,7 @@ int wil_addba_rx_request(struct wil6210_priv *wil, u8 cidxtid, | |||
613 | __le16 ba_timeout, __le16 ba_seq_ctrl); | 614 | __le16 ba_timeout, __le16 ba_seq_ctrl); |
614 | void wil_back_rx_worker(struct work_struct *work); | 615 | void wil_back_rx_worker(struct work_struct *work); |
615 | void wil_back_rx_flush(struct wil6210_priv *wil); | 616 | void wil_back_rx_flush(struct wil6210_priv *wil); |
616 | int wil_addba_tx_request(struct wil6210_priv *wil, u8 ringid); | 617 | int wil_addba_tx_request(struct wil6210_priv *wil, u8 ringid, u16 wsize); |
617 | void wil_back_tx_worker(struct work_struct *work); | 618 | void wil_back_tx_worker(struct work_struct *work); |
618 | void wil_back_tx_flush(struct wil6210_priv *wil); | 619 | void wil_back_tx_flush(struct wil6210_priv *wil); |
619 | 620 | ||
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 8a4f8b7243e0..253816105f14 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -27,6 +27,11 @@ static uint max_assoc_sta = 1; | |||
27 | module_param(max_assoc_sta, uint, S_IRUGO | S_IWUSR); | 27 | module_param(max_assoc_sta, uint, S_IRUGO | S_IWUSR); |
28 | MODULE_PARM_DESC(max_assoc_sta, " Max number of stations associated to the AP"); | 28 | MODULE_PARM_DESC(max_assoc_sta, " Max number of stations associated to the AP"); |
29 | 29 | ||
30 | int agg_wsize; /* = 0; */ | ||
31 | module_param(agg_wsize, int, S_IRUGO | S_IWUSR); | ||
32 | MODULE_PARM_DESC(agg_wsize, " Window size for Tx Block Ack after connect;" | ||
33 | " 0 - use default; < 0 - don't auto-establish"); | ||
34 | |||
30 | /** | 35 | /** |
31 | * WMI event receiving - theory of operations | 36 | * WMI event receiving - theory of operations |
32 | * | 37 | * |
@@ -544,7 +549,7 @@ static void wmi_evt_eapol_rx(struct wil6210_priv *wil, int id, | |||
544 | } | 549 | } |
545 | } | 550 | } |
546 | 551 | ||
547 | static void wil_addba_tx_cid(struct wil6210_priv *wil, u8 cid) | 552 | static void wil_addba_tx_cid(struct wil6210_priv *wil, u8 cid, u16 wsize) |
548 | { | 553 | { |
549 | struct vring_tx_data *t; | 554 | struct vring_tx_data *t; |
550 | int i; | 555 | int i; |
@@ -556,7 +561,7 @@ static void wil_addba_tx_cid(struct wil6210_priv *wil, u8 cid) | |||
556 | if (!t->enabled) | 561 | if (!t->enabled) |
557 | continue; | 562 | continue; |
558 | 563 | ||
559 | wil_addba_tx_request(wil, i); | 564 | wil_addba_tx_request(wil, i, wsize); |
560 | } | 565 | } |
561 | } | 566 | } |
562 | 567 | ||
@@ -574,7 +579,8 @@ static void wmi_evt_linkup(struct wil6210_priv *wil, int id, void *d, int len) | |||
574 | } | 579 | } |
575 | 580 | ||
576 | wil->sta[cid].data_port_open = true; | 581 | wil->sta[cid].data_port_open = true; |
577 | wil_addba_tx_cid(wil, cid); | 582 | if (agg_wsize >= 0) |
583 | wil_addba_tx_cid(wil, cid, agg_wsize); | ||
578 | netif_carrier_on(ndev); | 584 | netif_carrier_on(ndev); |
579 | } | 585 | } |
580 | 586 | ||