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(-)
Signature · 1 line
2.5.5
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().
--- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/rsi/rsi_91x_mac80211.c +6 -1
@@ -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 ;
Signature · 1 line
2.5.5
Re: [1/3] rsi: Add null check for virtual interfaces in wowlan config
Quoted 10 lines · Sushant Kumar Mishra
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 inrsi_wowlan_config()which was invoked by SDIO shutdown, results in a crash. Added a NULL check before accessing the network interfaces inrsi_wowlan_config().
Quoted 3 lines
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
Signature · 3 lines
https://patchwork.kernel.org/patch/10394551/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
PATCH 2/3 rsi: reset hibernate_resume flag to work hibernate resume in coex mode.
In reply to Sushant Kumar MishraFrom: 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.
--- drivers/net/wireless/rsi/rsi_91x_coex.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/rsi/rsi_91x_coex.c +1 -0
@@ -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 :
Signature · 1 line
2.5.5
PATCH 3/3 rsi: Set wowlan flag while writing wowlan config parameters
In reply to Sushant Kumar MishraFrom: 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.
--- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rsi/rsi_91x_mac80211.c +1 -1
@@ -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 ; }
Signature · 1 line
2.5.5