All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.9 0/2] wlcore performance improvement fixes
@ 2017-05-11 12:12 Amit Pundir
  2017-05-11 12:12 ` [PATCH for-4.9 1/2] wlcore: Pass win_size taken from ieee80211_sta to FW Amit Pundir
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Amit Pundir @ 2017-05-11 12:12 UTC (permalink / raw)
  To: Greg KH; +Cc: Stable, Maxim Altshul, Kalle Valo

Hi Greg,

Please consider following wlcore performance fixes for linux-4.9.y.

These wlcore patches add a functionality in which the firmware is able
to notify the driver that the aggregation window size must be changed,
and in turn the driver will notify mac80211. Here is the original
submission: http://www.spinics.net/lists/linux-wireless/msg153522.html

We run into a performance issue recently on android-4.9 and earlier
kernels with AOSP on Hikey(using wl1835 module). Here is the bug
report: https://bugs.96boards.org/show_bug.cgi?id=497. These two
patches fix this performance regression.

Maxim Altshul (2):
  wlcore: Pass win_size taken from ieee80211_sta to FW
  wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event

 drivers/net/wireless/ti/wl18xx/event.c | 28 ++++++++++++++++++++++++++++
 drivers/net/wireless/ti/wl18xx/event.h |  1 +
 drivers/net/wireless/ti/wl18xx/main.c  |  3 ++-
 drivers/net/wireless/ti/wlcore/acx.c   |  5 +++--
 drivers/net/wireless/ti/wlcore/acx.h   |  3 ++-
 drivers/net/wireless/ti/wlcore/main.c  |  6 ++++--
 6 files changed, 40 insertions(+), 6 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH for-4.9 1/2] wlcore: Pass win_size taken from ieee80211_sta to FW
  2017-05-11 12:12 [PATCH for-4.9 0/2] wlcore performance improvement fixes Amit Pundir
@ 2017-05-11 12:12 ` Amit Pundir
  2017-05-11 12:12 ` [PATCH for-4.9 2/2] wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event Amit Pundir
  2017-05-11 12:27 ` [PATCH for-4.9 0/2] wlcore performance improvement fixes Greg KH
  2 siblings, 0 replies; 6+ messages in thread
From: Amit Pundir @ 2017-05-11 12:12 UTC (permalink / raw)
  To: Greg KH; +Cc: Stable, Maxim Altshul, Kalle Valo

From: Maxim Altshul <maxim.altshul@ti.com>

commit 42c7372a111630dab200c2f959424f5ec3bf79a4 upstream.

When starting a new BA session, we must pass the win_size to the FW.

To do this we take max_rx_aggregation_subframes (BA RX win size)
which is stored in ieee80211_sta structure (e.g per link and not per HW)

We will use the value stored per link when passing the win_size to
firmware through the ACX_BA_SESSION_RX_SETUP command.

Signed-off-by: Maxim Altshul <maxim.altshul@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
 drivers/net/wireless/ti/wlcore/acx.c  | 5 +++--
 drivers/net/wireless/ti/wlcore/acx.h  | 3 ++-
 drivers/net/wireless/ti/wlcore/main.c | 6 ++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c
index 26cc23f32241..a4859993db3c 100644
--- a/drivers/net/wireless/ti/wlcore/acx.c
+++ b/drivers/net/wireless/ti/wlcore/acx.c
@@ -1419,7 +1419,8 @@ int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
 
 /* setup BA session receiver setting in the FW. */
 int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
