MLK-10584 bcmdhd: fix connect Adhoc network warnings
authorDong Aisheng <b29396@freescale.com>
Mon, 25 May 2015 11:13:05 +0000 (19:13 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:01 +0000 (14:49 -0500)
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 <b29396@freescale.com>
(cherry picked from commit a6a35af7350b26c1e30cc14aa2ad6e117ab260dc)

drivers/net/wireless/bcmdhd/wl_cfg80211.c

index 5768045..38c3c28 100644 (file)
@@ -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);
        }