2018-05-11 14:54:51

by Sushant Kumar Mishra

[permalink] [raw]
Subject:

From: Sushant Kumar Mishra <[email protected]>

Date: Fri, 11 May 2018 19:27:48 +0530
Subject: [PATCH 0/3] rsi: wowlan fixes

This patch series will fix wowlan issues found in verification.

Sanjay Kumar Konduri (1):
rsi: Add null check for virtual interfaces in wowlan config

Siva Rebbagondla (2):
rsi: reset hibernate_resume flag to work hibernate resume in coex
mode.
rsi: Set wowlan flag while writing wowlan config parameters

drivers/net/wireless/rsi/rsi_91x_coex.c | 1 +
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)

--
2.5.5


2018-05-15 05:39:49

by Kalle Valo

[permalink] [raw]
Subject: Re: [1/3] rsi: Add null check for virtual interfaces in wowlan config

Sushant Kumar Mishra <[email protected]> wrote:

> From: Sanjay Kumar Konduri <[email protected]>
>
> When the "poweroff" command is executed after wowlan enabled, we have
> observed a system crash. In the system "poweroff" sequence, network-manager
> is sent to inactive state by cleaning up the network interfaces, using
> rsi_mac80211_remove_interface() and when driver tries to access those
> network interfaces in rsi_wowlan_config() which was invoked by SDIO
> shutdown, results in a crash. Added a NULL check before accessing the
> network interfaces in rsi_wowlan_config().
>
> Signed-off-by: Sanjay Kumar Konduri <[email protected]>
> Signed-off-by: Siva Rebbagondla <[email protected]>
> Signed-off-by: Sushant Kumar Mishra <[email protected]>

3 patches applied to wireless-drivers-next.git, thanks.

54b5172087ae rsi: Add null check for virtual interfaces in wowlan config
d76f8513fa90 rsi: reset hibernate_resume flag to work hibernate resume in coex mode.
1d18c5584c05 rsi: Set wowlan flag while writing wowlan config parameters

--
https://patchwork.kernel.org/patch/10394551/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2018-05-11 14:54:55

by Sushant Kumar Mishra

[permalink] [raw]
Subject: [PATCH 1/3] rsi: Add null check for virtual interfaces in wowlan config

From: Sanjay Kumar Konduri <[email protected]>

When the "poweroff" command is executed after wowlan enabled, we have
observed a system crash. In the system "poweroff" sequence, network-manager
is sent to inactive state by cleaning up the network interfaces, using
rsi_mac80211_remove_interface() and when driver tries to access those
network interfaces in rsi_wowlan_config() which was invoked by SDIO
shutdown, results in a crash. Added a NULL check before accessing the
network interfaces in rsi_wowlan_config().

Signed-off-by: Sanjay Kumar Konduri <[email protected]>
Signed-off-by: Siva Rebbagondla <[email protected]>
Signed-off-by: Sushant Kumar Mishra <[email protected]>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 80e7f4f..743706e 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -1804,10 +1804,15 @@ int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan)
struct rsi_common *common = adapter->priv;
u16 triggers = 0;
u16 rx_filter_word = 0;
- struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
+ struct ieee80211_bss_conf *bss = NULL;

rsi_dbg(INFO_ZONE, "Config WoWLAN to device\n");

+ if (!adapter->vifs[0])
+ return -EINVAL;
+
+ bss = &adapter->vifs[0]->bss_conf;
+
if (WARN_ON(!wowlan)) {
rsi_dbg(ERR_ZONE, "WoW triggers not enabled\n");
return -EINVAL;
--
2.5.5

2018-05-11 14:54:59

by Sushant Kumar Mishra

[permalink] [raw]
Subject: [PATCH 2/3] rsi: reset hibernate_resume flag to work hibernate resume in coex mode.

From: Siva Rebbagondla <[email protected]>

In coex mode, observed hibernate resume is not working properly, as the
hibernate_resume flag is not getting reset in rsi_coex_recv_pkt(),
when common card ready indication received from firmware. Hence resetting
hibernate_resume flag in this function.

Signed-off-by: Siva Rebbagondla <[email protected]>
Signed-off-by: Sushant Kumar Mishra <[email protected]>
---
drivers/net/wireless/rsi/rsi_91x_coex.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/rsi/rsi_91x_coex.c b/drivers/net/wireless/rsi/rsi_91x_coex.c
index d055099..c8ba148 100644
--- a/drivers/net/wireless/rsi/rsi_91x_coex.c
+++ b/drivers/net/wireless/rsi/rsi_91x_coex.c
@@ -73,6 +73,7 @@ int rsi_coex_recv_pkt(struct rsi_common *common, u8 *msg)
switch (msg_type) {
case COMMON_CARD_READY_IND:
rsi_dbg(INFO_ZONE, "common card ready received\n");
+ common->hibernate_resume = false;
rsi_handle_card_ready(common, msg);
break;
case SLEEP_NOTIFY_IND:
--
2.5.5

2018-05-11 14:55:02

by Sushant Kumar Mishra

[permalink] [raw]
Subject: [PATCH 3/3] rsi: Set wowlan flag while writing wowlan config parameters

From: Siva Rebbagondla <[email protected]>

As wowlan enable flag did not set, while writing wowlan parameters to
card using rsi_send_vap_dynamic_update, which results firmware is unable to
set wowlan configurations. Hence, setting wowlan flag before sending
parameters.

Signed-off-by: Siva Rebbagondla <[email protected]>
Signed-off-by: Sushant Kumar Mishra <[email protected]>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 743706e..3faa044 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -1818,6 +1818,7 @@ int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan)
return -EINVAL;
}

+ common->wow_flags |= RSI_WOW_ENABLED;
triggers = rsi_wow_map_triggers(common, wowlan);
if (!triggers) {
rsi_dbg(ERR_ZONE, "%s:No valid WoW triggers\n", __func__);
@@ -1840,7 +1841,6 @@ int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan)

rx_filter_word = (ALLOW_DATA_ASSOC_PEER | DISALLOW_BEACONS);
rsi_send_rx_filter_frame(common, rx_filter_word);
- common->wow_flags |= RSI_WOW_ENABLED;

return 0;
}
--
2.5.5