brcmfmac: remove use of unconditional access of struct wireless_dev::netdev
authorArend van Spriel <arend@broadcom.com>
Fri, 5 Apr 2013 08:57:47 +0000 (10:57 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Apr 2013 19:28:44 +0000 (15:28 -0400)
commit7fa2e3529c51f1c3590964c1746cc48d04cbc0ab
tree63d2d873d85812f0f12013b1a6919886ba5714bf
parent5857f9c6a88845a7ae5be02582b6a07dab6ef7b4
brcmfmac: remove use of unconditional access of struct wireless_dev::netdev

With the introduction of the P2P_DEVICE interface type an instance of
struct wireless_dev does not always have a netdev assigned to it. Better
use container_of() construct to obtain internal structure and go from
there.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@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/wl_cfg80211.c