brcmfmac: obtain wdev using vif object in action frame rx
authorArend van Spriel <arend@broadcom.com>
Fri, 5 Apr 2013 08:57:53 +0000 (10:57 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Apr 2013 19:28:47 +0000 (15:28 -0400)
The function brcmf_p2p_notify_action_frame_rx() the wireless_dev
is needed to pass the action frame to cfg80211. The wireless_dev
is held in brcmf_cfg80211_vif object. Use that instead of the
ieee80211_ptr in net_device as P2P_DEVICE interface does not have
a net_device associated with it.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/p2p.c

index 6f165565fe61b312916d8b5fc321858f212143e6..94ff045df2b3a29716a01bb25058403cae8e74e0 100644 (file)
@@ -1431,7 +1431,8 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp,
                                              CHSPEC_IS2G(chanspec) ?
                                              IEEE80211_BAND_2GHZ :
                                              IEEE80211_BAND_5GHZ);
-       wdev = ifp->ndev->ieee80211_ptr;
+
+       wdev = &ifp->vif->wdev;
        cfg80211_rx_mgmt(wdev, freq, 0, (u8 *)mgmt_frame, mgmt_frame_len,
                         GFP_ATOMIC);