-				       u16 ssn, bool enable, u8 peer_hlid)
+				       u16 ssn, bool enable, u8 peer_hlid,
+				       u8 win_size)
 {
 	struct wl1271_acx_ba_receiver_setup *acx;
 	int ret;
@@ -1435,7 +1436,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
 	acx->hlid = peer_hlid;
 	acx->tid = tid_index;
 	acx->enable = enable;
-	acx->win_size = wl->conf.ht.rx_ba_win_size;
+	acx->win_size =	win_size;
 	acx->ssn = ssn;
 
 	ret = wlcore_cmd_configure_failsafe(wl, ACX_BA_SESSION_RX_SETUP, acx,
diff --git a/drivers/net/wireless/ti/wlcore/acx.h b/drivers/net/wireless/ti/wlcore/acx.h
index 6321ed472891..f46d7fdf9a00 100644
--- a/drivers/net/wireless/ti/wlcore/acx.h
+++ b/drivers/net/wireless/ti/wlcore/acx.h
@@ -1113,7 +1113,8 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl,
 int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
 				       struct wl12xx_vif *wlvif);
 int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
-				       u16 ssn, bool enable, u8 peer_hlid);
+				       u16 ssn, bool enable, u8 peer_hlid,
+				       u8 win_size);
 int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 			u64 *mactime);
 int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 471521a0db7b..5438975c7ff2 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5285,7 +5285,9 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 		}
 
 		ret = wl12xx_acx_set_ba_receiver_session(wl, tid, *ssn, true,
-							 hlid);
+				hlid,
+				params->buf_size);
+
 		if (!ret) {
 			*ba_bitmap |= BIT(tid);
 			wl->ba_rx_session_count++;
@@ -5306,7 +5308,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 		}
 
 		ret = wl12xx_acx_set_ba_receiver_session(wl, tid, 0, false,
-							 hlid);
+							 hlid, 0);
 		if (!ret) {
 			*ba_bitmap &= ~BIT(tid);
 			wl->ba_rx_session_count--;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH for-4.9 2/2] wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event
  2017-05-11 12:12 [PATCH for-4.9 0/2] wlcore performance improvement fixes Amit Pundir
  2017-05-11 12:12 ` [PATCH for-4.9 1/2] wlcore: Pass win_size taken from ieee80211_sta to FW Amit Pundir
@ 2017-05-11 12:12 ` Amit Pundir
  2017-05-11 12:27 ` [PATCH for-4.9 0/2] wlcore performance improvement fixes Greg KH
  2 siblings, 0 replies; 6+ messages in thread
From: Amit Pundir @ 2017-05-11 12:12 UTC (permalink / raw)
  To: Greg KH; +Cc: Stable, Maxim Altshul, Kalle Valo

From: Maxim Altshul <maxim.altshul@ti.com>

commit e7ee74b56f23ba447d3124f2eccc32033cca501d upstream.

This event is used by the Firmware to limit the RX BA win size
for a specific link.

The event handler updates the new size in the mac's sta->sta struct.

BA sessions opened for that link will use the new restricted
win_size. This limitation remains until a new update is received or
until the link is closed.

Signed-off-by: Maxim Altshul <maxim.altshul@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
 drivers/net/wireless/ti/wl18xx/event.c | 28 ++++++++++++++++++++++++++++
 drivers/net/wireless/ti/wl18xx/event.h |  1 +
 drivers/net/wireless/ti/wl18xx/main.c  |  3 ++-
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wl18xx/event.c b/drivers/net/wireless/ti/wl18xx/event.c
index b36ce185c9f2..86fa0fc69084 100644
--- a/drivers/net/wireless/ti/wl18xx/event.c
+++ b/drivers/net/wireless/ti/wl18xx/event.c
@@ -218,5 +218,33 @@ int wl18xx_process_mailbox_events(struct wl1271 *wl)
 	if (vector & FW_LOGGER_INDICATION)
 		wlcore_event_fw_logger(wl);
 
+	if (vector & RX_BA_WIN_SIZE_CHANGE_EVENT_ID) {
+		struct wl12xx_vif *wlvif;
+		struct ieee80211_vif *vif;
+		struct ieee80211_sta *sta;
+		u8 link_id = mbox->rx_ba_link_id;
+		u8 win_size = mbox->rx_ba_win_size;
+		const u8 *addr;
+
+		wlvif = wl->links[link_id].wlvif;
+		vif = wl12xx_wlvif_to_vif(wlvif);
+
+		/* Update RX aggregation window size and call
+		 * MAC routine to stop active RX aggregations for this link
+		 */
+		if (wlvif->bss_type != BSS_TYPE_AP_BSS)
+			addr = vif->bss_conf.bssid;
+		else
+			addr = wl->links[link_id].addr;
+
+		sta = ieee80211_find_sta(vif, addr);
+		if (sta) {
+			sta->max_rx_aggregation_subframes = win_size;
+			ieee80211_stop_rx_ba_session(vif,
+						wl->links[link_id].ba_bitmap,
+						addr);
+		}
+	}
+
 	return 0;
 }
diff --git a/drivers/net/wireless/ti/wl18xx/event.h b/drivers/net/wireless/ti/wl18xx/event.h
index ce8ea9c04052..4af297fbb529 100644
--- a/drivers/net/wireless/ti/wl18xx/event.h
+++ b/drivers/net/wireless/ti/wl18xx/event.h
@@ -38,6 +38,7 @@ enum {
 	REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID      = BIT(18),
 	DFS_CHANNELS_CONFIG_COMPLETE_EVENT       = BIT(19),
 	PERIODIC_SCAN_REPORT_EVENT_ID            = BIT(20),
+	RX_BA_WIN_SIZE_CHANGE_EVENT_ID           = BIT(21),
 	SMART_CONFIG_SYNC_EVENT_ID               = BIT(22),
 	SMART_CONFIG_DECODE_EVENT_ID             = BIT(23),
 	TIME_SYNC_EVENT_ID                       = BIT(24),
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index 06d6943b257c..5bdf7a03e3dd 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -1041,7 +1041,8 @@ static int wl18xx_boot(struct wl1271 *wl)
 		SMART_CONFIG_SYNC_EVENT_ID |
 		SMART_CONFIG_DECODE_EVENT_ID |
 		TIME_SYNC_EVENT_ID |
-		FW_LOGGER_INDICATION;
+		FW_LOGGER_INDICATION |
+		RX_BA_WIN_SIZE_CHANGE_EVENT_ID;
 
 	wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH for-4.9 0/2] wlcore performance improvement fixes
  2017-05-11 12:12 [PATCH for-4.9 0/2] wlcore performance improvement fixes Amit Pundir
  2017-05-11 12:12 ` [PATCH for-4.9 1/2] wlcore: Pass win_size taken from ieee80211_sta to FW Amit Pundir
  2017-05-11 12:12 ` [PATCH for-4.9 2/2] wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event Amit Pundir
@ 2017-05-11 12:27 ` Greg KH
  2017-05-11 12:32   ` Amit Pundir
  2 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2017-05-11 12:27 UTC (permalink / raw)
  To: Amit Pundir; +Cc: Stable, Maxim Altshul, Kalle Valo

On Thu, May 11, 2017 at 05:42:19PM +0530, Amit Pundir wrote:
> Hi Greg,
> 
> Please consider following wlcore performance fixes for linux-4.9.y.
> 
> These wlcore patches add a functionality in which the firmware is able
> to notify the driver that the aggregation window size must be changed,
> and in turn the driver will notify mac80211. Here is the original
> submission: http://www.spinics.net/lists/linux-wireless/msg153522.html
> 
> We run into a performance issue recently on android-4.9 and earlier
> kernels with AOSP on Hikey(using wl1835 module). Here is the bug
> report: https://bugs.96boards.org/show_bug.cgi?id=497. These two
> patches fix this performance regression.

No objection from me.  Should these also to into 4.4-stable?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH for-4.9 0/2] wlcore performance improvement fixes
  2017-05-11 12:27 ` [PATCH for-4.9 0/2] wlcore performance improvement fixes Greg KH
