diff mbox series

[SRU,Xenial,RESEND] UBUNTU: SAUCE: Redpine: fix for firmware assert upon assoc timeout

Message ID 1542782256-8199-1-git-send-email-siva8118@gmail.com
State New
Headers show
Series [SRU,Xenial,RESEND] UBUNTU: SAUCE: Redpine: fix for firmware assert upon assoc timeout | expand

Commit Message

Siva Rebbagondla Nov. 21, 2018, 6:37 a.m. UTC
From: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1804360

When Association timeout happens and station tries to scan, observed below
firmware assert.

Root cause: When association starts, driver is sending station add peer
notify to firmware but when Association timeout happens, driver is not
sending station peer delete to Firmware. Hence, FW is going into DEEP SLEEP
in associated state, which causes below Firmware assert.

Fix: sending station delete peer notify when assoc timeout happens

...skipping...
wlan0: authenticate with ac:a3:1e:a1:1e:85
wlan0: send auth to ac:a3:1e:a1:1e:85 (try 1/3)
wlan0: authenticated
wlan0: associate with ac:a3:1e:a1:1e:85 (try 1/3)
wlan0: associate with ac:a3:1e:a1:1e:85 (try 2/3)
wlan0: associate with ac:a3:1e:a1:1e:85 (try 3/3)
wlan0: association with ac:a3:1e:a1:1e:85 timed out
ven_rsi_91x: rsi_disable_ps: Cannot accept disable PS in PS_NONE state
ven_rsi_91x: rsi_interrupt_handler: ==> FIRMWARE Assert <==
ven_rsi_91x: rsi_interrupt_handler: Firmware Status is 0xa
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
---
 ubuntu/rsi/rsi_91x_mac80211.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Wen-chien Jesse Sung Dec. 3, 2018, 3:46 p.m. UTC | #1
Acked-By: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Shrirang Bagul Dec. 4, 2018, 4:31 a.m. UTC | #2
On Wed, 2018-11-21 at 12:07 +0530, Siva Rebbagondla wrote:
> From: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
> 
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1804360
> 
> When Association timeout happens and station tries to scan, observed below
> firmware assert.
> 
> Root cause: When association starts, driver is sending station add peer
> notify to firmware but when Association timeout happens, driver is not
> sending station peer delete to Firmware. Hence, FW is going into DEEP SLEEP
> in associated state, which causes below Firmware assert.
> 
> Fix: sending station delete peer notify when assoc timeout happens
> 
> ...skipping...
> wlan0: authenticate with ac:a3:1e:a1:1e:85
> wlan0: send auth to ac:a3:1e:a1:1e:85 (try 1/3)
> wlan0: authenticated
> wlan0: associate with ac:a3:1e:a1:1e:85 (try 1/3)
> wlan0: associate with ac:a3:1e:a1:1e:85 (try 2/3)
> wlan0: associate with ac:a3:1e:a1:1e:85 (try 3/3)
> wlan0: association with ac:a3:1e:a1:1e:85 timed out
> ven_rsi_91x: rsi_disable_ps: Cannot accept disable PS in PS_NONE state
> ven_rsi_91x: rsi_interrupt_handler: ==> FIRMWARE Assert <==
> ven_rsi_91x: rsi_interrupt_handler: Firmware Status is 0xa
> IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
> 
> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Acked-By: Shrirang Bagul <shrirang.bagul@canonical.com>
Kleber Sacilotto de Souza Dec. 4, 2018, 3:08 p.m. UTC | #3
On 11/21/18 7:37 AM, Siva Rebbagondla wrote:
> From: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
>
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1804360

Hi Siva,


Please add the BugLink reference in the following format:

BugLink: https://bugs.launchpad.net/bugs/<bug number>


I have fixed it this time when applying the patch.

