diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd.h')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 186 |
1 files changed, 15 insertions, 171 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h index 8704daa2758f..24bc4e3e162b 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #define BRCMF_VERSION_STR "4.218.248.5" | 24 | #define BRCMF_VERSION_STR "4.218.248.5" |
25 | 25 | ||
26 | #include "fweh.h" | ||
27 | |||
26 | /******************************************************************************* | 28 | /******************************************************************************* |
27 | * IO codes that are interpreted by dongle firmware | 29 | * IO codes that are interpreted by dongle firmware |
28 | ******************************************************************************/ | 30 | ******************************************************************************/ |
@@ -38,8 +40,11 @@ | |||
38 | #define BRCMF_C_GET_SSID 25 | 40 | #define BRCMF_C_GET_SSID 25 |
39 | #define BRCMF_C_SET_SSID 26 | 41 | #define BRCMF_C_SET_SSID 26 |
40 | #define BRCMF_C_GET_CHANNEL 29 | 42 | #define BRCMF_C_GET_CHANNEL 29 |
43 | #define BRCMF_C_SET_CHANNEL 30 | ||
41 | #define BRCMF_C_GET_SRL 31 | 44 | #define BRCMF_C_GET_SRL 31 |
45 | #define BRCMF_C_SET_SRL 32 | ||
42 | #define BRCMF_C_GET_LRL 33 | 46 | #define BRCMF_C_GET_LRL 33 |
47 | #define BRCMF_C_SET_LRL 34 | ||
43 | #define BRCMF_C_GET_RADIO 37 | 48 | #define BRCMF_C_GET_RADIO 37 |
44 | #define BRCMF_C_SET_RADIO 38 | 49 | #define BRCMF_C_SET_RADIO 38 |
45 | #define BRCMF_C_GET_PHYTYPE 39 | 50 | #define BRCMF_C_GET_PHYTYPE 39 |
@@ -58,6 +63,7 @@ | |||
58 | #define BRCMF_C_SET_COUNTRY 84 | 63 | #define BRCMF_C_SET_COUNTRY 84 |
59 | #define BRCMF_C_GET_PM 85 | 64 | #define BRCMF_C_GET_PM 85 |
60 | #define BRCMF_C_SET_PM 86 | 65 | #define BRCMF_C_SET_PM 86 |
66 | #define BRCMF_C_GET_CURR_RATESET 114 | ||
61 | #define BRCMF_C_GET_AP 117 | 67 | #define BRCMF_C_GET_AP 117 |
62 | #define BRCMF_C_SET_AP 118 | 68 | #define BRCMF_C_SET_AP 118 |
63 | #define BRCMF_C_GET_RSSI 127 | 69 | #define BRCMF_C_GET_RSSI 127 |
@@ -65,6 +71,7 @@ | |||
65 | #define BRCMF_C_SET_WSEC 134 | 71 | #define BRCMF_C_SET_WSEC 134 |
66 | #define BRCMF_C_GET_PHY_NOISE 135 | 72 | #define BRCMF_C_GET_PHY_NOISE 135 |
67 | #define BRCMF_C_GET_BSS_INFO 136 | 73 | #define BRCMF_C_GET_BSS_INFO 136 |
74 | #define BRCMF_C_GET_PHYLIST 180 | ||
68 | #define BRCMF_C_SET_SCAN_CHANNEL_TIME 185 | 75 | #define BRCMF_C_SET_SCAN_CHANNEL_TIME 185 |
69 | #define BRCMF_C_SET_SCAN_UNASSOC_TIME 187 | 76 | #define BRCMF_C_SET_SCAN_UNASSOC_TIME 187 |
70 | #define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON 201 | 77 | #define BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON 201 |
@@ -100,29 +107,8 @@ | |||
100 | #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff | 107 | #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff |
101 | #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 | 108 | #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 |
102 | 109 | ||
103 | #define BRCMF_SCAN_ACTION_START 1 | ||
104 | #define BRCMF_SCAN_ACTION_CONTINUE 2 | ||
105 | #define WL_SCAN_ACTION_ABORT 3 | ||
106 | |||
107 | #define BRCMF_ISCAN_REQ_VERSION 1 | ||
108 | |||
109 | /* brcmf_iscan_results status values */ | ||
110 | #define BRCMF_SCAN_RESULTS_SUCCESS 0 | ||
111 | #define BRCMF_SCAN_RESULTS_PARTIAL 1 | ||
112 | #define BRCMF_SCAN_RESULTS_PENDING 2 | ||
113 | #define BRCMF_SCAN_RESULTS_ABORTED 3 | ||
114 | #define BRCMF_SCAN_RESULTS_NO_MEM 4 | ||
115 | |||
116 | /* Indicates this key is using soft encrypt */ | ||
117 | #define WL_SOFT_KEY (1 << 0) | ||
118 | /* primary (ie tx) key */ | 110 | /* primary (ie tx) key */ |
119 | #define BRCMF_PRIMARY_KEY (1 << 1) | 111 | #define BRCMF_PRIMARY_KEY (1 << 1) |
120 | /* Reserved for backward compat */ | ||
121 | #define WL_KF_RES_4 (1 << 4) | ||
122 | /* Reserved for backward compat */ | ||
123 | #define WL_KF_RES_5 (1 << 5) | ||
124 | /* Indicates a group key for a IBSS PEER */ | ||
125 | #define WL_IBSS_PEER_GROUP_KEY (1 << 6) | ||
126 | 112 | ||
127 | /* For supporting multiple interfaces */ | 113 | /* For supporting multiple interfaces */ |
128 | #define BRCMF_MAX_IFS 16 | 114 | #define BRCMF_MAX_IFS 16 |
@@ -130,10 +116,6 @@ | |||
130 | #define DOT11_BSSTYPE_ANY 2 | 116 | #define DOT11_BSSTYPE_ANY 2 |
131 | #define DOT11_MAX_DEFAULT_KEYS 4 | 117 | #define DOT11_MAX_DEFAULT_KEYS 4 |
132 | 118 | ||
133 | #define BRCMF_EVENT_MSG_LINK 0x01 | ||
134 | #define BRCMF_EVENT_MSG_FLUSHTXQ 0x02 | ||
135 | #define BRCMF_EVENT_MSG_GROUP 0x04 | ||
136 | |||
137 | #define BRCMF_ESCAN_REQ_VERSION 1 | 119 | #define BRCMF_ESCAN_REQ_VERSION 1 |
138 | 120 | ||
139 | #define WLC_BSS_RSSI_ON_CHANNEL 0x0002 | 121 | #define WLC_BSS_RSSI_ON_CHANNEL 0x0002 |
@@ -141,108 +123,6 @@ | |||
141 | #define BRCMF_MAXRATES_IN_SET 16 /* max # of rates in rateset */ | 123 | #define BRCMF_MAXRATES_IN_SET 16 /* max # of rates in rateset */ |
142 | #define BRCMF_STA_ASSOC 0x10 /* Associated */ | 124 | #define BRCMF_STA_ASSOC 0x10 /* Associated */ |
143 | 125 | ||
144 | struct brcmf_event_msg { | ||
145 | __be16 version; | ||
146 | __be16 flags; | ||
147 | __be32 event_type; | ||
148 | __be32 status; | ||
149 | __be32 reason; | ||
150 | __be32 auth_type; | ||
151 | __be32 datalen; | ||
152 | u8 addr[ETH_ALEN]; | ||
153 | char ifname[IFNAMSIZ]; | ||
154 | u8 ifidx; | ||
155 | u8 bsscfgidx; | ||
156 | } __packed; | ||
157 | |||
158 | struct brcm_ethhdr { | ||
159 | u16 subtype; | ||
160 | u16 length; | ||
161 | u8 version; | ||
162 | u8 oui[3]; | ||
163 | u16 usr_subtype; | ||
164 | } __packed; | ||
165 | |||
166 | struct brcmf_event { | ||
167 | struct ethhdr eth; | ||
168 | struct brcm_ethhdr hdr; | ||
169 | struct brcmf_event_msg msg; | ||
170 | } __packed; | ||
171 | |||
172 | /* event codes sent by the dongle to this driver */ | ||
173 | #define BRCMF_E_SET_SSID 0 | ||
174 | #define BRCMF_E_JOIN 1 | ||
175 | #define BRCMF_E_START 2 | ||
176 | #define BRCMF_E_AUTH 3 | ||
177 | #define BRCMF_E_AUTH_IND 4 | ||
178 | #define BRCMF_E_DEAUTH 5 | ||
179 | #define BRCMF_E_DEAUTH_IND 6 | ||
180 | #define BRCMF_E_ASSOC 7 | ||
181 | #define BRCMF_E_ASSOC_IND 8 | ||
182 | #define BRCMF_E_REASSOC 9 | ||
183 | #define BRCMF_E_REASSOC_IND 10 | ||
184 | #define BRCMF_E_DISASSOC 11 | ||
185 | #define BRCMF_E_DISASSOC_IND 12 | ||
186 | #define BRCMF_E_QUIET_START 13 | ||
187 | #define BRCMF_E_QUIET_END 14 | ||
188 | #define BRCMF_E_BEACON_RX 15 | ||
189 | #define BRCMF_E_LINK 16 | ||
190 | #define BRCMF_E_MIC_ERROR 17 | ||
191 | #define BRCMF_E_NDIS_LINK 18 | ||
192 | #define BRCMF_E_ROAM 19 | ||
193 | #define BRCMF_E_TXFAIL 20 | ||
194 | #define BRCMF_E_PMKID_CACHE 21 | ||
195 | #define BRCMF_E_RETROGRADE_TSF 22 | ||
196 | #define BRCMF_E_PRUNE 23 | ||
197 | #define BRCMF_E_AUTOAUTH 24 | ||
198 | #define BRCMF_E_EAPOL_MSG 25 | ||
199 | #define BRCMF_E_SCAN_COMPLETE 26 | ||
200 | #define BRCMF_E_ADDTS_IND 27 | ||
201 | #define BRCMF_E_DELTS_IND 28 | ||
202 | #define BRCMF_E_BCNSENT_IND 29 | ||
203 | #define BRCMF_E_BCNRX_MSG 30 | ||
204 | #define BRCMF_E_BCNLOST_MSG 31 | ||
205 | #define BRCMF_E_ROAM_PREP 32 | ||
206 | #define BRCMF_E_PFN_NET_FOUND 33 | ||
207 | #define BRCMF_E_PFN_NET_LOST 34 | ||
208 | #define BRCMF_E_RESET_COMPLETE 35 | ||
209 | #define BRCMF_E_JOIN_START 36 | ||
210 | #define BRCMF_E_ROAM_START 37 | ||
211 | #define BRCMF_E_ASSOC_START 38 | ||
212 | #define BRCMF_E_IBSS_ASSOC 39 | ||
213 | #define BRCMF_E_RADIO 40 | ||
214 | #define BRCMF_E_PSM_WATCHDOG 41 | ||
215 | #define BRCMF_E_PROBREQ_MSG 44 | ||
216 | #define BRCMF_E_SCAN_CONFIRM_IND 45 | ||
217 | #define BRCMF_E_PSK_SUP 46 | ||
218 | #define BRCMF_E_COUNTRY_CODE_CHANGED 47 | ||
219 | #define BRCMF_E_EXCEEDED_MEDIUM_TIME 48 | ||
220 | #define BRCMF_E_ICV_ERROR 49 | ||
221 | #define BRCMF_E_UNICAST_DECODE_ERROR 50 | ||
222 | #define BRCMF_E_MULTICAST_DECODE_ERROR 51 | ||
223 | #define BRCMF_E_TRACE 52 | ||
224 | #define BRCMF_E_IF 54 | ||
225 | #define BRCMF_E_RSSI 56 | ||
226 | #define BRCMF_E_PFN_SCAN_COMPLETE 57 | ||
227 | #define BRCMF_E_EXTLOG_MSG 58 | ||
228 | #define BRCMF_E_ACTION_FRAME 59 | ||
229 | #define BRCMF_E_ACTION_FRAME_COMPLETE 60 | ||
230 | #define BRCMF_E_PRE_ASSOC_IND 61 | ||
231 | #define BRCMF_E_PRE_REASSOC_IND 62 | ||
232 | #define BRCMF_E_CHANNEL_ADOPTED 63 | ||
233 | #define BRCMF_E_AP_STARTED 64 | ||
234 | #define BRCMF_E_DFS_AP_STOP 65 | ||
235 | #define BRCMF_E_DFS_AP_RESUME 66 | ||
236 | #define BRCMF_E_RESERVED1 67 | ||
237 | #define BRCMF_E_RESERVED2 68 | ||
238 | #define BRCMF_E_ESCAN_RESULT 69 | ||
239 | #define BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE 70 | ||
240 | #define BRCMF_E_DCS_REQUEST 73 | ||
241 | |||
242 | #define BRCMF_E_FIFO_CREDIT_MAP 74 | ||
243 | |||
244 | #define BRCMF_E_LAST 75 | ||
245 | |||
246 | #define BRCMF_E_STATUS_SUCCESS 0 | 126 | #define BRCMF_E_STATUS_SUCCESS 0 |
247 | #define BRCMF_E_STATUS_FAIL 1 | 127 | #define BRCMF_E_STATUS_FAIL 1 |
248 | #define BRCMF_E_STATUS_TIMEOUT 2 | 128 | #define BRCMF_E_STATUS_TIMEOUT 2 |
@@ -403,7 +283,7 @@ struct brcm_rateset_le { | |||
403 | /* # rates in this set */ | 283 | /* # rates in this set */ |
404 | __le32 count; | 284 | __le32 count; |
405 | /* rates in 500kbps units w/hi bit set if basic */ | 285 | /* rates in 500kbps units w/hi bit set if basic */ |
406 | u8 rates[WL_NUMRATES]; | 286 | u8 rates[BRCMF_MAXRATES_IN_SET]; |
407 | }; | 287 | }; |
408 | 288 | ||
409 | struct brcmf_ssid { | 289 | struct brcmf_ssid { |
@@ -452,14 +332,6 @@ struct brcmf_scan_params_le { | |||
452 | __le16 channel_list[1]; /* list of chanspecs */ | 332 | __le16 channel_list[1]; /* list of chanspecs */ |
453 | }; | 333 | }; |
454 | 334 | ||
455 | /* incremental scan struct */ | ||
456 | struct brcmf_iscan_params_le { | ||
457 | __le32 version; | ||
458 | __le16 action; | ||
459 | __le16 scan_duration; | ||
460 | struct brcmf_scan_params_le params_le; | ||
461 | }; | ||
462 | |||
463 | struct brcmf_scan_results { | 335 | struct brcmf_scan_results { |
464 | u32 buflen; | 336 | u32 buflen; |
465 | u32 version; | 337 | u32 version; |
@@ -467,12 +339,6 @@ struct brcmf_scan_results { | |||
467 | struct brcmf_bss_info_le bss_info_le[]; | 339 | struct brcmf_bss_info_le bss_info_le[]; |
468 | }; | 340 | }; |
469 | 341 | ||
470 | struct brcmf_scan_results_le { | ||
471 | __le32 buflen; | ||
472 | __le32 version; | ||
473 | __le32 count; | ||
474 | }; | ||
475 | |||
476 | struct brcmf_escan_params_le { | 342 | struct brcmf_escan_params_le { |
477 | __le32 version; | 343 | __le32 version; |
478 | __le16 action; | 344 | __le16 action; |
@@ -508,23 +374,6 @@ struct brcmf_join_params { | |||
508 | struct brcmf_assoc_params_le params_le; | 374 | struct brcmf_assoc_params_le params_le; |
509 | }; | 375 | }; |
510 | 376 | ||
511 | /* incremental scan results struct */ | ||
512 | struct brcmf_iscan_results { | ||
513 | union { | ||
514 | u32 status; | ||
515 | __le32 status_le; | ||
516 | }; | ||
517 | union { | ||
518 | struct brcmf_scan_results results; | ||
519 | struct brcmf_scan_results_le results_le; | ||
520 | }; | ||
521 | }; | ||
522 | |||
523 | /* size of brcmf_iscan_results not including variable length array */ | ||
524 | #define BRCMF_ISCAN_RESULTS_FIXED_SIZE \ | ||
525 | (sizeof(struct brcmf_scan_results) + \ | ||
526 | offsetof(struct brcmf_iscan_results, results)) | ||
527 | |||
528 | struct brcmf_wsec_key { | 377 | struct brcmf_wsec_key { |
529 | u32 index; /* key index */ | 378 | u32 index; /* key index */ |
530 | u32 len; /* key length */ | 379 | u32 len; /* key length */ |
@@ -661,10 +510,11 @@ struct brcmf_pub { | |||
661 | struct mutex proto_block; | 510 | struct mutex proto_block; |
662 | unsigned char proto_buf[BRCMF_DCMD_MAXLEN]; | 511 | unsigned char proto_buf[BRCMF_DCMD_MAXLEN]; |
663 | 512 | ||
664 | struct work_struct setmacaddr_work; | ||
665 | struct work_struct multicast_work; | ||
666 | u8 macvalue[ETH_ALEN]; | 513 | u8 macvalue[ETH_ALEN]; |
667 | atomic_t pend_8021x_cnt; | 514 | atomic_t pend_8021x_cnt; |
515 | wait_queue_head_t pend_8021x_wait; | ||
516 | |||
517 | struct brcmf_fweh_info fweh; | ||
668 | #ifdef DEBUG | 518 | #ifdef DEBUG |
669 | struct dentry *dbgfs_dir; | 519 | struct dentry *dbgfs_dir; |
670 | #endif | 520 | #endif |
@@ -701,6 +551,8 @@ struct brcmf_if { | |||
701 | struct brcmf_cfg80211_vif *vif; | 551 | struct brcmf_cfg80211_vif *vif; |
702 | struct net_device *ndev; | 552 | struct net_device *ndev; |
703 | struct net_device_stats stats; | 553 | struct net_device_stats stats; |
554 | struct work_struct setmacaddr_work; | ||
555 | struct work_struct multicast_work; | ||
704 | int idx; | 556 | int idx; |
705 | s32 bssidx; | 557 | s32 bssidx; |
706 | u8 mac_addr[ETH_ALEN]; | 558 | u8 mac_addr[ETH_ALEN]; |
@@ -714,9 +566,6 @@ static inline s32 brcmf_ndev_bssidx(struct net_device *ndev) | |||
714 | 566 | ||
715 | extern const struct bcmevent_name bcmevent_names[]; | 567 | extern const struct bcmevent_name bcmevent_names[]; |
716 | 568 | ||
717 | extern uint brcmf_c_mkiovar(char *name, char *data, uint datalen, | ||
718 | char *buf, uint len); | ||
719 | |||
720 | extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev); | 569 | extern int brcmf_netdev_wait_pend8021x(struct net_device *ndev); |
721 | 570 | ||
722 | /* Return pointer to interface name */ | 571 | /* Return pointer to interface name */ |
@@ -728,14 +577,9 @@ extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, | |||
728 | 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, |
729 | void *buf, uint len); | 578 | void *buf, uint len); |
730 | 579 | ||
731 | extern int brcmf_ifname2idx(struct brcmf_pub *drvr, char *name); | ||
732 | extern int brcmf_c_host_event(struct brcmf_pub *drvr, int *idx, | ||
733 | void *pktdata, struct brcmf_event_msg *, | ||
734 | void **data_ptr); | ||
735 | |||
736 | extern int brcmf_net_attach(struct brcmf_if *ifp); | 580 | extern int brcmf_net_attach(struct brcmf_if *ifp); |
737 | extern struct brcmf_if *brcmf_add_if(struct device *dev, int ifidx, s32 bssidx, | 581 | extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, |
738 | char *name, u8 *mac_addr); | 582 | s32 bssidx, char *name, u8 *mac_addr); |
739 | extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx); | 583 | extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx); |
740 | 584 | ||
741 | #endif /* _BRCMF_H_ */ | 585 | #endif /* _BRCMF_H_ */ |