summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
diff options
context:
space:
mode:
authorArend van Spriel2012-10-22 19:36:19 +0200
committerJohn W. Linville2012-10-29 20:28:22 +0100
commit1d4fd8d78f465cebe2502671588f75ba2f758cfa (patch)
tree7269d4d4cfd8e074462f76305e2bf35309c2c7ff /drivers/net/wireless/brcm80211/brcmfmac/dhd.h
parentbrcmfmac: clean usb download code. (diff)
downloadkernel-qcow2-linux-1d4fd8d78f465cebe2502671588f75ba2f758cfa.tar.gz
kernel-qcow2-linux-1d4fd8d78f465cebe2502671588f75ba2f758cfa.tar.xz
kernel-qcow2-linux-1d4fd8d78f465cebe2502671588f75ba2f758cfa.zip
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.h43
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 faa81efbfbbb..d848bb934b7d 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,