diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-10-22 10:36:19 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-29 15:28:22 -0400 |
commit | 1d4fd8d78f465cebe2502671588f75ba2f758cfa (patch) | |
tree | 7269d4d4cfd8e074462f76305e2bf35309c2c7ff /drivers/net/wireless/brcm80211/brcmfmac/dhd.h | |
parent | 1e271c9564132d9b5906819d7c62fbb5669ae8e9 (diff) |
brcmfmac: extend struct brcmf_if with bssidx field
When the firmware notifies the driver about adding a new interface
it also provides an index for the bss associated with this interface.
This index will be needed for upcoming features like peer-to-peer.
By adding this index in struct brcmf_if it is easy to obtain as this
will be associated with the net_device private data.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd.h')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h index faa81efbfbb..d848bb934b7 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h @@ -677,20 +677,9 @@ struct brcmf_pub { #endif }; -/* struct brcmf_if - Interface control information - * - * @drvr: back pointer to brcmf_pub - * @ndev: interface net device pointer - * @stats: net device statistics - * @idx: iface idx in dongle - * @mac_addr: assigned MAC address - */ -struct brcmf_if { - struct brcmf_pub *drvr; - struct net_device *ndev; - struct net_device_stats stats; - int idx; - u8 mac_addr[ETH_ALEN]; +struct bcmevent_name { + uint event; + const char *name; }; struct brcmf_if_event { @@ -700,11 +689,31 @@ struct brcmf_if_event { u8 bssidx; }; -struct bcmevent_name { - uint event; - const char *name; +/** + * struct brcmf_if - interface control information. + * + * @drvr: points to device related information. + * @ndev: associated network device. + * @stats: interface specific network statistics. + * @idx: interface index in device firmware. + * @bssidx: index of bss associated with this interface. + * @mac_addr: assigned mac address. + */ +struct brcmf_if { + struct brcmf_pub *drvr; + struct net_device *ndev; + struct net_device_stats stats; + int idx; + s32 bssidx; + u8 mac_addr[ETH_ALEN]; }; +static inline s32 brcmf_ndev_bssidx(struct net_device *ndev) +{ + struct brcmf_if *ifp = netdev_priv(ndev); + return ifp->bssidx; +} + extern const struct bcmevent_name bcmevent_names[]; extern uint brcmf_c_mkiovar(char *name, char *data, uint datalen, |