diff options
author | Hante Meuleman <meuleman@broadcom.com> | 2012-11-14 21:46:23 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-16 14:29:05 -0500 |
commit | b87e2c482510d56563873827783046a8eece5829 (patch) | |
tree | a88eb85c309040293af7244bcbb2d161a1be503a /drivers/net/wireless/brcm80211/brcmfmac | |
parent | 5a7a59d254b27ab90ba49dbae51cadc4775b3150 (diff) |
brcmfmac: code cleanup
Removing obsolete functions and prototypes. Moving (and renaming)
defines to place with similar definitions. Removing unnecessary
includes.
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')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 20 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 38 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_proto.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fwil.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/usb.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 17 |
12 files changed, 16 insertions, 119 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 6dd75ccd2399..a80050223710 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
@@ -491,7 +491,6 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func, | |||
491 | 491 | ||
492 | sdiodev->bus_if = bus_if; | 492 | sdiodev->bus_if = bus_if; |
493 | bus_if->bus_priv.sdio = sdiodev; | 493 | bus_if->bus_priv.sdio = sdiodev; |
494 | bus_if->type = SDIO_BUS; | ||
495 | bus_if->align = BRCMF_SDALIGN; | 494 | bus_if->align = BRCMF_SDALIGN; |
496 | dev_set_drvdata(&func->dev, bus_if); | 495 | dev_set_drvdata(&func->dev, bus_if); |
497 | dev_set_drvdata(&sdiodev->func[1]->dev, bus_if); | 496 | dev_set_drvdata(&sdiodev->func[1]->dev, bus_if); |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h index 499c5c240e04..24bc4e3e162b 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h | |||
@@ -40,8 +40,11 @@ | |||
40 | #define BRCMF_C_GET_SSID 25 | 40 | #define BRCMF_C_GET_SSID 25 |
41 | #define BRCMF_C_SET_SSID 26 | 41 | #define BRCMF_C_SET_SSID 26 |
42 | #define BRCMF_C_GET_CHANNEL 29 | 42 | #define BRCMF_C_GET_CHANNEL 29 |
43 | #define BRCMF_C_SET_CHANNEL 30 | ||
43 | #define BRCMF_C_GET_SRL 31 | 44 | #define BRCMF_C_GET_SRL 31 |
45 | #define BRCMF_C_SET_SRL 32 | ||
44 | #define BRCMF_C_GET_LRL 33 | 46 | #define BRCMF_C_GET_LRL 33 |
47 | #define BRCMF_C_SET_LRL 34 | ||
45 | #define BRCMF_C_GET_RADIO 37 | 48 | #define BRCMF_C_GET_RADIO 37 |
46 | #define BRCMF_C_SET_RADIO 38 | 49 | #define BRCMF_C_SET_RADIO 38 |
47 | #define BRCMF_C_GET_PHYTYPE 39 | 50 | #define BRCMF_C_GET_PHYTYPE 39 |
@@ -60,6 +63,7 @@ | |||
60 | #define BRCMF_C_SET_COUNTRY 84 | 63 | #define BRCMF_C_SET_COUNTRY 84 |
61 | #define BRCMF_C_GET_PM 85 | 64 | #define BRCMF_C_GET_PM 85 |
62 | #define BRCMF_C_SET_PM 86 | 65 | #define BRCMF_C_SET_PM 86 |
66 | #define BRCMF_C_GET_CURR_RATESET 114 | ||
63 | #define BRCMF_C_GET_AP 117 | 67 | #define BRCMF_C_GET_AP 117 |
64 | #define BRCMF_C_SET_AP 118 | 68 | #define BRCMF_C_SET_AP 118 |
65 | #define BRCMF_C_GET_RSSI 127 | 69 | #define BRCMF_C_GET_RSSI 127 |
@@ -67,6 +71,7 @@ | |||
67 | #define BRCMF_C_SET_WSEC 134 | 71 | #define BRCMF_C_SET_WSEC 134 |
68 | #define BRCMF_C_GET_PHY_NOISE 135 | 72 | #define BRCMF_C_GET_PHY_NOISE 135 |
69 | #define BRCMF_C_GET_BSS_INFO 136 | 73 | #define BRCMF_C_GET_BSS_INFO 136 |
74 | #define BRCMF_C_GET_PHYLIST 180 | ||
70 | #define BRCMF_C_SET_SCAN_CHANNEL_TIME 185 | 75 | #define BRCMF_C_SET_SCAN_CHANNEL_TIME 185 |
71 | #define BRCMF_C_SET_SCAN_UNASSOC_TIME 187 | 76 | #define BRCMF_C_SET_SCAN_UNASSOC_TIME 187 |
72 | #define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON 201 | 77 | #define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON 201 |
@@ -102,16 +107,8 @@ | |||
102 | #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff | 107 | #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff |
103 | #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 | 108 | #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 |
104 | 109 | ||
105 | /* Indicates this key is using soft encrypt */ | ||
106 | #define WL_SOFT_KEY (1 << 0) | ||
107 | /* primary (ie tx) key */ | 110 | /* primary (ie tx) key */ |
108 | #define BRCMF_PRIMARY_KEY (1 << 1) | 111 | #define BRCMF_PRIMARY_KEY (1 << 1) |
109 | /* Reserved for backward compat */ | ||
110 | #define WL_KF_RES_4 (1 << 4) | ||
111 | /* Reserved for backward compat */ | ||
112 | #define WL_KF_RES_5 (1 << 5) | ||
113 | /* Indicates a group key for a IBSS PEER */ | ||
114 | #define WL_IBSS_PEER_GROUP_KEY (1 << 6) | ||
115 | 112 | ||
116 | /* For supporting multiple interfaces */ | 113 | /* For supporting multiple interfaces */ |
117 | #define BRCMF_MAX_IFS 16 | 114 | #define BRCMF_MAX_IFS 16 |
@@ -286,7 +283,7 @@ struct brcm_rateset_le { | |||
286 | /* # rates in this set */ | 283 | /* # rates in this set */ |
287 | __le32 count; | 284 | __le32 count; |
288 | /* rates in 500kbps units w/hi bit set if basic */ | 285 | /* rates in 500kbps units w/hi bit set if basic */ |
289 | u8 rates[WL_NUMRATES]; | 286 | u8 rates[BRCMF_MAXRATES_IN_SET]; |
290 | }; | 287 | }; |
291 | 288 | ||
292 | struct brcmf_ssid { | 289 | struct brcmf_ssid { |
@@ -580,11 +577,6 @@ extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, | |||
580 | extern int brcmf_proto_cdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd, | 577 | extern int brcmf_proto_cdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd, |
581 | void *buf, uint len); | 578 | void *buf, uint len); |
582 | 579 | ||
583 | extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name); | ||
584 | extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx, | ||
585 | void *pktdata, struct brcmf_event_msg *, | ||
586 | void **data_ptr); | ||
587 | |||
588 | extern int brcmf_net_attach(struct brcmf_if *ifp); | 580 | extern int brcmf_net_attach(struct brcmf_if *ifp); |
589 | extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, | 581 | extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, |
590 | s32 bssidx, char *name, u8 *mac_addr); | 582 | s32 bssidx, char *name, u8 *mac_addr); |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h index a8bb5d2cc2d0..b8f248797f62 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h | |||
@@ -45,7 +45,6 @@ struct brcmf_bus_dcmd { | |||
45 | 45 | ||
46 | /* interface structure between common and bus layer */ | 46 | /* interface structure between common and bus layer */ |
47 | struct brcmf_bus { | 47 | struct brcmf_bus { |
48 | u8 type; /* bus type */ | ||
49 | union { | 48 | union { |
50 | struct brcmf_sdio_dev *sdio; | 49 | struct brcmf_sdio_dev *sdio; |
51 | struct brcmf_usbdev *usb; | 50 | struct brcmf_usbdev *usb; |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c index 601d4d789a93..87536d38a4ca 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c | |||
@@ -23,8 +23,6 @@ | |||
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/sched.h> | ||
27 | #include <defs.h> | ||
28 | 26 | ||
29 | #include <brcmu_utils.h> | 27 | #include <brcmu_utils.h> |
30 | #include <brcmu_wifi.h> | 28 | #include <brcmu_wifi.h> |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c index 3d59332238a2..eee7175f1515 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c | |||
@@ -18,10 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/sched.h> | ||
22 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
23 | #include <asm/unaligned.h> | ||
24 | #include <defs.h> | ||
25 | #include <brcmu_wifi.h> | 22 | #include <brcmu_wifi.h> |
26 | #include <brcmu_utils.h> | 23 | #include <brcmu_utils.h> |
27 | #include "dhd.h" | 24 | #include "dhd.h" |
@@ -30,9 +27,6 @@ | |||
30 | #include "dhd_dbg.h" | 27 | #include "dhd_dbg.h" |
31 | #include "fwil.h" | 28 | #include "fwil.h" |
32 | 29 | ||
33 | #define BRCM_OUI "\x00\x10\x18" | ||
34 | #define DOT11_OUI_LEN 3 | ||
35 | #define BCMILCP_BCM_SUBTYPE_EVENT 1 | ||
36 | #define PKTFILTER_BUF_SIZE 128 | 30 | #define PKTFILTER_BUF_SIZE 128 |
37 | #define BRCMF_ARPOL_MODE 0xb /* agent|snoop|peer_autoreply */ | 31 | #define BRCMF_ARPOL_MODE 0xb /* agent|snoop|peer_autoreply */ |
38 | #define BRCMF_DEFAULT_BCN_TIMEOUT 3 | 32 | #define BRCMF_DEFAULT_BCN_TIMEOUT 3 |
@@ -40,8 +34,6 @@ | |||
40 | #define BRCMF_DEFAULT_SCAN_UNASSOC_TIME 40 | 34 | #define BRCMF_DEFAULT_SCAN_UNASSOC_TIME 40 |
41 | #define BRCMF_DEFAULT_PACKET_FILTER "100 0 0 0 0x01 0x00" | 35 | #define BRCMF_DEFAULT_PACKET_FILTER "100 0 0 0 0x01 0x00" |
42 | 36 | ||
43 | #define MSGTRACE_VERSION 1 | ||
44 | |||
45 | #ifdef DEBUG | 37 | #ifdef DEBUG |
46 | static const char brcmf_version[] = | 38 | static const char brcmf_version[] = |
47 | "Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on " | 39 | "Dongle Host Driver, version " BRCMF_VERSION_STR "\nCompiled on " |
@@ -51,22 +43,6 @@ static const char brcmf_version[] = | |||
51 | "Dongle Host Driver, version " BRCMF_VERSION_STR; | 43 | "Dongle Host Driver, version " BRCMF_VERSION_STR; |
52 | #endif | 44 | #endif |
53 | 45 | ||
54 | /* Message trace header */ | ||
55 | struct msgtrace_hdr { | ||
56 | u8 version; | ||
57 | u8 spare; | ||
58 | __be16 len; /* Len of the trace */ | ||
59 | __be32 seqnum; /* Sequence number of message. Useful | ||
60 | * if the messsage has been lost | ||
61 | * because of DMA error or a bus reset | ||
62 | * (ex: SDIO Func2) | ||
63 | */ | ||
64 | __be32 discarded_bytes; /* Number of discarded bytes because of | ||
65 | trace overflow */ | ||
66 | __be32 discarded_printf; /* Number of discarded printf | ||
67 | because of trace overflow */ | ||
68 | } __packed; | ||
69 | |||
70 | 46 | ||
71 | bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, | 47 | bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, |
72 | struct sk_buff *pkt, int prec) | 48 | struct sk_buff *pkt, int prec) |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c index 49f53ba6eced..7e58e8ce9aba 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c | |||
@@ -14,17 +14,12 @@ | |||
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | #include <linux/debugfs.h> | 16 | #include <linux/debugfs.h> |
17 | #include <linux/if_ether.h> | ||
18 | #include <linux/if.h> | ||
19 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
20 | #include <linux/ieee80211.h> | ||
21 | #include <linux/module.h> | 18 | #include <linux/module.h> |
22 | 19 | ||
23 | #include <defs.h> | ||
24 | #include <brcmu_wifi.h> | 20 | #include <brcmu_wifi.h> |
25 | #include <brcmu_utils.h> | 21 | #include <brcmu_utils.h> |
26 | #include "dhd.h" | 22 | #include "dhd.h" |
27 | #include "dhd_bus.h" | ||
28 | #include "dhd_dbg.h" | 23 | #include "dhd_dbg.h" |
29 | 24 | ||
30 | static struct dentry *root_folder; | 25 | static struct dentry *root_folder; |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index a39ea20403b0..b6c86b046c15 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | |||
@@ -16,27 +16,11 @@ | |||
16 | 16 | ||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
18 | 18 | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/kthread.h> | ||
22 | #include <linux/slab.h> | ||
23 | #include <linux/skbuff.h> | ||
24 | #include <linux/netdevice.h> | ||
25 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
26 | #include <linux/mmc/sdio_func.h> | ||
27 | #include <linux/random.h> | ||
28 | #include <linux/spinlock.h> | ||
29 | #include <linux/ethtool.h> | ||
30 | #include <linux/fcntl.h> | ||
31 | #include <linux/fs.h> | ||
32 | #include <linux/uaccess.h> | ||
33 | #include <linux/hardirq.h> | ||
34 | #include <linux/mutex.h> | ||
35 | #include <linux/wait.h> | ||
36 | #include <linux/module.h> | 21 | #include <linux/module.h> |
37 | #include <net/cfg80211.h> | 22 | #include <net/cfg80211.h> |
38 | #include <net/rtnetlink.h> | 23 | #include <net/rtnetlink.h> |
39 | #include <defs.h> | ||
40 | #include <brcmu_utils.h> | 24 | #include <brcmu_utils.h> |
41 | #include <brcmu_wifi.h> | 25 | #include <brcmu_wifi.h> |
42 | 26 | ||
@@ -48,8 +32,8 @@ | |||
48 | #include "fwil.h" | 32 | #include "fwil.h" |
49 | 33 | ||
50 | MODULE_AUTHOR("Broadcom Corporation"); | 34 | MODULE_AUTHOR("Broadcom Corporation"); |
51 | MODULE_DESCRIPTION("Broadcom 802.11n wireless LAN fullmac driver."); | 35 | MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver."); |
52 | MODULE_SUPPORTED_DEVICE("Broadcom 802.11n WLAN fullmac cards"); | 36 | MODULE_SUPPORTED_DEVICE("Broadcom 802.11 WLAN fullmac cards"); |
53 | MODULE_LICENSE("Dual BSD/GPL"); | 37 | MODULE_LICENSE("Dual BSD/GPL"); |
54 | 38 | ||
55 | #define MAX_WAIT_FOR_8021X_TX 50 /* msecs */ | 39 | #define MAX_WAIT_FOR_8021X_TX 50 /* msecs */ |
@@ -58,24 +42,6 @@ MODULE_LICENSE("Dual BSD/GPL"); | |||
58 | int brcmf_msg_level = BRCMF_ERROR_VAL; | 42 | int brcmf_msg_level = BRCMF_ERROR_VAL; |
59 | module_param(brcmf_msg_level, int, 0); | 43 | module_param(brcmf_msg_level, int, 0); |
60 | 44 | ||
61 | int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name) | ||
62 | { | ||
63 | int i = BRCMF_MAX_IFS; | ||
64 | struct brcmf_if *ifp; | ||
65 | |||
66 | if (name == NULL || *name == '\0') | ||
67 | return 0; | ||
68 | |||
69 | while (--i > 0) { | ||
70 | ifp = drvr->iflist[i]; | ||
71 | if (ifp && !strncmp(ifp->ndev->name, name, IFNAMSIZ)) | ||
72 | break; | ||
73 | } | ||
74 | |||
75 | brcmf_dbg(TRACE, "return idx %d for \"%s\"\n", i, name); | ||
76 | |||
77 | return i; /* default - the primary interface */ | ||
78 | } | ||
79 | 45 | ||
80 | char *brcmf_ifname(struct brcmf_pub *drvr, int ifidx) | 46 | char *brcmf_ifname(struct brcmf_pub *drvr, int ifidx) |
81 | { | 47 | { |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_proto.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_proto.h index 9b7969d8e76a..48fa70302192 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_proto.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_proto.h | |||
@@ -36,10 +36,6 @@ extern void brcmf_proto_stop(struct brcmf_pub *drvr); | |||
36 | extern void brcmf_proto_hdrpush(struct brcmf_pub *, int ifidx, | 36 | extern void brcmf_proto_hdrpush(struct brcmf_pub *, int ifidx, |
37 | struct sk_buff *txp); | 37 | struct sk_buff *txp); |
38 | 38 | ||
39 | /* Use protocol to issue command to dongle */ | ||
40 | extern int brcmf_proto_dcmd(struct brcmf_pub *drvr, int ifidx, | ||
41 | struct brcmf_dcmd *dcmd, int len); | ||
42 | |||
43 | /* Sets dongle media info (drv_version, mac address). */ | 39 | /* Sets dongle media info (drv_version, mac address). */ |
44 | extern int brcmf_c_preinit_dcmds(struct brcmf_if *ifp); | 40 | extern int brcmf_c_preinit_dcmds(struct brcmf_if *ifp); |
45 | 41 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c index 37f853d45d30..1e4188cc1b5a 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | 17 | ||
18 | #include "defs.h" | ||
19 | #include "brcmu_wifi.h" | 18 | #include "brcmu_wifi.h" |
20 | #include "brcmu_utils.h" | 19 | #include "brcmu_utils.h" |
21 | 20 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c index 7e678e9362ed..51a14505197a 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
23 | #include <defs.h> | ||
24 | #include <brcmu_utils.h> | 23 | #include <brcmu_utils.h> |
25 | #include <brcmu_wifi.h> | 24 | #include <brcmu_wifi.h> |
26 | #include "dhd.h" | 25 | #include "dhd.h" |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index 589afe6b3fb3..feaca14a1dbe 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c | |||
@@ -14,24 +14,11 @@ | |||
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/kthread.h> | ||
21 | #include <linux/slab.h> | ||
22 | #include <linux/skbuff.h> | ||
23 | #include <linux/netdevice.h> | ||
24 | #include <linux/spinlock.h> | ||
25 | #include <linux/ethtool.h> | ||
26 | #include <linux/fcntl.h> | ||
27 | #include <linux/fs.h> | ||
28 | #include <linux/uaccess.h> | ||
29 | #include <linux/firmware.h> | 19 | #include <linux/firmware.h> |
30 | #include <linux/usb.h> | 20 | #include <linux/usb.h> |
31 | #include <linux/vmalloc.h> | ||
32 | #include <net/cfg80211.h> | ||
33 | 21 | ||
34 | #include <defs.h> | ||
35 | #include <brcmu_utils.h> | 22 | #include <brcmu_utils.h> |
36 | #include <brcmu_wifi.h> | 23 | #include <brcmu_wifi.h> |
37 | #include <dhd_bus.h> | 24 | #include <dhd_bus.h> |
@@ -1240,8 +1227,7 @@ error: | |||
1240 | return NULL; | 1227 | return NULL; |
1241 | } | 1228 | } |
1242 | 1229 | ||
1243 | static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo, | 1230 | static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo) |
1244 | const char *desc, u32 bustype, u32 hdrlen) | ||
1245 | { | 1231 | { |
1246 | struct brcmf_bus *bus = NULL; | 1232 | struct brcmf_bus *bus = NULL; |
1247 | struct brcmf_usbdev *bus_pub = NULL; | 1233 | struct brcmf_usbdev *bus_pub = NULL; |
@@ -1265,12 +1251,11 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo, | |||
1265 | bus->brcmf_bus_stop = brcmf_usb_down; | 1251 | bus->brcmf_bus_stop = brcmf_usb_down; |
1266 | bus->brcmf_bus_txctl = brcmf_usb_tx_ctlpkt; | 1252 | bus->brcmf_bus_txctl = brcmf_usb_tx_ctlpkt; |
1267 | bus->brcmf_bus_rxctl = brcmf_usb_rx_ctlpkt; | 1253 | bus->brcmf_bus_rxctl = brcmf_usb_rx_ctlpkt; |
1268 | bus->type = bustype; | ||
1269 | bus->bus_priv.usb = bus_pub; | 1254 | bus->bus_priv.usb = bus_pub; |
1270 | dev_set_drvdata(dev, bus); | 1255 | dev_set_drvdata(dev, bus); |
1271 | 1256 | ||
1272 | /* Attach to the common driver interface */ | 1257 | /* Attach to the common driver interface */ |
1273 | ret = brcmf_attach(hdrlen, dev); | 1258 | ret = brcmf_attach(0, dev); |
1274 | if (ret) { | 1259 | if (ret) { |
1275 | brcmf_dbg(ERROR, "brcmf_attach failed\n"); | 1260 | brcmf_dbg(ERROR, "brcmf_attach failed\n"); |
1276 | goto fail; | 1261 | goto fail; |
@@ -1419,7 +1404,7 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1419 | else | 1404 | else |
1420 | brcmf_dbg(USB, "Broadcom full speed USB wireless device detected\n"); | 1405 | brcmf_dbg(USB, "Broadcom full speed USB wireless device detected\n"); |
1421 | 1406 | ||
1422 | ret = brcmf_usb_probe_cb(devinfo, "", USB_BUS, 0); | 1407 | ret = brcmf_usb_probe_cb(devinfo); |
1423 | if (ret) | 1408 | if (ret) |
1424 | goto fail; | 1409 | goto fail; |
1425 | 1410 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 14cf71b4251c..769c134c6618 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -19,14 +19,7 @@ | |||
19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/if_arp.h> | ||
23 | #include <linux/sched.h> | ||
24 | #include <linux/kthread.h> | ||
25 | #include <linux/netdevice.h> | ||
26 | #include <linux/bitops.h> | ||
27 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
28 | #include <linux/ieee80211.h> | ||
29 | #include <linux/uaccess.h> | ||
30 | #include <net/cfg80211.h> | 23 | #include <net/cfg80211.h> |
31 | #include <net/netlink.h> | 24 | #include <net/netlink.h> |
32 | 25 | ||
@@ -883,7 +876,7 @@ static s32 brcmf_set_frag(struct net_device *ndev, u32 frag_threshold) | |||
883 | static s32 brcmf_set_retry(struct net_device *ndev, u32 retry, bool l) | 876 | static s32 brcmf_set_retry(struct net_device *ndev, u32 retry, bool l) |
884 | { | 877 | { |
885 | s32 err = 0; | 878 | s32 err = 0; |
886 | u32 cmd = (l ? BRCM_SET_LRL : BRCM_SET_SRL); | 879 | u32 cmd = (l ? BRCMF_C_SET_LRL : BRCMF_C_SET_SRL); |
887 | 880 | ||
888 | err = brcmf_fil_cmd_int_set(netdev_priv(ndev), cmd, retry); | 881 | err = brcmf_fil_cmd_int_set(netdev_priv(ndev), cmd, retry); |
889 | if (err) { | 882 | if (err) { |
@@ -1066,7 +1059,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev, | |||
1066 | else | 1059 | else |
1067 | bcnprd = 100; | 1060 | bcnprd = 100; |
1068 | 1061 | ||
1069 | err = brcmf_fil_cmd_int_set(ifp, BRCM_SET_BCNPRD, bcnprd); | 1062 | err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, bcnprd); |
1070 | if (err) { | 1063 | if (err) { |
1071 | WL_ERR("WLC_SET_BCNPRD failed (%d)\n", err); | 1064 | WL_ERR("WLC_SET_BCNPRD failed (%d)\n", err); |
1072 | goto done; | 1065 | goto done; |
@@ -1108,7 +1101,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev, | |||
1108 | 1101 | ||
1109 | /* set channel for starter */ | 1102 | /* set channel for starter */ |
1110 | target_channel = cfg->channel; | 1103 | target_channel = cfg->channel; |
1111 | err = brcmf_fil_cmd_int_set(ifp, BRCM_SET_CHANNEL, | 1104 | err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_CHANNEL, |
1112 | target_channel); | 1105 | target_channel); |
1113 | if (err) { | 1106 | if (err) { |
1114 | WL_ERR("WLC_SET_CHANNEL failed (%d)\n", err); | 1107 | WL_ERR("WLC_SET_CHANNEL failed (%d)\n", err); |
@@ -2046,7 +2039,7 @@ brcmf_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *ndev, | |||
2046 | 2039 | ||
2047 | /* addr param is always NULL. ignore it */ | 2040 | /* addr param is always NULL. ignore it */ |
2048 | /* Get current rateset */ | 2041 | /* Get current rateset */ |
2049 | err = brcmf_fil_cmd_data_get(ifp, BRCM_GET_CURR_RATESET, | 2042 | err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_CURR_RATESET, |
2050 | &rateset_le, sizeof(rateset_le)); | 2043 | &rateset_le, sizeof(rateset_le)); |
2051 | if (err) { | 2044 | if (err) { |
2052 | WL_ERR("could not get current rateset (%d)\n", err); | 2045 | WL_ERR("could not get current rateset (%d)\n", err); |
@@ -4458,7 +4451,7 @@ static s32 wl_update_wiphybands(struct brcmf_cfg80211_info *cfg) | |||
4458 | s8 phy; | 4451 | s8 phy; |
4459 | s32 err = 0; | 4452 | s32 err = 0; |
4460 | 4453 | ||
4461 | err = brcmf_fil_cmd_data_get(ifp, BRCM_GET_PHYLIST, | 4454 | err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_PHYLIST, |
4462 | &phy_list, sizeof(phy_list)); | 4455 | &phy_list, sizeof(phy_list)); |
4463 | if (err) { | 4456 | if (err) { |
4464 | WL_ERR("error (%d)\n", err); | 4457 | WL_ERR("error (%d)\n", err); |