@ 2017-05-11 12:32   ` Amit Pundir
  2017-05-11 15:36     ` Amit Pundir
  0 siblings, 1 reply; 6+ messages in thread
From: Amit Pundir @ 2017-05-11 12:32 UTC (permalink / raw)
  To: Greg KH; +Cc: Stable, Maxim Altshul, Kalle Valo

On 11 May 2017 at 17:57, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Thu, May 11, 2017 at 05:42:19PM +0530, Amit Pundir wrote:
>> Hi Greg,
>>
>> Please consider following wlcore performance fixes for linux-4.9.y.
>>
>> These wlcore patches add a functionality in which the firmware is able
>> to notify the driver that the aggregation window size must be changed,
>> and in turn the driver will notify mac80211. Here is the original
>> submission: http://www.spinics.net/lists/linux-wireless/msg153522.html
>>
>> We run into a performance issue recently on android-4.9 and earlier
>> kernels with AOSP on Hikey(using wl1835 module). Here is the bug
>> report: https://bugs.96boards.org/show_bug.cgi?id=497. These two
>> patches fix this performance regression.
>
> No objection from me.  Should these also to into 4.4-stable?

Doesn't build in its current form for 4.4. I didn't spend any time
refactoring it for 4.4, but I'll send you a refactored version soon if
I can.

