wireless/bcm43xxx: discard auth event if netdev down
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
752e48eb34
commit
14f1519d1e
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue