59 #define HFA384x_FIRMWARE_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
61 #include <linux/if_ether.h>
64 #define HFA384x_PORTID_MAX ((u16)7)
65 #define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1))
66 #define HFA384x_PDR_LEN_MAX ((u16)512)
67 #define HFA384x_PDA_RECS_MAX ((u16)200)
68 #define HFA384x_PDA_LEN_MAX ((u16)1024)
69 #define HFA384x_SCANRESULT_MAX ((u16)31)
70 #define HFA384x_HSCANRESULT_MAX ((u16)31)
71 #define HFA384x_CHINFORESULT_MAX ((u16)16)
72 #define HFA384x_RID_GUESSING_MAXLEN 2048
73 #define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN
74 #define HFA384x_USB_RWMEM_MAXLEN 2048
77 #define HFA384x_PORTTYPE_IBSS ((u16)0)
78 #define HFA384x_PORTTYPE_BSS ((u16)1)
79 #define HFA384x_PORTTYPE_PSUEDOIBSS ((u16)3)
80 #define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT(0))
81 #define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT(1))
82 #define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT(4))
83 #define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT(7))
84 #define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3)
85 #define HFA384x_PORTSTATUS_DISABLED ((u16)1)
86 #define HFA384x_RATEBIT_1 ((u16)1)
87 #define HFA384x_RATEBIT_2 ((u16)2)
88 #define HFA384x_RATEBIT_5dot5 ((u16)4)
89 #define HFA384x_RATEBIT_11 ((u16)8)
106 #define HFA384x_ADDR_FLAT_AUX_PAGE_MASK (0x007fff80)
107 #define HFA384x_ADDR_FLAT_AUX_OFF_MASK (0x0000007f)
108 #define HFA384x_ADDR_FLAT_CMD_PAGE_MASK (0xffff0000)
109 #define HFA384x_ADDR_FLAT_CMD_OFF_MASK (0x0000ffff)
113 #define HFA384x_ADDR_AUX_PAGE_MASK (0xffff)
114 #define HFA384x_ADDR_AUX_OFF_MASK (0x007f)
117 #define HFA384x_ADDR_AUX_MKFLAT(p, o) \
118 ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \
119 ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)))
122 #define HFA384x_ADDR_CMD_MKPAGE(f) \
123 ((u16)((((u32)(f))&HFA384x_ADDR_FLAT_CMD_PAGE_MASK)>>16))
124 #define HFA384x_ADDR_CMD_MKOFF(f) \
125 ((u16)(((u32)(f))&HFA384x_ADDR_FLAT_CMD_OFF_MASK))
128 #define HFA3842_PDA_BASE (0x007f0000UL)
129 #define HFA3841_PDA_BASE (0x003f0000UL)
130 #define HFA3841_PDA_BOGUS_BASE (0x00390000UL)
133 #define HFA384x_DLSTATE_DISABLED 0
134 #define HFA384x_DLSTATE_RAMENABLED 1
135 #define HFA384x_DLSTATE_FLASHENABLED 2
138 #define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) \
139 | BIT(12) | BIT(11) \
142 #define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | \
144 #define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8)))
145 #define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | \
149 #define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) \
150 | BIT(12) | BIT(11) \
156 #define HFA384x_CMDCODE_INIT ((u16)0x00)
157 #define HFA384x_CMDCODE_ENABLE ((u16)0x01)
158 #define HFA384x_CMDCODE_DISABLE ((u16)0x02)
161 #define HFA384x_CMDCODE_INQ ((u16)0x11)
164 #define HFA384x_CMDCODE_DOWNLD ((u16)0x22)
167 #define HFA384x_CMDCODE_MONITOR ((u16)(0x38))
168 #define HFA384x_MONITOR_ENABLE ((u16)(0x0b))
169 #define HFA384x_MONITOR_DISABLE ((u16)(0x0f))
172 #define HFA384x_CMD_ERR ((u16)(0x7F))
180 #define HFA384x_PROGMODE_DISABLE ((u16)0x00)
181 #define HFA384x_PROGMODE_RAM ((u16)0x01)
182 #define HFA384x_PROGMODE_NV ((u16)0x02)
183 #define HFA384x_PROGMODE_NVWRITE ((u16)0x03)
189 #define HFA384x_RID_CNFPORTTYPE ((u16)0xFC00)
190 #define HFA384x_RID_CNFOWNMACADDR ((u16)0xFC01)
191 #define HFA384x_RID_CNFDESIREDSSID ((u16)0xFC02)
192 #define HFA384x_RID_CNFOWNCHANNEL ((u16)0xFC03)
193 #define HFA384x_RID_CNFOWNSSID ((u16)0xFC04)
194 #define HFA384x_RID_CNFMAXDATALEN ((u16)0xFC07)
201 #define HFA384x_RID_CNFOWNMACADDR_LEN ((u16)6)
202 #define HFA384x_RID_CNFDESIREDSSID_LEN ((u16)34)
203 #define HFA384x_RID_CNFOWNSSID_LEN ((u16)34)
208 #define HFA384x_RID_CREATEIBSS ((u16)0xFC81)
209 #define HFA384x_RID_FRAGTHRESH ((u16)0xFC82)
210 #define HFA384x_RID_RTSTHRESH ((u16)0xFC83)
211 #define HFA384x_RID_TXRATECNTL ((u16)0xFC84)
212 #define HFA384x_RID_PROMISCMODE ((u16)0xFC85)
217 #define HFA384x_RID_MAXLOADTIME ((u16)0xFD00)
218 #define HFA384x_RID_DOWNLOADBUFFER ((u16)0xFD01)
219 #define HFA384x_RID_PRIIDENTITY ((u16)0xFD02)
220 #define HFA384x_RID_PRISUPRANGE ((u16)0xFD03)
221 #define HFA384x_RID_PRI_CFIACTRANGES ((u16)0xFD04)
222 #define HFA384x_RID_NICSERIALNUMBER ((u16)0xFD0A)
223 #define HFA384x_RID_NICIDENTITY ((u16)0xFD0B)
224 #define HFA384x_RID_MFISUPRANGE ((u16)0xFD0C)
225 #define HFA384x_RID_CFISUPRANGE ((u16)0xFD0D)
226 #define HFA384x_RID_STAIDENTITY ((u16)0xFD20)
227 #define HFA384x_RID_STASUPRANGE ((u16)0xFD21)
228 #define HFA384x_RID_STA_MFIACTRANGES ((u16)0xFD22)
229 #define HFA384x_RID_STA_CFIACTRANGES ((u16)0xFD23)
236 #define HFA384x_RID_NICSERIALNUMBER_LEN ((u16)12)
241 #define HFA384x_RID_PORTSTATUS ((u16)0xFD40)
242 #define HFA384x_RID_CURRENTSSID ((u16)0xFD41)
243 #define HFA384x_RID_CURRENTBSSID ((u16)0xFD42)
244 #define HFA384x_RID_CURRENTTXRATE ((u16)0xFD44)
245 #define HFA384x_RID_SHORTRETRYLIMIT ((u16)0xFD48)
246 #define HFA384x_RID_LONGRETRYLIMIT ((u16)0xFD49)
247 #define HFA384x_RID_MAXTXLIFETIME ((u16)0xFD4A)
248 #define HFA384x_RID_PRIVACYOPTIMP ((u16)0xFD4F)
249 #define HFA384x_RID_DBMCOMMSQUALITY ((u16)0xFD51)
256 #define HFA384x_RID_DBMCOMMSQUALITY_LEN \
257 ((u16) sizeof(hfa384x_dbmcommsquality_t))
258 #define HFA384x_RID_JOINREQUEST_LEN \
259 ((u16)sizeof(hfa384x_JoinRequest_data_t))
264 #define HFA384x_RID_CURRENTCHANNEL ((u16)0xFDC1)
269 #define HFA384x_RID_CNFWEPDEFAULTKEYID ((u16)0xFC23)
270 #define HFA384x_RID_CNFWEPDEFAULTKEY0 ((u16)0xFC24)
271 #define HFA384x_RID_CNFWEPDEFAULTKEY1 ((u16)0xFC25)
272 #define HFA384x_RID_CNFWEPDEFAULTKEY2 ((u16)0xFC26)
273 #define HFA384x_RID_CNFWEPDEFAULTKEY3 ((u16)0xFC27)
274 #define HFA384x_RID_CNFWEPFLAGS ((u16)0xFC28)
275 #define HFA384x_RID_CNFAUTHENTICATION ((u16)0xFC2A)
276 #define HFA384x_RID_CNFROAMINGMODE ((u16)0xFC2D)
277 #define HFA384x_RID_CNFAPBCNint ((u16)0xFC33)
278 #define HFA384x_RID_CNFDBMADJUST ((u16)0xFC46)
279 #define HFA384x_RID_CNFWPADATA ((u16)0xFC48)
280 #define HFA384x_RID_CNFBASICRATES ((u16)0xFCB3)
281 #define HFA384x_RID_CNFSUPPRATES ((u16)0xFCB4)
282 #define HFA384x_RID_CNFPASSIVESCANCTRL ((u16)0xFCBA)
283 #define HFA384x_RID_TXPOWERMAX ((u16)0xFCBE)
284 #define HFA384x_RID_JOINREQUEST ((u16)0xFCE2)
285 #define HFA384x_RID_AUTHENTICATESTA ((u16)0xFCE3)
286 #define HFA384x_RID_HOSTSCAN ((u16)0xFCE5)
288 #define HFA384x_RID_CNFWEPDEFAULTKEY_LEN ((u16)6)
289 #define HFA384x_RID_CNFWEP128DEFAULTKEY_LEN ((u16)14)
294 #define HFA384x_PDR_PCB_PARTNUM ((u16)0x0001)
295 #define HFA384x_PDR_PDAVER ((u16)0x0002)
296 #define HFA384x_PDR_NIC_SERIAL ((u16)0x0003)
297 #define HFA384x_PDR_MKK_MEASUREMENTS ((u16)0x0004)
298 #define HFA384x_PDR_NIC_RAMSIZE ((u16)0x0005)
299 #define HFA384x_PDR_MFISUPRANGE ((u16)0x0006)
300 #define HFA384x_PDR_CFISUPRANGE ((u16)0x0007)
301 #define HFA384x_PDR_NICID ((u16)0x0008)
302 #define HFA384x_PDR_MAC_ADDRESS ((u16)0x0101)
303 #define HFA384x_PDR_REGDOMAIN ((u16)0x0103)
304 #define HFA384x_PDR_ALLOWED_CHANNEL ((u16)0x0104)
305 #define HFA384x_PDR_DEFAULT_CHANNEL ((u16)0x0105)
306 #define HFA384x_PDR_TEMPTYPE ((u16)0x0107)
307 #define HFA384x_PDR_IFR_SETTING ((u16)0x0200)
308 #define HFA384x_PDR_RFR_SETTING ((u16)0x0201)
309 #define HFA384x_PDR_HFA3861_BASELINE ((u16)0x0202)
310 #define HFA384x_PDR_HFA3861_SHADOW ((u16)0x0203)
311 #define HFA384x_PDR_HFA3861_IFRF ((u16)0x0204)
312 #define HFA384x_PDR_HFA3861_CHCALSP ((u16)0x0300)
313 #define HFA384x_PDR_HFA3861_CHCALI ((u16)0x0301)
314 #define HFA384x_PDR_MAX_TX_POWER ((u16)0x0302)
315 #define HFA384x_PDR_MASTER_CHAN_LIST ((u16)0x0303)
316 #define HFA384x_PDR_3842_NIC_CONFIG ((u16)0x0400)
317 #define HFA384x_PDR_USB_ID ((u16)0x0401)
318 #define HFA384x_PDR_PCI_ID ((u16)0x0402)
319 #define HFA384x_PDR_PCI_IFCONF ((u16)0x0403)
320 #define HFA384x_PDR_PCI_PMCONF ((u16)0x0404)
321 #define HFA384x_PDR_RFENRGY ((u16)0x0406)
322 #define HFA384x_PDR_USB_POWER_TYPE ((u16)0x0407)
323 #define HFA384x_PDR_USB_MAX_POWER ((u16)0x0409)
324 #define HFA384x_PDR_USB_MANUFACTURER ((u16)0x0410)
325 #define HFA384x_PDR_USB_PRODUCT ((u16)0x0411)
326 #define HFA384x_PDR_ANT_DIVERSITY ((u16)0x0412)
327 #define HFA384x_PDR_HFO_DELAY ((u16)0x0413)
328 #define HFA384x_PDR_SCALE_THRESH ((u16)0x0414)
330 #define HFA384x_PDR_HFA3861_MANF_TESTSP ((u16)0x0900)
331 #define HFA384x_PDR_HFA3861_MANF_TESTI ((u16)0x0901)
332 #define HFA384x_PDR_END_OF_PDA ((u16)0x0000)
336 #define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8))
337 #define HFA384x_CMD_MACPORT_SET(value) \
338 ((u16)HFA384x_CMD_AINFO_SET(value))
339 #define HFA384x_CMD_PROGMODE_SET(value) \
340 ((u16)HFA384x_CMD_AINFO_SET((u16)value))
341 #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value))
343 #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
346 #define HFA384x_STATE_PREINIT 0
347 #define HFA384x_STATE_INIT 1
348 #define HFA384x_STATE_RUNNING 2
384 #define HFA384x_CNFAUTHENTICATION_OPENSYSTEM 0x0001
385 #define HFA384x_CNFAUTHENTICATION_SHAREDKEY 0x0002
386 #define HFA384x_CNFAUTHENTICATION_LEAP 0x0004
393 #define HFA384x_CREATEIBSS_JOINCREATEIBSS 0
437 #define HFA384x_PSTATUS_CONN_IBSS ((u16)3)
489 #define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5))
490 #define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3))
491 #define HFA384x_TXSTATUS_DISCON ((u16)BIT(2))
492 #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
493 #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
495 #define HFA384x_TX_MACPORT ((u16)(BIT(10) | \
497 #define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3)))
498 #define HFA384x_TX_TXEX ((u16)BIT(2))
499 #define HFA384x_TX_TXOK ((u16)BIT(1))
504 #define HFA384x_TXSTATUS_ISERROR(v) \
506 (HFA384x_TXSTATUS_ACKERR|HFA384x_TXSTATUS_FORMERR|\
507 HFA384x_TXSTATUS_DISCON|HFA384x_TXSTATUS_AGEDERR|\
508 HFA384x_TXSTATUS_RETRYERR))
510 #define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m)))
512 #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8)
513 #define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \
514 HFA384x_TX_STRUCTYPE, 3)
515 #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2)
516 #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
552 #define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | \
555 #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
559 #define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \
560 & HFA384x_RXSTATUS_MACPORT) >> 8))
561 #define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \
562 & HFA384x_RXSTATUS_FCSERR))
568 #define HFA384x_IT_HANDOVERADDR ((u16)0xF000UL)
569 #define HFA384x_IT_COMMTALLIES ((u16)0xF100UL)
570 #define HFA384x_IT_SCANRESULTS ((u16)0xF101UL)
571 #define HFA384x_IT_CHINFORESULTS ((u16)0xF102UL)
572 #define HFA384x_IT_HOSTSCANRESULTS ((u16)0xF103UL)
573 #define HFA384x_IT_LINKSTATUS ((u16)0xF200UL)
574 #define HFA384x_IT_ASSOCSTATUS ((u16)0xF201UL)
575 #define HFA384x_IT_AUTHREQ ((u16)0xF202UL)
576 #define HFA384x_IT_PSUSERCNT ((u16)0xF203UL)
577 #define HFA384x_IT_KEYIDCHANGED ((u16)0xF204UL)
578 #define HFA384x_IT_ASSOCREQ ((u16)0xF205UL)
579 #define HFA384x_IT_MICFAILURE ((u16)0xF206UL)
663 #define HFA384x_CHINFORESULT_BSSACTIVE BIT(0)
664 #define HFA384x_CHINFORESULT_PCFACTIVE BIT(1)
693 #define HFA384x_LINK_NOTCONNECTED ((u16)0)
694 #define HFA384x_LINK_CONNECTED ((u16)1)
695 #define HFA384x_LINK_DISCONNECTED ((u16)2)
696 #define HFA384x_LINK_AP_CHANGE ((u16)3)
697 #define HFA384x_LINK_AP_OUTOFRANGE ((u16)4)
698 #define HFA384x_LINK_AP_INRANGE ((u16)5)
699 #define HFA384x_LINK_ASSOCFAIL ((u16)6)
707 #define HFA384x_ASSOCSTATUS_STAASSOC ((u16)1)
708 #define HFA384x_ASSOCSTATUS_REASSOC ((u16)2)
709 #define HFA384x_ASSOCSTATUS_AUTHFAIL ((u16)5)
763 #define HFA384x_USB_TXFRM 0
764 #define HFA384x_USB_CMDREQ 1
765 #define HFA384x_USB_WRIDREQ 2
766 #define HFA384x_USB_RRIDREQ 3
767 #define HFA384x_USB_WMEMREQ 4
768 #define HFA384x_USB_RMEMREQ 5
771 #define HFA384x_USB_ISTXFRM(a) (((a) & 0x9000) == 0x1000)
772 #define HFA384x_USB_ISRXFRM(a) (!((a) & 0x9000))
773 #define HFA384x_USB_INFOFRM 0x8000
774 #define HFA384x_USB_CMDRESP 0x8001
775 #define HFA384x_USB_WRIDRESP 0x8002
776 #define HFA384x_USB_RRIDRESP 0x8003
777 #define HFA384x_USB_WMEMRESP 0x8004
778 #define HFA384x_USB_RMEMRESP 0x8005
779 #define HFA384x_USB_BUFAVAIL 0x8006
780 #define HFA384x_USB_ERROR 0x8007
1117 typedef struct hfa384x_statusresult {
1122 } hfa384x_cmdresult_t;
1131 typedef struct hfa384x_rridresult {
1133 const void *riddata;
1134 unsigned int riddata_len;
1135 } hfa384x_rridresult_t;
1148 typedef enum ctlx_state CTLX_STATE;
1150 struct hfa384x_usbctlx;
1153 typedef void (*ctlx_cmdcb_t) (
struct hfa384x *,
const struct hfa384x_usbctlx *);
1155 typedef void (*ctlx_usercb_t) (
struct hfa384x *
hw,
1156 void *ctlxresult,
void *usercb_data);
1158 typedef struct hfa384x_usbctlx {
1162 hfa384x_usbout_t outbuf;
1163 hfa384x_usbin_t
inbuf;
1168 volatile int reapable;
1171 ctlx_usercb_t usercb;
1175 } hfa384x_usbctlx_t;
1177 typedef struct hfa384x_usbctlxq {
1183 } hfa384x_usbctlxq_t;
1185 typedef struct hfa484x_metacmd {
1192 hfa384x_cmdresult_t
result;
1193 } hfa384x_metacmd_t;
1195 #define MAX_GRP_ADDR 32
1196 #define WLAN_COMMENT_MAX 80
1198 #define WLAN_AUTH_MAX 60
1199 #define WLAN_ACCESS_MAX 60
1200 #define WLAN_ACCESS_NONE 0
1201 #define WLAN_ACCESS_ALL 1
1202 #define WLAN_ACCESS_ALLOW 2
1203 #define WLAN_ACCESS_DENY 3
1206 typedef struct prism2sta_authlist {
1209 u8 assoc[WLAN_AUTH_MAX];
1210 } prism2sta_authlist_t;
1212 typedef struct prism2sta_accesslist {
1213 unsigned int modify;
1218 } prism2sta_accesslist_t;
1220 typedef struct hfa384x {
1222 struct usb_device *
usb;
1226 struct urb ctlx_urb;
1227 hfa384x_usbout_t txbuff;
1228 hfa384x_usbctlxq_t ctlxq;
1239 unsigned long usb_flags;
1240 #define THROTTLE_RX 0
1241 #define THROTTLE_TX 1
1242 #define WORK_RX_HALT 2
1243 #define WORK_TX_HALT 3
1244 #define WORK_RX_RESUME 4
1245 #define WORK_TX_RESUME 5
1247 unsigned short req_timer_done:1;
1248 unsigned short resp_timer_done:1;
1266 unsigned int dlstate;
1267 hfa384x_downloadbuffer_t bufinfo;
1273 hfa384x_JoinRequest_data_t joinreq;
1280 hfa384x_commsquality_t qual;
1284 u16 link_status_new;
1292 unsigned int presniff_port_type;
1293 u16 presniff_wepflags;
1294 u32 dot11_desired_bss_type;
1301 unsigned int dot11_grpcnt;
1304 hfa384x_compident_t ident_nic;
1305 hfa384x_compident_t ident_pri_fw;
1306 hfa384x_compident_t ident_sta_fw;
1307 hfa384x_compident_t ident_ap_fw;
1311 hfa384x_caplevel_t cap_sup_mfi;
1312 hfa384x_caplevel_t cap_sup_cfi;
1313 hfa384x_caplevel_t cap_sup_pri;
1314 hfa384x_caplevel_t cap_sup_sta;
1315 hfa384x_caplevel_t cap_sup_ap;
1318 hfa384x_caplevel_t cap_act_pri_cfi;
1323 hfa384x_caplevel_t cap_act_sta_cfi;
1328 hfa384x_caplevel_t cap_act_sta_mfi;
1330 hfa384x_caplevel_t cap_act_ap_cfi;
1335 hfa384x_caplevel_t cap_act_ap_mfi;
1338 hfa384x_CommTallies32_t tallies;
1339 u8 comment[WLAN_COMMENT_MAX + 1];
1345 hfa384x_ChInfoResult_t results;
1348 hfa384x_InfFrame_t *scanresults;
1350 prism2sta_authlist_t authlist;
1351 unsigned int accessmode;
1352 prism2sta_accesslist_t allow;
1353 prism2sta_accesslist_t deny;
1375 static inline int hfa384x_drvr_getconfig16(hfa384x_t *
hw,
u16 rid,
void *
val)
1384 static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw,
u16 rid,
u16 val)
1392 u16 rid, ctlx_usercb_t usercb,
void *usercb_data);
1398 u16 len, ctlx_usercb_t usercb,
void *usercb_data);
1401 hfa384x_drvr_setconfig16_async(hfa384x_t *hw,
u16 rid,
u16 val)
1418 int hfa384x_cmd_allocate(hfa384x_t *hw,
u16 len);