Regards,
Amit Pundir

>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH for-4.9 0/2] wlcore performance improvement fixes
  2017-05-11 12:32   ` Amit Pundir
@ 2017-05-11 15:36     ` Amit Pundir
  0 siblings, 0 replies; 6+ messages in thread
From: Amit Pundir @ 2017-05-11 15:36 UTC (permalink / raw)
  To: Greg KH; +Cc: Stable, Maxim Altshul, Kalle Valo

On 11 May 2017 at 18:02, Amit Pundir <amit.pundir@linaro.org> wrote:
> On 11 May 2017 at 17:57, Greg KH <gregkh@linuxfoundation.org> wrote:
>> On Thu, May 11, 2017 at 05:42:19PM +0530, Amit Pundir wrote:
>>> Hi Greg,
>>>
>>> Please consider following wlcore performance fixes for linux-4.9.y.
>>>
>>> These wlcore patches add a functionality in which the firmware is able
>>> to notify the driver that the aggregation window size must be changed,
>>> and in turn the driver will notify mac80211. Here is the original
>>> submission: http://www.spinics.net/lists/linux-wireless/msg153522.html
>>>
>>> We run into a performance issue recently on android-4.9 and earlier
>>> kernels with AOSP on Hikey(using wl1835 module). Here is the bug
>>> report: https://bugs.96boards.org/show_bug.cgi?id=497. These two
>>> patches fix this performance regression.
>>
>> No objection from me.  Should these also to into 4.4-stable?
>
> Doesn't build in its current form for 4.4. I didn't spend any time
> refactoring it for 4.4, but I'll send you a refactored version soon if
> I can.

I have rebased these patches for linux-4.4.y along with 3 other
related mac80211 upstream fixes and they build fine. I'm waiting for
the test results before I send them across for 4.4.y.

Regards,
Amit Pundir

>
> Regards,
> Amit Pundir
>
>>
>> thanks,
>>
>> greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-11 15:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 12:12 [PATCH for-4.9 0/2] wlcore performance improvement fixes Amit Pundir
2017-05-11 12:12 ` [PATCH for-4.9 1/2] wlcore: Pass win_size taken from ieee80211_sta to FW Amit Pundir
2017-05-11 12:12 ` [PATCH for-4.9 2/2] wlcore: Add RX_BA_WIN_SIZE_CHANGE_EVENT event Amit Pundir
2017-05-11 12:27 ` [PATCH for-4.9 0/2] wlcore performance improvement fixes Greg KH
2017-05-11 12:32   ` Amit Pundir
2017-05-11 15:36     ` Amit Pundir

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.