wireless/bcm43xxx: discard auth event if netdev down

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-07-02 12:58:28 +08:00 committed by Xiang Xiao
parent 752e48eb34
commit 14f1519d1e
2 changed files with 9 additions and 4 deletions

View File

@ -645,6 +645,11 @@ void bcmf_wl_auth_event_handler(FAR struct bcmf_dev_s *priv,
wlinfo("Got auth event %" PRId32 " status %" PRId32 " from <%s>\n",
type, status, event->src_name);
if (!priv->bc_bifup)
{
return;
}
bcmf_hexdump((uint8_t *)event, len, (unsigned long)event);
if (type == WLC_E_SET_SSID && status == WLC_E_STATUS_SUCCESS)

View File

@ -759,6 +759,10 @@ static int bcmf_ifdown(FAR struct net_driver_s *dev)
if (priv->bc_bifup)
{
/* Mark the device "down" */
priv->bc_bifup = false;
#ifdef CONFIG_IEEE80211_BROADCOM_LOWPOWER
if (!work_available(&priv->lp_work))
{
@ -768,10 +772,6 @@ static int bcmf_ifdown(FAR struct net_driver_s *dev)
bcmf_wl_enable(priv, false);
bcmf_wl_active(priv, false);
/* Mark the device "down" */
priv->bc_bifup = false;
}
leave_critical_section(flags);