hostap_wlan.h 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  1. #ifndef HOSTAP_WLAN_H
  2. #define HOSTAP_WLAN_H
  3. #include <linux/wireless.h>
  4. #include <linux/netdevice.h>
  5. #include <linux/mutex.h>
  6. #include <net/iw_handler.h>
  7. #include <net/ieee80211_radiotap.h>
  8. #include <net/lib80211.h>
  9. #include "hostap_config.h"
  10. #include "hostap_common.h"
  11. #define MAX_PARM_DEVICES 8
  12. #define PARM_MIN_MAX "1-" __MODULE_STRING(MAX_PARM_DEVICES)
  13. #define DEF_INTS -1, -1, -1, -1, -1, -1, -1
  14. #define GET_INT_PARM(var,idx) var[var[idx] < 0 ? 0 : idx]
  15. /* Specific skb->protocol value that indicates that the packet already contains
  16. * txdesc header.
  17. * FIX: This might need own value that would be allocated especially for Prism2
  18. * txdesc; ETH_P_CONTROL is commented as "Card specific control frames".
  19. * However, these skb's should have only minimal path in the kernel side since
  20. * prism2_send_mgmt() sends these with dev_queue_xmit() to prism2_tx(). */
  21. #define ETH_P_HOSTAP ETH_P_CONTROL
  22. /* ARPHRD_IEEE80211_PRISM uses a bloated version of Prism2 RX frame header
  23. * (from linux-wlan-ng) */
  24. struct linux_wlan_ng_val {
  25. u32 did;
  26. u16 status, len;
  27. u32 data;
  28. } __attribute__ ((packed));
  29. struct linux_wlan_ng_prism_hdr {
  30. u32 msgcode, msglen;
  31. char devname[16];
  32. struct linux_wlan_ng_val hosttime, mactime, channel, rssi, sq, signal,
  33. noise, rate, istx, frmlen;
  34. } __attribute__ ((packed));
  35. struct linux_wlan_ng_cap_hdr {
  36. __be32 version;
  37. __be32 length;
  38. __be64 mactime;
  39. __be64 hosttime;
  40. __be32 phytype;
  41. __be32 channel;
  42. __be32 datarate;
  43. __be32 antenna;
  44. __be32 priority;
  45. __be32 ssi_type;
  46. __be32 ssi_signal;
  47. __be32 ssi_noise;
  48. __be32 preamble;
  49. __be32 encoding;
  50. } __attribute__ ((packed));
  51. struct hostap_radiotap_rx {
  52. struct ieee80211_radiotap_header hdr;
  53. __le64 tsft;
  54. u8 rate;
  55. u8 padding;
  56. __le16 chan_freq;
  57. __le16 chan_flags;
  58. s8 dbm_antsignal;
  59. s8 dbm_antnoise;
  60. } __attribute__ ((packed));
  61. #define LWNG_CAP_DID_BASE (4 | (1 << 6)) /* section 4, group 1 */
  62. #define LWNG_CAPHDR_VERSION 0x80211001
  63. struct hfa384x_rx_frame {
  64. /* HFA384X RX frame descriptor */
  65. __le16 status; /* HFA384X_RX_STATUS_ flags */
  66. __le32 time; /* timestamp, 1 microsecond resolution */
  67. u8 silence; /* 27 .. 154; seems to be 0 */
  68. u8 signal; /* 27 .. 154 */
  69. u8 rate; /* 10, 20, 55, or 110 */
  70. u8 rxflow;
  71. __le32 reserved;
  72. /* 802.11 */
  73. __le16 frame_control;
  74. __le16 duration_id;
  75. u8 addr1[6];
  76. u8 addr2[6];
  77. u8 addr3[6];
  78. __le16 seq_ctrl;
  79. u8 addr4[6];
  80. __le16 data_len;
  81. /* 802.3 */
  82. u8 dst_addr[6];
  83. u8 src_addr[6];
  84. __be16 len;
  85. /* followed by frame data; max 2304 bytes */
  86. } __attribute__ ((packed));
  87. struct hfa384x_tx_frame {
  88. /* HFA384X TX frame descriptor */
  89. __le16 status; /* HFA384X_TX_STATUS_ flags */
  90. __le16 reserved1;
  91. __le16 reserved2;
  92. __le32 sw_support;
  93. u8 retry_count; /* not yet implemented */
  94. u8 tx_rate; /* Host AP only; 0 = firmware, or 10, 20, 55, 110 */
  95. __le16 tx_control; /* HFA384X_TX_CTRL_ flags */
  96. /* 802.11 */
  97. __le16 frame_control; /* parts not used */
  98. __le16 duration_id;
  99. u8 addr1[6];
  100. u8 addr2[6]; /* filled by firmware */
  101. u8 addr3[6];
  102. __le16 seq_ctrl; /* filled by firmware */
  103. u8 addr4[6];
  104. __le16 data_len;
  105. /* 802.3 */
  106. u8 dst_addr[6];
  107. u8 src_addr[6];
  108. __be16 len;
  109. /* followed by frame data; max 2304 bytes */
  110. } __attribute__ ((packed));
  111. struct hfa384x_rid_hdr
  112. {
  113. __le16 len;
  114. __le16 rid;
  115. } __attribute__ ((packed));
  116. /* Macro for converting signal levels (range 27 .. 154) to wireless ext
  117. * dBm value with some accuracy */
  118. #define HFA384X_LEVEL_TO_dBm(v) 0x100 + (v) * 100 / 255 - 100
  119. #define HFA384X_LEVEL_TO_dBm_sign(v) (v) * 100 / 255 - 100
  120. struct hfa384x_scan_request {
  121. __le16 channel_list;
  122. __le16 txrate; /* HFA384X_RATES_* */
  123. } __attribute__ ((packed));
  124. struct hfa384x_hostscan_request {
  125. __le16 channel_list;
  126. __le16 txrate;
  127. __le16 target_ssid_len;
  128. u8 target_ssid[32];
  129. } __attribute__ ((packed));
  130. struct hfa384x_join_request {
  131. u8 bssid[6];
  132. __le16 channel;
  133. } __attribute__ ((packed));
  134. struct hfa384x_info_frame {
  135. __le16 len;
  136. __le16 type;
  137. } __attribute__ ((packed));
  138. struct hfa384x_comm_tallies {
  139. __le16 tx_unicast_frames;
  140. __le16 tx_multicast_frames;
  141. __le16 tx_fragments;
  142. __le16 tx_unicast_octets;
  143. __le16 tx_multicast_octets;
  144. __le16 tx_deferred_transmissions;
  145. __le16 tx_single_retry_frames;
  146. __le16 tx_multiple_retry_frames;
  147. __le16 tx_retry_limit_exceeded;
  148. __le16 tx_discards;
  149. __le16 rx_unicast_frames;
  150. __le16 rx_multicast_frames;
  151. __le16 rx_fragments;
  152. __le16 rx_unicast_octets;
  153. __le16 rx_multicast_octets;
  154. __le16 rx_fcs_errors;
  155. __le16 rx_discards_no_buffer;
  156. __le16 tx_discards_wrong_sa;
  157. __le16 rx_discards_wep_undecryptable;
  158. __le16 rx_message_in_msg_fragments;
  159. __le16 rx_message_in_bad_msg_fragments;
  160. } __attribute__ ((packed));
  161. struct hfa384x_comm_tallies32 {
  162. __le32 tx_unicast_frames;
  163. __le32 tx_multicast_frames;
  164. __le32 tx_fragments;
  165. __le32 tx_unicast_octets;
  166. __le32 tx_multicast_octets;
  167. __le32 tx_deferred_transmissions;
  168. __le32 tx_single_retry_frames;
  169. __le32 tx_multiple_retry_frames;
  170. __le32 tx_retry_limit_exceeded;
  171. __le32 tx_discards;
  172. __le32 rx_unicast_frames;
  173. __le32 rx_multicast_frames;
  174. __le32 rx_fragments;
  175. __le32 rx_unicast_octets;
  176. __le32 rx_multicast_octets;
  177. __le32 rx_fcs_errors;
  178. __le32 rx_discards_no_buffer;
  179. __le32 tx_discards_wrong_sa;
  180. __le32 rx_discards_wep_undecryptable;
  181. __le32 rx_message_in_msg_fragments;
  182. __le32 rx_message_in_bad_msg_fragments;
  183. } __attribute__ ((packed));
  184. struct hfa384x_scan_result_hdr {
  185. __le16 reserved;
  186. __le16 scan_reason;
  187. #define HFA384X_SCAN_IN_PROGRESS 0 /* no results available yet */
  188. #define HFA384X_SCAN_HOST_INITIATED 1
  189. #define HFA384X_SCAN_FIRMWARE_INITIATED 2
  190. #define HFA384X_SCAN_INQUIRY_FROM_HOST 3
  191. } __attribute__ ((packed));
  192. #define HFA384X_SCAN_MAX_RESULTS 32
  193. struct hfa384x_scan_result {
  194. __le16 chid;
  195. __le16 anl;
  196. __le16 sl;
  197. u8 bssid[6];
  198. __le16 beacon_interval;
  199. __le16 capability;
  200. __le16 ssid_len;
  201. u8 ssid[32];
  202. u8 sup_rates[10];
  203. __le16 rate;
  204. } __attribute__ ((packed));
  205. struct hfa384x_hostscan_result {
  206. __le16 chid;
  207. __le16 anl;
  208. __le16 sl;
  209. u8 bssid[6];
  210. __le16 beacon_interval;
  211. __le16 capability;
  212. __le16 ssid_len;
  213. u8 ssid[32];
  214. u8 sup_rates[10];
  215. __le16 rate;
  216. __le16 atim;
  217. } __attribute__ ((packed));
  218. struct comm_tallies_sums {
  219. unsigned int tx_unicast_frames;
  220. unsigned int tx_multicast_frames;
  221. unsigned int tx_fragments;
  222. unsigned int tx_unicast_octets;
  223. unsigned int tx_multicast_octets;
  224. unsigned int tx_deferred_transmissions;
  225. unsigned int tx_single_retry_frames;
  226. unsigned int tx_multiple_retry_frames;
  227. unsigned int tx_retry_limit_exceeded;
  228. unsigned int tx_discards;
  229. unsigned int rx_unicast_frames;
  230. unsigned int rx_multicast_frames;
  231. unsigned int rx_fragments;
  232. unsigned int rx_unicast_octets;
  233. unsigned int rx_multicast_octets;
  234. unsigned int rx_fcs_errors;
  235. unsigned int rx_discards_no_buffer;
  236. unsigned int tx_discards_wrong_sa;
  237. unsigned int rx_discards_wep_undecryptable;
  238. unsigned int rx_message_in_msg_fragments;
  239. unsigned int rx_message_in_bad_msg_fragments;
  240. };
  241. struct hfa384x_regs {
  242. u16 cmd;
  243. u16 evstat;
  244. u16 offset0;
  245. u16 offset1;
  246. u16 swsupport0;
  247. };
  248. #if defined(PRISM2_PCCARD) || defined(PRISM2_PLX)
  249. /* I/O ports for HFA384X Controller access */
  250. #define HFA384X_CMD_OFF 0x00
  251. #define HFA384X_PARAM0_OFF 0x02
  252. #define HFA384X_PARAM1_OFF 0x04
  253. #define HFA384X_PARAM2_OFF 0x06
  254. #define HFA384X_STATUS_OFF 0x08
  255. #define HFA384X_RESP0_OFF 0x0A
  256. #define HFA384X_RESP1_OFF 0x0C
  257. #define HFA384X_RESP2_OFF 0x0E
  258. #define HFA384X_INFOFID_OFF 0x10
  259. #define HFA384X_CONTROL_OFF 0x14
  260. #define HFA384X_SELECT0_OFF 0x18
  261. #define HFA384X_SELECT1_OFF 0x1A
  262. #define HFA384X_OFFSET0_OFF 0x1C
  263. #define HFA384X_OFFSET1_OFF 0x1E
  264. #define HFA384X_RXFID_OFF 0x20
  265. #define HFA384X_ALLOCFID_OFF 0x22
  266. #define HFA384X_TXCOMPLFID_OFF 0x24
  267. #define HFA384X_SWSUPPORT0_OFF 0x28
  268. #define HFA384X_SWSUPPORT1_OFF 0x2A
  269. #define HFA384X_SWSUPPORT2_OFF 0x2C
  270. #define HFA384X_EVSTAT_OFF 0x30
  271. #define HFA384X_INTEN_OFF 0x32
  272. #define HFA384X_EVACK_OFF 0x34
  273. #define HFA384X_DATA0_OFF 0x36
  274. #define HFA384X_DATA1_OFF 0x38
  275. #define HFA384X_AUXPAGE_OFF 0x3A
  276. #define HFA384X_AUXOFFSET_OFF 0x3C
  277. #define HFA384X_AUXDATA_OFF 0x3E
  278. #endif /* PRISM2_PCCARD || PRISM2_PLX */
  279. #ifdef PRISM2_PCI
  280. /* Memory addresses for ISL3874 controller access */
  281. #define HFA384X_CMD_OFF 0x00
  282. #define HFA384X_PARAM0_OFF 0x04
  283. #define HFA384X_PARAM1_OFF 0x08
  284. #define HFA384X_PARAM2_OFF 0x0C
  285. #define HFA384X_STATUS_OFF 0x10
  286. #define HFA384X_RESP0_OFF 0x14
  287. #define HFA384X_RESP1_OFF 0x18
  288. #define HFA384X_RESP2_OFF 0x1C
  289. #define HFA384X_INFOFID_OFF 0x20
  290. #define HFA384X_CONTROL_OFF 0x28
  291. #define HFA384X_SELECT0_OFF 0x30
  292. #define HFA384X_SELECT1_OFF 0x34
  293. #define HFA384X_OFFSET0_OFF 0x38
  294. #define HFA384X_OFFSET1_OFF 0x3C
  295. #define HFA384X_RXFID_OFF 0x40
  296. #define HFA384X_ALLOCFID_OFF 0x44
  297. #define HFA384X_TXCOMPLFID_OFF 0x48
  298. #define HFA384X_PCICOR_OFF 0x4C
  299. #define HFA384X_SWSUPPORT0_OFF 0x50
  300. #define HFA384X_SWSUPPORT1_OFF 0x54
  301. #define HFA384X_SWSUPPORT2_OFF 0x58
  302. #define HFA384X_PCIHCR_OFF 0x5C
  303. #define HFA384X_EVSTAT_OFF 0x60
  304. #define HFA384X_INTEN_OFF 0x64
  305. #define HFA384X_EVACK_OFF 0x68
  306. #define HFA384X_DATA0_OFF 0x6C
  307. #define HFA384X_DATA1_OFF 0x70
  308. #define HFA384X_AUXPAGE_OFF 0x74
  309. #define HFA384X_AUXOFFSET_OFF 0x78
  310. #define HFA384X_AUXDATA_OFF 0x7C
  311. #define HFA384X_PCI_M0_ADDRH_OFF 0x80
  312. #define HFA384X_PCI_M0_ADDRL_OFF 0x84
  313. #define HFA384X_PCI_M0_LEN_OFF 0x88
  314. #define HFA384X_PCI_M0_CTL_OFF 0x8C
  315. #define HFA384X_PCI_STATUS_OFF 0x98
  316. #define HFA384X_PCI_M1_ADDRH_OFF 0xA0
  317. #define HFA384X_PCI_M1_ADDRL_OFF 0xA4
  318. #define HFA384X_PCI_M1_LEN_OFF 0xA8
  319. #define HFA384X_PCI_M1_CTL_OFF 0xAC
  320. /* PCI bus master control bits (these are undocumented; based on guessing and
  321. * experimenting..) */
  322. #define HFA384X_PCI_CTL_FROM_BAP (BIT(5) | BIT(1) | BIT(0))
  323. #define HFA384X_PCI_CTL_TO_BAP (BIT(5) | BIT(0))
  324. #endif /* PRISM2_PCI */
  325. /* Command codes for CMD reg. */
  326. #define HFA384X_CMDCODE_INIT 0x00
  327. #define HFA384X_CMDCODE_ENABLE 0x01
  328. #define HFA384X_CMDCODE_DISABLE 0x02
  329. #define HFA384X_CMDCODE_ALLOC 0x0A
  330. #define HFA384X_CMDCODE_TRANSMIT 0x0B
  331. #define HFA384X_CMDCODE_INQUIRE 0x11
  332. #define HFA384X_CMDCODE_ACCESS 0x21
  333. #define HFA384X_CMDCODE_ACCESS_WRITE (0x21 | BIT(8))
  334. #define HFA384X_CMDCODE_DOWNLOAD 0x22
  335. #define HFA384X_CMDCODE_READMIF 0x30
  336. #define HFA384X_CMDCODE_WRITEMIF 0x31
  337. #define HFA384X_CMDCODE_TEST 0x38
  338. #define HFA384X_CMDCODE_MASK 0x3F
  339. /* Test mode operations */
  340. #define HFA384X_TEST_CHANGE_CHANNEL 0x08
  341. #define HFA384X_TEST_MONITOR 0x0B
  342. #define HFA384X_TEST_STOP 0x0F
  343. #define HFA384X_TEST_CFG_BITS 0x15
  344. #define HFA384X_TEST_CFG_BIT_ALC BIT(3)
  345. #define HFA384X_CMD_BUSY BIT(15)
  346. #define HFA384X_CMD_TX_RECLAIM BIT(8)
  347. #define HFA384X_OFFSET_ERR BIT(14)
  348. #define HFA384X_OFFSET_BUSY BIT(15)
  349. /* ProgMode for download command */
  350. #define HFA384X_PROGMODE_DISABLE 0
  351. #define HFA384X_PROGMODE_ENABLE_VOLATILE 1
  352. #define HFA384X_PROGMODE_ENABLE_NON_VOLATILE 2
  353. #define HFA384X_PROGMODE_PROGRAM_NON_VOLATILE 3
  354. #define HFA384X_AUX_MAGIC0 0xfe01
  355. #define HFA384X_AUX_MAGIC1 0xdc23
  356. #define HFA384X_AUX_MAGIC2 0xba45
  357. #define HFA384X_AUX_PORT_DISABLED 0
  358. #define HFA384X_AUX_PORT_DISABLE BIT(14)
  359. #define HFA384X_AUX_PORT_ENABLE BIT(15)
  360. #define HFA384X_AUX_PORT_ENABLED (BIT(14) | BIT(15))
  361. #define HFA384X_AUX_PORT_MASK (BIT(14) | BIT(15))
  362. #define PRISM2_PDA_SIZE 1024
  363. /* Events; EvStat, Interrupt mask (IntEn), and acknowledge bits (EvAck) */
  364. #define HFA384X_EV_TICK BIT(15)
  365. #define HFA384X_EV_WTERR BIT(14)
  366. #define HFA384X_EV_INFDROP BIT(13)
  367. #ifdef PRISM2_PCI
  368. #define HFA384X_EV_PCI_M1 BIT(9)
  369. #define HFA384X_EV_PCI_M0 BIT(8)
  370. #endif /* PRISM2_PCI */
  371. #define HFA384X_EV_INFO BIT(7)
  372. #define HFA384X_EV_DTIM BIT(5)
  373. #define HFA384X_EV_CMD BIT(4)
  374. #define HFA384X_EV_ALLOC BIT(3)
  375. #define HFA384X_EV_TXEXC BIT(2)
  376. #define HFA384X_EV_TX BIT(1)
  377. #define HFA384X_EV_RX BIT(0)
  378. /* HFA384X Information frames */
  379. #define HFA384X_INFO_HANDOVERADDR 0xF000 /* AP f/w ? */
  380. #define HFA384X_INFO_HANDOVERDEAUTHADDR 0xF001 /* AP f/w 1.3.7 */
  381. #define HFA384X_INFO_COMMTALLIES 0xF100
  382. #define HFA384X_INFO_SCANRESULTS 0xF101
  383. #define HFA384X_INFO_CHANNELINFORESULTS 0xF102 /* AP f/w only */
  384. #define HFA384X_INFO_HOSTSCANRESULTS 0xF103
  385. #define HFA384X_INFO_LINKSTATUS 0xF200
  386. #define HFA384X_INFO_ASSOCSTATUS 0xF201 /* ? */
  387. #define HFA384X_INFO_AUTHREQ 0xF202 /* ? */
  388. #define HFA384X_INFO_PSUSERCNT 0xF203 /* ? */
  389. #define HFA384X_INFO_KEYIDCHANGED 0xF204 /* ? */
  390. enum { HFA384X_LINKSTATUS_CONNECTED = 1,
  391. HFA384X_LINKSTATUS_DISCONNECTED = 2,
  392. HFA384X_LINKSTATUS_AP_CHANGE = 3,
  393. HFA384X_LINKSTATUS_AP_OUT_OF_RANGE = 4,
  394. HFA384X_LINKSTATUS_AP_IN_RANGE = 5,
  395. HFA384X_LINKSTATUS_ASSOC_FAILED = 6 };
  396. enum { HFA384X_PORTTYPE_BSS = 1, HFA384X_PORTTYPE_WDS = 2,
  397. HFA384X_PORTTYPE_PSEUDO_IBSS = 3, HFA384X_PORTTYPE_IBSS = 0,
  398. HFA384X_PORTTYPE_HOSTAP = 6 };
  399. #define HFA384X_RATES_1MBPS BIT(0)
  400. #define HFA384X_RATES_2MBPS BIT(1)
  401. #define HFA384X_RATES_5MBPS BIT(2)
  402. #define HFA384X_RATES_11MBPS BIT(3)
  403. #define HFA384X_ROAMING_FIRMWARE 1
  404. #define HFA384X_ROAMING_HOST 2
  405. #define HFA384X_ROAMING_DISABLED 3
  406. #define HFA384X_WEPFLAGS_PRIVACYINVOKED BIT(0)
  407. #define HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED BIT(1)
  408. #define HFA384X_WEPFLAGS_HOSTENCRYPT BIT(4)
  409. #define HFA384X_WEPFLAGS_HOSTDECRYPT BIT(7)
  410. #define HFA384X_RX_STATUS_MSGTYPE (BIT(15) | BIT(14) | BIT(13))
  411. #define HFA384X_RX_STATUS_PCF BIT(12)
  412. #define HFA384X_RX_STATUS_MACPORT (BIT(10) | BIT(9) | BIT(8))
  413. #define HFA384X_RX_STATUS_UNDECR BIT(1)
  414. #define HFA384X_RX_STATUS_FCSERR BIT(0)
  415. #define HFA384X_RX_STATUS_GET_MSGTYPE(s) \
  416. (((s) & HFA384X_RX_STATUS_MSGTYPE) >> 13)
  417. #define HFA384X_RX_STATUS_GET_MACPORT(s) \
  418. (((s) & HFA384X_RX_STATUS_MACPORT) >> 8)
  419. enum { HFA384X_RX_MSGTYPE_NORMAL = 0, HFA384X_RX_MSGTYPE_RFC1042 = 1,
  420. HFA384X_RX_MSGTYPE_BRIDGETUNNEL = 2, HFA384X_RX_MSGTYPE_MGMT = 4 };
  421. #define HFA384X_TX_CTRL_ALT_RTRY BIT(5)
  422. #define HFA384X_TX_CTRL_802_11 BIT(3)
  423. #define HFA384X_TX_CTRL_802_3 0
  424. #define HFA384X_TX_CTRL_TX_EX BIT(2)
  425. #define HFA384X_TX_CTRL_TX_OK BIT(1)
  426. #define HFA384X_TX_STATUS_RETRYERR BIT(0)
  427. #define HFA384X_TX_STATUS_AGEDERR BIT(1)
  428. #define HFA384X_TX_STATUS_DISCON BIT(2)
  429. #define HFA384X_TX_STATUS_FORMERR BIT(3)
  430. /* HFA3861/3863 (BBP) Control Registers */
  431. #define HFA386X_CR_TX_CONFIGURE 0x12 /* CR9 */
  432. #define HFA386X_CR_RX_CONFIGURE 0x14 /* CR10 */
  433. #define HFA386X_CR_A_D_TEST_MODES2 0x1A /* CR13 */
  434. #define HFA386X_CR_MANUAL_TX_POWER 0x3E /* CR31 */
  435. #define HFA386X_CR_MEASURED_TX_POWER 0x74 /* CR58 */
  436. #ifdef __KERNEL__
  437. #define PRISM2_TXFID_COUNT 8
  438. #define PRISM2_DATA_MAXLEN 2304
  439. #define PRISM2_TXFID_LEN (PRISM2_DATA_MAXLEN + sizeof(struct hfa384x_tx_frame))
  440. #define PRISM2_TXFID_EMPTY 0xffff
  441. #define PRISM2_TXFID_RESERVED 0xfffe
  442. #define PRISM2_DUMMY_FID 0xffff
  443. #define MAX_SSID_LEN 32
  444. #define MAX_NAME_LEN 32 /* this is assumed to be equal to MAX_SSID_LEN */
  445. #define PRISM2_DUMP_RX_HDR BIT(0)
  446. #define PRISM2_DUMP_TX_HDR BIT(1)
  447. #define PRISM2_DUMP_TXEXC_HDR BIT(2)
  448. struct hostap_tx_callback_info {
  449. u16 idx;
  450. void (*func)(struct sk_buff *, int ok, void *);
  451. void *data;
  452. struct hostap_tx_callback_info *next;
  453. };
  454. /* IEEE 802.11 requires that STA supports concurrent reception of at least
  455. * three fragmented frames. This define can be increased to support more
  456. * concurrent frames, but it should be noted that each entry can consume about
  457. * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
  458. #define PRISM2_FRAG_CACHE_LEN 4
  459. struct prism2_frag_entry {
  460. unsigned long first_frag_time;
  461. unsigned int seq;
  462. unsigned int last_frag;
  463. struct sk_buff *skb;
  464. u8 src_addr[ETH_ALEN];
  465. u8 dst_addr[ETH_ALEN];
  466. };
  467. struct hostap_cmd_queue {
  468. struct list_head list;
  469. wait_queue_head_t compl;
  470. volatile enum { CMD_SLEEP, CMD_CALLBACK, CMD_COMPLETED } type;
  471. void (*callback)(struct net_device *dev, long context, u16 resp0,
  472. u16 res);
  473. long context;
  474. u16 cmd, param0, param1;
  475. u16 resp0, res;
  476. volatile int issued, issuing;
  477. atomic_t usecnt;
  478. int del_req;
  479. };
  480. /* options for hw_shutdown */
  481. #define HOSTAP_HW_NO_DISABLE BIT(0)
  482. #define HOSTAP_HW_ENABLE_CMDCOMPL BIT(1)
  483. typedef struct local_info local_info_t;
  484. struct prism2_helper_functions {
  485. /* these functions are defined in hardware model specific files
  486. * (hostap_{cs,plx,pci}.c */
  487. int (*card_present)(local_info_t *local);
  488. void (*cor_sreset)(local_info_t *local);
  489. void (*genesis_reset)(local_info_t *local, int hcr);
  490. /* the following functions are from hostap_hw.c, but they may have some
  491. * hardware model specific code */
  492. /* FIX: low-level commands like cmd might disappear at some point to
  493. * make it easier to change them if needed (e.g., cmd would be replaced
  494. * with write_mif/read_mif/testcmd/inquire); at least get_rid and
  495. * set_rid might move to hostap_{cs,plx,pci}.c */
  496. int (*cmd)(struct net_device *dev, u16 cmd, u16 param0, u16 *param1,
  497. u16 *resp0);
  498. void (*read_regs)(struct net_device *dev, struct hfa384x_regs *regs);
  499. int (*get_rid)(struct net_device *dev, u16 rid, void *buf, int len,
  500. int exact_len);
  501. int (*set_rid)(struct net_device *dev, u16 rid, void *buf, int len);
  502. int (*hw_enable)(struct net_device *dev, int initial);
  503. int (*hw_config)(struct net_device *dev, int initial);
  504. void (*hw_reset)(struct net_device *dev);
  505. void (*hw_shutdown)(struct net_device *dev, int no_disable);
  506. int (*reset_port)(struct net_device *dev);
  507. void (*schedule_reset)(local_info_t *local);
  508. int (*download)(local_info_t *local,
  509. struct prism2_download_param *param);
  510. int (*tx)(struct sk_buff *skb, struct net_device *dev);
  511. int (*set_tim)(struct net_device *dev, int aid, int set);
  512. int (*read_aux)(struct net_device *dev, unsigned addr, int len,
  513. u8 *buf);
  514. int need_tx_headroom; /* number of bytes of headroom needed before
  515. * IEEE 802.11 header */
  516. enum { HOSTAP_HW_PCCARD, HOSTAP_HW_PLX, HOSTAP_HW_PCI } hw_type;
  517. };
  518. struct prism2_download_data {
  519. u32 dl_cmd;
  520. u32 start_addr;
  521. u32 num_areas;
  522. struct prism2_download_data_area {
  523. u32 addr; /* wlan card address */
  524. u32 len;
  525. u8 *data; /* allocated data */
  526. } data[0];
  527. };
  528. #define HOSTAP_MAX_BSS_COUNT 64
  529. #define MAX_WPA_IE_LEN 64
  530. struct hostap_bss_info {
  531. struct list_head list;
  532. unsigned long last_update;
  533. unsigned int count;
  534. u8 bssid[ETH_ALEN];
  535. u16 capab_info;
  536. u8 ssid[32];
  537. size_t ssid_len;
  538. u8 wpa_ie[MAX_WPA_IE_LEN];
  539. size_t wpa_ie_len;
  540. u8 rsn_ie[MAX_WPA_IE_LEN];
  541. size_t rsn_ie_len;
  542. int chan;
  543. int included;
  544. };
  545. /* Per radio private Host AP data - shared by all net devices interfaces used
  546. * by each radio (wlan#, wlan#ap, wlan#sta, WDS).
  547. * ((struct hostap_interface *) netdev_priv(dev))->local points to this
  548. * structure. */
  549. struct local_info {
  550. struct module *hw_module;
  551. int card_idx;
  552. int dev_enabled;
  553. int master_dev_auto_open; /* was master device opened automatically */
  554. int num_dev_open; /* number of open devices */
  555. struct net_device *dev; /* master radio device */
  556. struct net_device *ddev; /* main data device */
  557. struct list_head hostap_interfaces; /* Host AP interface list (contains
  558. * struct hostap_interface entries)
  559. */
  560. rwlock_t iface_lock; /* hostap_interfaces read lock; use write lock
  561. * when removing entries from the list.
  562. * TX and RX paths can use read lock. */
  563. spinlock_t cmdlock, baplock, lock;
  564. struct mutex rid_bap_mtx;
  565. u16 infofid; /* MAC buffer id for info frame */
  566. /* txfid, intransmitfid, next_txtid, and next_alloc are protected by
  567. * txfidlock */
  568. spinlock_t txfidlock;
  569. int txfid_len; /* length of allocated TX buffers */
  570. u16 txfid[PRISM2_TXFID_COUNT]; /* buffer IDs for TX frames */
  571. /* buffer IDs for intransmit frames or PRISM2_TXFID_EMPTY if
  572. * corresponding txfid is free for next TX frame */
  573. u16 intransmitfid[PRISM2_TXFID_COUNT];
  574. int next_txfid; /* index to the next txfid to be checked for
  575. * availability */
  576. int next_alloc; /* index to the next intransmitfid to be checked for
  577. * allocation events */
  578. /* bitfield for atomic bitops */
  579. #define HOSTAP_BITS_TRANSMIT 0
  580. #define HOSTAP_BITS_BAP_TASKLET 1
  581. #define HOSTAP_BITS_BAP_TASKLET2 2
  582. unsigned long bits;
  583. struct ap_data *ap;
  584. char essid[MAX_SSID_LEN + 1];
  585. char name[MAX_NAME_LEN + 1];
  586. int name_set;
  587. u16 channel_mask; /* mask of allowed channels */
  588. u16 scan_channel_mask; /* mask of channels to be scanned */
  589. struct comm_tallies_sums comm_tallies;
  590. struct proc_dir_entry *proc;
  591. int iw_mode; /* operating mode (IW_MODE_*) */
  592. int pseudo_adhoc; /* 0: IW_MODE_ADHOC is real 802.11 compliant IBSS
  593. * 1: IW_MODE_ADHOC is "pseudo IBSS" */
  594. char bssid[ETH_ALEN];
  595. int channel;
  596. int beacon_int;
  597. int dtim_period;
  598. int mtu;
  599. int frame_dump; /* dump RX/TX frame headers, PRISM2_DUMP_ flags */
  600. int fw_tx_rate_control;
  601. u16 tx_rate_control;
  602. u16 basic_rates;
  603. int hw_resetting;
  604. int hw_ready;
  605. int hw_reset_tries; /* how many times reset has been tried */
  606. int hw_downloading;
  607. int shutdown;
  608. int pri_only;
  609. int no_pri; /* no PRI f/w present */
  610. int sram_type; /* 8 = x8 SRAM, 16 = x16 SRAM, -1 = unknown */
  611. enum {
  612. PRISM2_TXPOWER_AUTO = 0, PRISM2_TXPOWER_OFF,
  613. PRISM2_TXPOWER_FIXED, PRISM2_TXPOWER_UNKNOWN
  614. } txpower_type;
  615. int txpower; /* if txpower_type == PRISM2_TXPOWER_FIXED */
  616. /* command queue for hfa384x_cmd(); protected with cmdlock */
  617. struct list_head cmd_queue;
  618. /* max_len for cmd_queue; in addition, cmd_callback can use two
  619. * additional entries to prevent sleeping commands from stopping
  620. * transmits */
  621. #define HOSTAP_CMD_QUEUE_MAX_LEN 16
  622. int cmd_queue_len; /* number of entries in cmd_queue */
  623. /* if card timeout is detected in interrupt context, reset_queue is
  624. * used to schedule card reseting to be done in user context */
  625. struct work_struct reset_queue;
  626. /* For scheduling a change of the promiscuous mode RID */
  627. int is_promisc;
  628. struct work_struct set_multicast_list_queue;
  629. struct work_struct set_tim_queue;
  630. struct list_head set_tim_list;
  631. spinlock_t set_tim_lock;
  632. int wds_max_connections;
  633. int wds_connections;
  634. #define HOSTAP_WDS_BROADCAST_RA BIT(0)
  635. #define HOSTAP_WDS_AP_CLIENT BIT(1)
  636. #define HOSTAP_WDS_STANDARD_FRAME BIT(2)
  637. u32 wds_type;
  638. u16 tx_control; /* flags to be used in TX description */
  639. int manual_retry_count; /* -1 = use f/w default; otherwise retry count
  640. * to be used with all frames */
  641. struct iw_statistics wstats;
  642. unsigned long scan_timestamp; /* Time started to scan */
  643. enum {
  644. PRISM2_MONITOR_80211 = 0, PRISM2_MONITOR_PRISM = 1,
  645. PRISM2_MONITOR_CAPHDR = 2, PRISM2_MONITOR_RADIOTAP = 3
  646. } monitor_type;
  647. int monitor_allow_fcserr;
  648. int hostapd; /* whether user space daemon, hostapd, is used for AP
  649. * management */
  650. int hostapd_sta; /* whether hostapd is used with an extra STA interface
  651. */
  652. struct net_device *apdev;
  653. struct net_device_stats apdevstats;
  654. char assoc_ap_addr[ETH_ALEN];
  655. struct net_device *stadev;
  656. struct net_device_stats stadevstats;
  657. #define WEP_KEYS 4
  658. #define WEP_KEY_LEN 13
  659. struct lib80211_crypt_info crypt_info;
  660. int open_wep; /* allow unencrypted frames */
  661. int host_encrypt;
  662. int host_decrypt;
  663. int privacy_invoked; /* force privacy invoked flag even if no keys are
  664. * configured */
  665. int fw_encrypt_ok; /* whether firmware-based WEP encrypt is working
  666. * in Host AP mode (STA f/w 1.4.9 or newer) */
  667. int bcrx_sta_key; /* use individual keys to override default keys even
  668. * with RX of broad/multicast frames */
  669. struct prism2_frag_entry frag_cache[PRISM2_FRAG_CACHE_LEN];
  670. unsigned int frag_next_idx;
  671. int ieee_802_1x; /* is IEEE 802.1X used */
  672. int antsel_tx, antsel_rx;
  673. int rts_threshold; /* dot11RTSThreshold */
  674. int fragm_threshold; /* dot11FragmentationThreshold */
  675. int auth_algs; /* PRISM2_AUTH_ flags */
  676. int enh_sec; /* cnfEnhSecurity options (broadcast SSID hide/ignore) */
  677. int tallies32; /* 32-bit tallies in use */
  678. struct prism2_helper_functions *func;
  679. u8 *pda;
  680. int fw_ap;
  681. #define PRISM2_FW_VER(major, minor, variant) \
  682. (((major) << 16) | ((minor) << 8) | variant)
  683. u32 sta_fw_ver;
  684. /* Tasklets for handling hardware IRQ related operations outside hw IRQ
  685. * handler */
  686. struct tasklet_struct bap_tasklet;
  687. struct tasklet_struct info_tasklet;
  688. struct sk_buff_head info_list; /* info frames as skb's for
  689. * info_tasklet */
  690. struct hostap_tx_callback_info *tx_callback; /* registered TX callbacks
  691. */
  692. struct tasklet_struct rx_tasklet;
  693. struct sk_buff_head rx_list;
  694. struct tasklet_struct sta_tx_exc_tasklet;
  695. struct sk_buff_head sta_tx_exc_list;
  696. int host_roaming;
  697. unsigned long last_join_time; /* time of last JoinRequest */
  698. struct hfa384x_hostscan_result *last_scan_results;
  699. int last_scan_results_count;
  700. enum { PRISM2_SCAN, PRISM2_HOSTSCAN } last_scan_type;
  701. struct work_struct info_queue;
  702. unsigned long pending_info; /* bit field of pending info_queue items */
  703. #define PRISM2_INFO_PENDING_LINKSTATUS 0
  704. #define PRISM2_INFO_PENDING_SCANRESULTS 1
  705. int prev_link_status; /* previous received LinkStatus info */
  706. int prev_linkstatus_connected;
  707. u8 preferred_ap[6]; /* use this AP if possible */
  708. #ifdef PRISM2_CALLBACK
  709. void *callback_data; /* Can be used in callbacks; e.g., allocate
  710. * on enable event and free on disable event.
  711. * Host AP driver code does not touch this. */
  712. #endif /* PRISM2_CALLBACK */
  713. wait_queue_head_t hostscan_wq;
  714. /* Passive scan in Host AP mode */
  715. struct timer_list passive_scan_timer;
  716. int passive_scan_interval; /* in seconds, 0 = disabled */
  717. int passive_scan_channel;
  718. enum { PASSIVE_SCAN_WAIT, PASSIVE_SCAN_LISTEN } passive_scan_state;
  719. struct timer_list tick_timer;
  720. unsigned long last_tick_timer;
  721. unsigned int sw_tick_stuck;
  722. /* commsQuality / dBmCommsQuality data from periodic polling; only
  723. * valid for Managed and Ad-hoc modes */
  724. unsigned long last_comms_qual_update;
  725. int comms_qual; /* in some odd unit.. */
  726. int avg_signal; /* in dB (note: negative) */
  727. int avg_noise; /* in dB (note: negative) */
  728. struct work_struct comms_qual_update;
  729. /* RSSI to dBm adjustment (for RX descriptor fields) */
  730. int rssi_to_dBm; /* substract from RSSI to get approximate dBm value */
  731. /* BSS list / protected by local->lock */
  732. struct list_head bss_list;
  733. int num_bss_info;
  734. int wpa; /* WPA support enabled */
  735. int tkip_countermeasures;
  736. int drop_unencrypted;
  737. /* Generic IEEE 802.11 info element to be added to
  738. * ProbeResp/Beacon/(Re)AssocReq */
  739. u8 *generic_elem;
  740. size_t generic_elem_len;
  741. #ifdef PRISM2_DOWNLOAD_SUPPORT
  742. /* Persistent volatile download data */
  743. struct prism2_download_data *dl_pri;
  744. struct prism2_download_data *dl_sec;
  745. #endif /* PRISM2_DOWNLOAD_SUPPORT */
  746. #ifdef PRISM2_IO_DEBUG
  747. #define PRISM2_IO_DEBUG_SIZE 10000
  748. u32 io_debug[PRISM2_IO_DEBUG_SIZE];
  749. int io_debug_head;
  750. int io_debug_enabled;
  751. #endif /* PRISM2_IO_DEBUG */
  752. /* Pointer to hardware model specific (cs,pci,plx) private data. */
  753. void *hw_priv;
  754. };
  755. /* Per interface private Host AP data
  756. * Allocated for each net device that Host AP uses (wlan#, wlan#ap, wlan#sta,
  757. * WDS) and netdev_priv(dev) points to this structure. */
  758. struct hostap_interface {
  759. struct list_head list; /* list entry in Host AP interface list */
  760. struct net_device *dev; /* pointer to this device */
  761. struct local_info *local; /* pointer to shared private data */
  762. struct net_device_stats stats;
  763. struct iw_spy_data spy_data; /* iwspy support */
  764. struct iw_public_data wireless_data;
  765. enum {
  766. HOSTAP_INTERFACE_MASTER,
  767. HOSTAP_INTERFACE_MAIN,
  768. HOSTAP_INTERFACE_AP,
  769. HOSTAP_INTERFACE_STA,
  770. HOSTAP_INTERFACE_WDS,
  771. } type;
  772. union {
  773. struct hostap_interface_wds {
  774. u8 remote_addr[ETH_ALEN];
  775. } wds;
  776. } u;
  777. };
  778. #define HOSTAP_SKB_TX_DATA_MAGIC 0xf08a36a2
  779. /*
  780. * TX meta data - stored in skb->cb buffer, so this must not be increased over
  781. * the 48-byte limit.
  782. * THE PADDING THIS STARTS WITH IS A HORRIBLE HACK THAT SHOULD NOT LIVE
  783. * TO SEE THE DAY.
  784. */
  785. struct hostap_skb_tx_data {
  786. unsigned int __padding_for_default_qdiscs;
  787. u32 magic; /* HOSTAP_SKB_TX_DATA_MAGIC */
  788. u8 rate; /* transmit rate */
  789. #define HOSTAP_TX_FLAGS_WDS BIT(0)
  790. #define HOSTAP_TX_FLAGS_BUFFERED_FRAME BIT(1)
  791. #define HOSTAP_TX_FLAGS_ADD_MOREDATA BIT(2)
  792. u8 flags; /* HOSTAP_TX_FLAGS_* */
  793. u16 tx_cb_idx;
  794. struct hostap_interface *iface;
  795. unsigned long jiffies; /* queueing timestamp */
  796. unsigned short ethertype;
  797. };
  798. #ifndef PRISM2_NO_DEBUG
  799. #define DEBUG_FID BIT(0)
  800. #define DEBUG_PS BIT(1)
  801. #define DEBUG_FLOW BIT(2)
  802. #define DEBUG_AP BIT(3)
  803. #define DEBUG_HW BIT(4)
  804. #define DEBUG_EXTRA BIT(5)
  805. #define DEBUG_EXTRA2 BIT(6)
  806. #define DEBUG_PS2 BIT(7)
  807. #define DEBUG_MASK (DEBUG_PS | DEBUG_AP | DEBUG_HW | DEBUG_EXTRA)
  808. #define PDEBUG(n, args...) \
  809. do { if ((n) & DEBUG_MASK) printk(KERN_DEBUG args); } while (0)
  810. #define PDEBUG2(n, args...) \
  811. do { if ((n) & DEBUG_MASK) printk(args); } while (0)
  812. #else /* PRISM2_NO_DEBUG */
  813. #define PDEBUG(n, args...)
  814. #define PDEBUG2(n, args...)
  815. #endif /* PRISM2_NO_DEBUG */
  816. enum { BAP0 = 0, BAP1 = 1 };
  817. #define PRISM2_IO_DEBUG_CMD_INB 0
  818. #define PRISM2_IO_DEBUG_CMD_INW 1
  819. #define PRISM2_IO_DEBUG_CMD_INSW 2
  820. #define PRISM2_IO_DEBUG_CMD_OUTB 3
  821. #define PRISM2_IO_DEBUG_CMD_OUTW 4
  822. #define PRISM2_IO_DEBUG_CMD_OUTSW 5
  823. #define PRISM2_IO_DEBUG_CMD_ERROR 6
  824. #define PRISM2_IO_DEBUG_CMD_INTERRUPT 7
  825. #ifdef PRISM2_IO_DEBUG
  826. #define PRISM2_IO_DEBUG_ENTRY(cmd, reg, value) \
  827. (((cmd) << 24) | ((reg) << 16) | value)
  828. static inline void prism2_io_debug_add(struct net_device *dev, int cmd,
  829. int reg, int value)
  830. {
  831. struct hostap_interface *iface = netdev_priv(dev);
  832. local_info_t *local = iface->local;
  833. if (!local->io_debug_enabled)
  834. return;
  835. local->io_debug[local->io_debug_head] = jiffies & 0xffffffff;
  836. if (++local->io_debug_head >= PRISM2_IO_DEBUG_SIZE)
  837. local->io_debug_head = 0;
  838. local->io_debug[local->io_debug_head] =
  839. PRISM2_IO_DEBUG_ENTRY(cmd, reg, value);
  840. if (++local->io_debug_head >= PRISM2_IO_DEBUG_SIZE)
  841. local->io_debug_head = 0;
  842. }
  843. static inline void prism2_io_debug_error(struct net_device *dev, int err)
  844. {
  845. struct hostap_interface *iface = netdev_priv(dev);
  846. local_info_t *local = iface->local;
  847. unsigned long flags;
  848. if (!local->io_debug_enabled)
  849. return;
  850. spin_lock_irqsave(&local->lock, flags);
  851. prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_ERROR, 0, err);
  852. if (local->io_debug_enabled == 1) {
  853. local->io_debug_enabled = 0;
  854. printk(KERN_DEBUG "%s: I/O debug stopped\n", dev->name);
  855. }
  856. spin_unlock_irqrestore(&local->lock, flags);
  857. }
  858. #else /* PRISM2_IO_DEBUG */
  859. static inline void prism2_io_debug_add(struct net_device *dev, int cmd,
  860. int reg, int value)
  861. {
  862. }
  863. static inline void prism2_io_debug_error(struct net_device *dev, int err)
  864. {
  865. }
  866. #endif /* PRISM2_IO_DEBUG */
  867. #ifdef PRISM2_CALLBACK
  868. enum {
  869. /* Called when card is enabled */
  870. PRISM2_CALLBACK_ENABLE,
  871. /* Called when card is disabled */
  872. PRISM2_CALLBACK_DISABLE,
  873. /* Called when RX/TX starts/ends */
  874. PRISM2_CALLBACK_RX_START, PRISM2_CALLBACK_RX_END,
  875. PRISM2_CALLBACK_TX_START, PRISM2_CALLBACK_TX_END
  876. };
  877. void prism2_callback(local_info_t *local, int event);
  878. #else /* PRISM2_CALLBACK */
  879. #define prism2_callback(d, e) do { } while (0)
  880. #endif /* PRISM2_CALLBACK */
  881. #endif /* __KERNEL__ */
  882. #endif /* HOSTAP_WLAN_H */