Searched refs:ctlx (Results 1 - 2 of 2) sorted by relevance

/linux-4.1.27/drivers/staging/wlan-ng/
H A Dhfa384x_usb.c201 static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
203 static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
211 hfa384x_usbctlx_t *ctlx,
215 unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
217 static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx);
219 static void hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx);
620 hfa384x_usbctlx_t *ctlx; usbctlx_alloc() local
622 ctlx = kzalloc(sizeof(*ctlx), usbctlx_alloc()
624 if (ctlx != NULL) usbctlx_alloc()
625 init_completion(&ctlx->done); usbctlx_alloc()
627 return ctlx; usbctlx_alloc()
795 * ctlx completed CTLX
805 static void hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) hfa384x_cb_status() argument
807 if (ctlx->usercb != NULL) { hfa384x_cb_status()
810 if (ctlx->state != CTLX_COMPLETE) { hfa384x_cb_status()
815 usbctlx_get_status(&ctlx->inbuf.cmdresp, &cmdresult); hfa384x_cb_status()
818 ctlx->usercb(hw, &cmdresult, ctlx->usercb_data); hfa384x_cb_status()
832 * ctlx completed CTLX
842 static void hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx) hfa384x_cb_rrid() argument
844 if (ctlx->usercb != NULL) { hfa384x_cb_rrid()
847 if (ctlx->state != CTLX_COMPLETE) { hfa384x_cb_rrid()
849 rridresult.rid = le16_to_cpu(ctlx->outbuf.rridreq.rid); hfa384x_cb_rrid()
851 usbctlx_get_rridresult(&ctlx->inbuf.rridresp, hfa384x_cb_rrid()
855 ctlx->usercb(hw, &rridresult, ctlx->usercb_data); hfa384x_cb_rrid()
1216 * ctlx CTLX ptr
1233 hfa384x_usbctlx_t *ctlx, hfa384x_usbctlx_complete_sync()
1239 result = wait_for_completion_interruptible(&ctlx->done); hfa384x_usbctlx_complete_sync()
1263 if (ctlx == get_active_ctlx(hw)) { hfa384x_usbctlx_complete_sync()
1289 ctlx->reapable = 1; hfa384x_usbctlx_complete_sync()
1290 ctlx->state = CTLX_REQ_FAILED; hfa384x_usbctlx_complete_sync()
1291 list_move_tail(&ctlx->list, &hw->ctlxq.completing); hfa384x_usbctlx_complete_sync()
1298 if (ctlx->state == CTLX_COMPLETE) { hfa384x_usbctlx_complete_sync()
1302 le16_to_cpu(ctlx->outbuf.type), hfa384x_usbctlx_complete_sync()
1303 ctlxstr(ctlx->state)); hfa384x_usbctlx_complete_sync()
1307 list_del(&ctlx->list); hfa384x_usbctlx_complete_sync()
1309 kfree(ctlx); hfa384x_usbctlx_complete_sync()
1354 hfa384x_usbctlx_t *ctlx; hfa384x_docmd() local
1356 ctlx = usbctlx_alloc(); hfa384x_docmd()
1357 if (ctlx == NULL) { hfa384x_docmd()
1363 ctlx->outbuf.cmdreq.type = cpu_to_le16(HFA384x_USB_CMDREQ); hfa384x_docmd()
1364 ctlx->outbuf.cmdreq.cmd = cpu_to_le16(cmd->cmd); hfa384x_docmd()
1365 ctlx->outbuf.cmdreq.parm0 = cpu_to_le16(cmd->parm0); hfa384x_docmd()
1366 ctlx->outbuf.cmdreq.parm1 = cpu_to_le16(cmd->parm1); hfa384x_docmd()
1367 ctlx->outbuf.cmdreq.parm2 = cpu_to_le16(cmd->parm2); hfa384x_docmd()
1369 ctlx->outbufsize = sizeof(ctlx->outbuf.cmdreq); hfa384x_docmd()
1374 ctlx->reapable = mode; hfa384x_docmd()
1375 ctlx->cmdcb = cmdcb; hfa384x_docmd()
1376 ctlx->usercb = usercb; hfa384x_docmd()
1377 ctlx->usercb_data = usercb_data; hfa384x_docmd()
1379 result = hfa384x_usbctlx_submit(hw, ctlx); hfa384x_docmd()
1381 kfree(ctlx); hfa384x_docmd()
1386 hfa384x_usbctlx_complete_sync(hw, ctlx, hfa384x_docmd()
1388 &ctlx-> hfa384x_docmd()
1444 hfa384x_usbctlx_t *ctlx; hfa384x_dorrid() local
1446 ctlx = usbctlx_alloc(); hfa384x_dorrid()
1447 if (ctlx == NULL) { hfa384x_dorrid()
1453 ctlx->outbuf.rridreq.type = cpu_to_le16(HFA384x_USB_RRIDREQ); hfa384x_dorrid()
1454 ctlx->outbuf.rridreq.frmlen = hfa384x_dorrid()
1455 cpu_to_le16(sizeof(ctlx->outbuf.rridreq.rid)); hfa384x_dorrid()
1456 ctlx->outbuf.rridreq.rid = cpu_to_le16(rid); hfa384x_dorrid()
1458 ctlx->outbufsize = sizeof(ctlx->outbuf.rridreq); hfa384x_dorrid()
1460 ctlx->reapable = mode; hfa384x_dorrid()
1461 ctlx->cmdcb = cmdcb; hfa384x_dorrid()
1462 ctlx->usercb = usercb; hfa384x_dorrid()
1463 ctlx->usercb_data = usercb_data; hfa384x_dorrid()
1466 result = hfa384x_usbctlx_submit(hw, ctlx); hfa384x_dorrid()
1468 kfree(ctlx); hfa384x_dorrid()
1473 hfa384x_usbctlx_complete_sync(hw, ctlx, hfa384x_dorrid()
1476 &ctlx->inbuf.rridresp, hfa384x_dorrid()
1525 hfa384x_usbctlx_t *ctlx; hfa384x_dowrid() local
1527 ctlx = usbctlx_alloc(); hfa384x_dowrid()
1528 if (ctlx == NULL) { hfa384x_dowrid()
1534 ctlx->outbuf.wridreq.type = cpu_to_le16(HFA384x_USB_WRIDREQ); hfa384x_dowrid()
1535 ctlx->outbuf.wridreq.frmlen = cpu_to_le16((sizeof hfa384x_dowrid()
1536 (ctlx->outbuf.wridreq.rid) + hfa384x_dowrid()
1538 ctlx->outbuf.wridreq.rid = cpu_to_le16(rid); hfa384x_dowrid()
1539 memcpy(ctlx->outbuf.wridreq.data, riddata, riddatalen); hfa384x_dowrid()
1541 ctlx->outbufsize = sizeof(ctlx->outbuf.wridreq.type) + hfa384x_dowrid()
1542 sizeof(ctlx->outbuf.wridreq.frmlen) + hfa384x_dowrid()
1543 sizeof(ctlx->outbuf.wridreq.rid) + riddatalen; hfa384x_dowrid()
1545 ctlx->reapable = mode; hfa384x_dowrid()
1546 ctlx->cmdcb = cmdcb; hfa384x_dowrid()
1547 ctlx->usercb = usercb; hfa384x_dowrid()
1548 ctlx->usercb_data = usercb_data; hfa384x_dowrid()
1551 result = hfa384x_usbctlx_submit(hw, ctlx); hfa384x_dowrid()
1553 kfree(ctlx); hfa384x_dowrid()
1559 ctlx, hfa384x_dowrid()
1562 &ctlx->inbuf.wridresp, hfa384x_dowrid()
1613 hfa384x_usbctlx_t *ctlx; hfa384x_dormem() local
1615 ctlx = usbctlx_alloc(); hfa384x_dormem()
1616 if (ctlx == NULL) { hfa384x_dormem()
1622 ctlx->outbuf.rmemreq.type = cpu_to_le16(HFA384x_USB_RMEMREQ); hfa384x_dormem()
1623 ctlx->outbuf.rmemreq.frmlen = hfa384x_dormem()
1624 cpu_to_le16(sizeof(ctlx->outbuf.rmemreq.offset) + hfa384x_dormem()
1625 sizeof(ctlx->outbuf.rmemreq.page) + len); hfa384x_dormem()
1626 ctlx->outbuf.rmemreq.offset = cpu_to_le16(offset); hfa384x_dormem()
1627 ctlx->outbuf.rmemreq.page = cpu_to_le16(page); hfa384x_dormem()
1629 ctlx->outbufsize = sizeof(ctlx->outbuf.rmemreq); hfa384x_dormem()
1632 ctlx->outbuf.rmemreq.type, hfa384x_dormem()
1633 ctlx->outbuf.rmemreq.frmlen, hfa384x_dormem()
1634 ctlx->outbuf.rmemreq.offset, ctlx->outbuf.rmemreq.page); hfa384x_dormem()
1636 pr_debug("pktsize=%zd\n", ROUNDUP64(sizeof(ctlx->outbuf.rmemreq))); hfa384x_dormem()
1638 ctlx->reapable = mode; hfa384x_dormem()
1639 ctlx->cmdcb = cmdcb; hfa384x_dormem()
1640 ctlx->usercb = usercb; hfa384x_dormem()
1641 ctlx->usercb_data = usercb_data; hfa384x_dormem()
1643 result = hfa384x_usbctlx_submit(hw, ctlx); hfa384x_dormem()
1645 kfree(ctlx); hfa384x_dormem()
1650 hfa384x_usbctlx_complete_sync(hw, ctlx, hfa384x_dormem()
1653 &ctlx->inbuf.rmemresp, data, hfa384x_dormem()
1704 hfa384x_usbctlx_t *ctlx; hfa384x_dowmem() local
1708 ctlx = usbctlx_alloc(); hfa384x_dowmem()
1709 if (ctlx == NULL) { hfa384x_dowmem()
1715 ctlx->outbuf.wmemreq.type = cpu_to_le16(HFA384x_USB_WMEMREQ); hfa384x_dowmem()
1716 ctlx->outbuf.wmemreq.frmlen = hfa384x_dowmem()
1717 cpu_to_le16(sizeof(ctlx->outbuf.wmemreq.offset) + hfa384x_dowmem()
1718 sizeof(ctlx->outbuf.wmemreq.page) + len); hfa384x_dowmem()
1719 ctlx->outbuf.wmemreq.offset = cpu_to_le16(offset); hfa384x_dowmem()
1720 ctlx->outbuf.wmemreq.page = cpu_to_le16(page); hfa384x_dowmem()
1721 memcpy(ctlx->outbuf.wmemreq.data, data, len); hfa384x_dowmem()
1723 ctlx->outbufsize = sizeof(ctlx->outbuf.wmemreq.type) + hfa384x_dowmem()
1724 sizeof(ctlx->outbuf.wmemreq.frmlen) + hfa384x_dowmem()
1725 sizeof(ctlx->outbuf.wmemreq.offset) + hfa384x_dowmem()
1726 sizeof(ctlx->outbuf.wmemreq.page) + len; hfa384x_dowmem()
1728 ctlx->reapable = mode; hfa384x_dowmem()
1729 ctlx->cmdcb = cmdcb; hfa384x_dowmem()
1730 ctlx->usercb = usercb; hfa384x_dowmem()
1731 ctlx->usercb_data = usercb_data; hfa384x_dowmem()
1733 result = hfa384x_usbctlx_submit(hw, ctlx); hfa384x_dowmem()
1735 kfree(ctlx); hfa384x_dowmem()
1741 ctlx, hfa384x_dowmem()
1744 &ctlx->inbuf.wmemresp, hfa384x_dowmem()
2353 /* Do blocking ctlx */ hfa384x_drvr_ramdl_write()
2826 hfa384x_usbctlx_t *ctlx; hfa384x_usbctlx_reaper_task() local
2828 ctlx = list_entry(entry, hfa384x_usbctlx_t, list); hfa384x_usbctlx_reaper_task()
2829 list_del(&ctlx->list); hfa384x_usbctlx_reaper_task()
2830 kfree(ctlx); hfa384x_usbctlx_reaper_task()
2865 hfa384x_usbctlx_t *ctlx; hfa384x_usbctlx_completion_task() local
2867 ctlx = list_entry(entry, hfa384x_usbctlx_t, list); hfa384x_usbctlx_completion_task()
2872 if (ctlx->cmdcb != NULL) { hfa384x_usbctlx_completion_task()
2874 ctlx->cmdcb(hw, ctlx); hfa384x_usbctlx_completion_task()
2880 ctlx->cmdcb = NULL; hfa384x_usbctlx_completion_task()
2896 if (ctlx->reapable) { hfa384x_usbctlx_completion_task()
2902 list_move_tail(&ctlx->list, &hw->ctlxq.reapable); hfa384x_usbctlx_completion_task()
2906 complete(&ctlx->done); hfa384x_usbctlx_completion_task()
2922 * ctlx ptr to a CTLX structure
2932 hfa384x_usbctlx_t *ctlx) unlocked_usbctlx_cancel_async()
2951 ctlx->state = CTLX_REQ_FAILED; unlocked_usbctlx_cancel_async()
2952 unlocked_usbctlx_complete(hw, ctlx); unlocked_usbctlx_cancel_async()
2971 * ctlx ptr to a ctlx structure
2981 static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) unlocked_usbctlx_complete() argument
2983 /* Timers have been stopped, and ctlx should be in unlocked_usbctlx_complete()
2987 list_move_tail(&ctlx->list, &hw->ctlxq.completing); unlocked_usbctlx_complete()
2990 switch (ctlx->state) { unlocked_usbctlx_complete()
2998 le16_to_cpu(ctlx->outbuf.type), unlocked_usbctlx_complete()
2999 ctlxstr(ctlx->state)); unlocked_usbctlx_complete()
3303 hfa384x_usbctlx_t *ctlx; hfa384x_usbin_ctlx() local
3332 ctlx = get_active_ctlx(hw); hfa384x_usbin_ctlx()
3340 if (unlocked_usbctlx_cancel_async(hw, ctlx) == 0) hfa384x_usbin_ctlx()
3348 if (ctlx->outbuf.type != intype) { hfa384x_usbin_ctlx()
3351 le16_to_cpu(ctlx->outbuf.type), hfa384x_usbin_ctlx()
3357 memcpy(&ctlx->inbuf, usbin, sizeof(ctlx->inbuf)); hfa384x_usbin_ctlx()
3359 switch (ctlx->state) { hfa384x_usbin_ctlx()
3367 ctlx->state = CTLX_RESP_COMPLETE; hfa384x_usbin_ctlx()
3376 ctlx->state = CTLX_COMPLETE; hfa384x_usbin_ctlx()
3377 unlocked_usbctlx_complete(hw, ctlx); hfa384x_usbin_ctlx()
3387 le16_to_cpu(ctlx->outbuf.type), hfa384x_usbin_ctlx()
3388 ctlxstr(ctlx->state)); hfa384x_usbin_ctlx()
3389 if (unlocked_usbctlx_cancel_async(hw, ctlx) == 0) hfa384x_usbin_ctlx()
3756 hfa384x_usbctlx_t *ctlx; hfa384x_ctlxout_callback() local
3799 ctlx = get_active_ctlx(hw); hfa384x_ctlxout_callback()
3803 switch (ctlx->state) { hfa384x_ctlxout_callback()
3806 ctlx->state = CTLX_REQ_COMPLETE; hfa384x_ctlxout_callback()
3813 ctlx->state = CTLX_COMPLETE; hfa384x_ctlxout_callback()
3814 unlocked_usbctlx_complete(hw, ctlx); hfa384x_ctlxout_callback()
3822 le16_to_cpu(ctlx->outbuf.type), hfa384x_ctlxout_callback()
3823 ctlxstr(ctlx->state), urb->status); hfa384x_ctlxout_callback()
3839 ctlx->state = CTLX_REQ_FAILED; hfa384x_ctlxout_callback()
3840 unlocked_usbctlx_complete(hw, ctlx); hfa384x_ctlxout_callback()
3900 hfa384x_usbctlx_t *ctlx = get_active_ctlx(hw); hfa384x_usbctlx_reqtimerfn() local
3902 ctlx->state = CTLX_REQ_FAILED; hfa384x_usbctlx_reqtimerfn()
3952 hfa384x_usbctlx_t *ctlx = get_active_ctlx(hw); hfa384x_usbctlx_resptimerfn() local
3954 if (unlocked_usbctlx_cancel_async(hw, ctlx) == 0) { hfa384x_usbctlx_resptimerfn()
4010 * ctlx ctlx structure to enqueue
4021 static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) hfa384x_usbctlx_submit() argument
4032 ctlx->state = CTLX_PENDING; hfa384x_usbctlx_submit()
4033 list_add_tail(&ctlx->list, &hw->ctlxq.pending); hfa384x_usbctlx_submit()
1232 hfa384x_usbctlx_complete_sync(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx, struct usbctlx_completor *completor) hfa384x_usbctlx_complete_sync() argument
2931 unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) unlocked_usbctlx_cancel_async() argument
H A Dprism2usb.c188 hfa384x_usbctlx_t *ctlx; prism2sta_disconnect_usb() local
190 ctlx = list_entry(entry, hfa384x_usbctlx_t, list); prism2sta_disconnect_usb()
191 complete(&ctlx->done); prism2sta_disconnect_usb()
203 hfa384x_usbctlx_t *ctlx; prism2sta_disconnect_usb() local
205 ctlx = list_entry(entry, hfa384x_usbctlx_t, list); prism2sta_disconnect_usb()
206 kfree(ctlx); prism2sta_disconnect_usb()

Completed in 179 milliseconds