From a0bcd08a8d719426df976d0718db146f94f53308 Mon Sep 17 00:00:00 2001 From: Dong Aisheng Date: Mon, 25 May 2015 19:13:05 +0800 Subject: [PATCH] MLK-10584 bcmdhd: fix connect Adhoc network warnings As part of starting up IBSS, CFG80211 driver needs BSS information to be plumbed into it. Hence in DHD we call cfg80211_infrom_bss() and it needs whole frame consist of IEs contained in beacon frame. But FW was passing frame buffer with some extra bytes preceded and when same is plumbed into CFG80211 it was not able to decode the frame and it ignores the frame as result we get such warnings. Using latest FW delivered by Broadcom to fix the issue. As well as wl_cfg80211.c changes are essential. This change is actually fix certain warnings seen when moving between IBSS and BSS network mode. Changes must be done in wl_cfg80211_change_virtual_iface() which you can find at wl_cfg80211.c and this file is not specific wl tool. Signed-off-by: Dong Aisheng (cherry picked from commit a6a35af7350b26c1e30cc14aa2ad6e117ab260dc) --- drivers/net/wireless/bcmdhd/wl_cfg80211.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index 57680452edbd..38c3c28ad3dd 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -1779,8 +1779,7 @@ wl_cfg80211_change_virtual_iface(struct wiphy *wiphy, struct net_device *ndev, #endif /* P2PONEINT */ } - if (ibss) { - infra = 0; + if (ibss || infra) { wl_set_mode_by_netdev(cfg, ndev, mode); err = wldev_ioctl(ndev, WLC_SET_INFRA, &infra, sizeof(s32), true); if (err < 0) { @@ -7837,7 +7836,7 @@ wl_notify_connect_status_ibss(struct bcm_cfg80211 *cfg, struct net_device *ndev, } } else if ((event == WLC_E_LINK && !(flags & WLC_EVENT_MSG_LINK)) || event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) { - wl_clr_drv_status(cfg, CONNECTED, ndev); + wl_clr_drv_status(cfg, DISCONNECTING, ndev); wl_link_down(cfg); wl_init_prof(cfg, ndev); } -- 2.17.1