>
> When Association timeout happens and station tries to scan, observed below
> firmware assert.
>
> Root cause: When association starts, driver is sending station add peer
> notify to firmware but when Association timeout happens, driver is not
> sending station peer delete to Firmware. Hence, FW is going into DEEP SLEEP
> in associated state, which causes below Firmware assert.
>
> Fix: sending station delete peer notify when assoc timeout happens
>
> ...skipping...
> wlan0: authenticate with ac:a3:1e:a1:1e:85
> wlan0: send auth to ac:a3:1e:a1:1e:85 (try 1/3)
> wlan0: authenticated
> wlan0: associate with ac:a3:1e:a1:1e:85 (try 1/3)
> wlan0: associate with ac:a3:1e:a1:1e:85 (try 2/3)
> wlan0: associate with ac:a3:1e:a1:1e:85 (try 3/3)
> wlan0: association with ac:a3:1e:a1:1e:85 timed out
> ven_rsi_91x: rsi_disable_ps: Cannot accept disable PS in PS_NONE state
> ven_rsi_91x: rsi_interrupt_handler: ==> FIRMWARE Assert <==
> ven_rsi_91x: rsi_interrupt_handler: Firmware Status is 0xa
> IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
>
> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
> ---
>  ubuntu/rsi/rsi_91x_mac80211.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c
> index 696802f..78702ff 100644
> --- a/ubuntu/rsi/rsi_91x_mac80211.c
> +++ b/ubuntu/rsi/rsi_91x_mac80211.c
> @@ -2687,7 +2687,24 @@ out:
>  	return status;
>  }
>  
> +static void rsi_mac80211_event_callback(struct ieee80211_hw *hw,
> +					struct ieee80211_vif *vif,
> +					const struct ieee80211_event *event)
> +{
> +	struct rsi_hw *adapter = hw->priv;
> +	struct rsi_common *common = adapter->priv;
> +	struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
>  
> +	if (event->type == MLME_EVENT && event->u.mlme.data == ASSOC_EVENT &&
> +	    event->u.mlme.status == MLME_TIMEOUT) {
> +		ven_rsi_dbg(ERR_ZONE, "%s: ASSOC Timeout: reason = %d\n",
> +			    __func__, event->u.mlme.reason);
> +		rsi_send_sta_notify_frame(common, STA_OPMODE,
> +					  STA_DISCONNECTED,
> +					  bss->bssid, bss->qos,
> +					  bss->aid, 0);
> +	}
> +}
>  
>  static struct ieee80211_ops mac80211_ops = {
>  	.tx = rsi_mac80211_tx,
> @@ -2722,6 +2739,7 @@ static struct ieee80211_ops mac80211_ops = {
>  #endif
>  	.remain_on_channel = rsi_mac80211_roc,
>  	.cancel_remain_on_channel = rsi_mac80211_cancel_roc,
> +	.event_callback = rsi_mac80211_event_callback,
>  };
>  
>  /**

Applied to xenial/master-next branch.

Thanks,
Kleber
diff mbox series

Patch

diff --git a/ubuntu/rsi/rsi_91x_mac80211.c b/ubuntu/rsi/rsi_91x_mac80211.c
index 696802f..78702ff 100644
--- a/ubuntu/rsi/rsi_91x_mac80211.c
+++ b/ubuntu/rsi/rsi_91x_mac80211.c
@@ -2687,7 +2687,24 @@  out:
 	return status;
 }
 
+static void rsi_mac80211_event_callback(struct ieee80211_hw *hw,
+					struct ieee80211_vif *vif,
+					const struct ieee80211_event *event)
+{
+	struct rsi_hw *adapter = hw->priv;
+	struct rsi_common *common = adapter->priv;
+	struct ieee80211_bss_conf *bss = &adapter->vifs[0]->bss_conf;
 
+	if (event->type == MLME_EVENT && event->u.mlme.data == ASSOC_EVENT &&
+	    event->u.mlme.status == MLME_TIMEOUT) {
+		ven_rsi_dbg(ERR_ZONE, "%s: ASSOC Timeout: reason = %d\n",
+			    __func__, event->u.mlme.reason);
+		rsi_send_sta_notify_frame(common, STA_OPMODE,
+					  STA_DISCONNECTED,
+					  bss->bssid, bss->qos,
+					  bss->aid, 0);
+	}
+}
 
 static struct ieee80211_ops mac80211_ops = {
 	.tx = rsi_mac80211_tx,
@@ -2722,6 +2739,7 @@  static struct ieee80211_ops mac80211_ops = {
 #endif
 	.remain_on_channel = rsi_mac80211_roc,
 	.cancel_remain_on_channel = rsi_mac80211_cancel_roc,
+	.event_callback = rsi_mac80211_event_callback,
 };
 
 /**