aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
diff options
context:
space:
mode:
authorHante Meuleman <meuleman@broadcom.com>2012-10-22 13:36:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-29 15:28:07 -0400
commit81f5dcb8083077ca9bca10ca8e34bc8daf768dce (patch)
tree871af0a3b9a94df2f286ce36d4c9b389887cab41 /drivers/net/wireless/brcm80211/brcmfmac/dhd.h
parent6c4a5f2413da948e7d1d189c9d94f05afde8702a (diff)
brcmfmac: refactor firmware interface layer.
Refactor the functions that are related to getting and setting data to and and from the firmware. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@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.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
index 0510960ad5ff..a73da9dd05e0 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
@@ -318,6 +318,12 @@ struct brcmf_event {
318#define BRCMF_E_LINK_ASSOC_REC 3 318#define BRCMF_E_LINK_ASSOC_REC 3
319#define BRCMF_E_LINK_BSSCFG_DIS 4 319#define BRCMF_E_LINK_BSSCFG_DIS 4
320 320
321/* Small, medium and maximum buffer size for dcmd
322 */
323#define BRCMF_DCMD_SMLEN 256
324#define BRCMF_DCMD_MEDLEN 1536
325#define BRCMF_DCMD_MAXLEN 8192
326
321/* Pattern matching filter. Specifies an offset within received packets to 327/* Pattern matching filter. Specifies an offset within received packets to
322 * start matching, the pattern to match, the size of the pattern, and a bitmask 328 * start matching, the pattern to match, the size of the pattern, and a bitmask
323 * that indicates which bits within the pattern should be matched. 329 * that indicates which bits within the pattern should be matched.
@@ -661,6 +667,7 @@ struct brcmf_pub {
661 struct brcmf_if *iflist[BRCMF_MAX_IFS]; 667 struct brcmf_if *iflist[BRCMF_MAX_IFS];
662 668
663 struct mutex proto_block; 669 struct mutex proto_block;
670 unsigned char proto_buf[BRCMF_DCMD_MAXLEN];
664 671
665 struct work_struct setmacaddr_work; 672 struct work_struct setmacaddr_work;
666 struct work_struct multicast_work; 673 struct work_struct multicast_work;
@@ -671,6 +678,22 @@ struct brcmf_pub {
671#endif 678#endif
672}; 679};
673 680
681/* struct brcmf_if - Interface control information
682 *
683 * @drvr: back pointer to brcmf_pub
684 * @ndev: interface net device pointer
685 * @stats: net device statistics
686 * @idx: iface idx in dongle
687 * @mac_addr: assigned MAC address
688 */
689struct brcmf_if {
690 struct brcmf_pub *drvr;
691 struct net_device *ndev;
692 struct net_device_stats stats;
693 int idx;
694 u8 mac_addr[ETH_ALEN];
695};
696
674struct brcmf_if_event { 697struct brcmf_if_event {
675 u8 ifidx; 698 u8 ifidx;
676 u8 action; 699 u8 action;
@@ -701,6 +724,8 @@ extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
701/* Query dongle */ 724/* Query dongle */
702extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, 725extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx,
703 uint cmd, void *buf, uint len); 726 uint cmd, void *buf, uint len);
727extern int brcmf_proto_cdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd,
728 void *buf, uint len);
704 729
705extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name); 730extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name);
706extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx, 731extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx,
@@ -713,8 +738,4 @@ extern void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg);
713extern void brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, 738extern void brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg,
714 int enable, int master_mode); 739 int enable, int master_mode);
715 740
716#define BRCMF_DCMD_SMLEN 256 /* "small" cmd buffer required */
717#define BRCMF_DCMD_MEDLEN 1536 /* "med" cmd buffer required */
718#define BRCMF_DCMD_MAXLEN 8192 /* max length cmd buffer required */
719
720#endif /* _BRCMF_H_ */ 741#endif /* _BRCMF_H_ */