aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2012-02-28 09:50:21 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2012-03-01 01:30:19 -0500
commit5dbc811f42d030405df765a1f12047b16bb0caa3 (patch)
tree64f777531c9e67c3e4f4c8722f2ce2242afec45e /drivers/net/wireless/ath/ath6kl
parent4705b7036c2fec73856ae57b0a1f452fca705cd5 (diff)
ath6kl: Refactor ath6kl_wmi_control_rx()
Split the wmi event processing into the one which needs to be vif specific and the reset. This is a step towards avoiding the need for wiphy and a netdev registration before getting any message from firmware. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c200
1 files changed, 99 insertions, 101 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index fce29f7f2e5c..c0393b344a1f 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -3396,32 +3396,101 @@ static int ath6kl_wmi_roam_tbl_event_rx(struct wmi *wmi, u8 *datap, int len)
3396 return ath6kl_debug_roam_tbl_event(wmi->parent_dev, datap, len); 3396 return ath6kl_debug_roam_tbl_event(wmi->parent_dev, datap, len);
3397} 3397}
3398 3398
3399/* Control Path */ 3399/* Process interface specific wmi events, caller would free the datap */
3400int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb) 3400static int ath6kl_wmi_proc_events_vif(struct wmi *wmi, u16 if_idx, u16 cmd_id,
3401 u8 *datap, u32 len)
3401{ 3402{
3402 struct wmi_cmd_hdr *cmd;
3403 struct ath6kl_vif *vif; 3403 struct ath6kl_vif *vif;
3404 u32 len;
3405 u16 id;
3406 u8 if_idx;
3407 u8 *datap;
3408 int ret = 0;
3409 3404
3410 if (WARN_ON(skb == NULL)) 3405 vif = ath6kl_get_vif_by_index(wmi->parent_dev, if_idx);
3406 if (!vif) {
3407 ath6kl_dbg(ATH6KL_DBG_WMI,
3408 "Wmi event for unavailable vif, vif_index:%d\n",
3409 if_idx);
3411 return -EINVAL; 3410 return -EINVAL;
3411 }
3412 3412
3413 if (skb->len < sizeof(struct wmi_cmd_hdr)) { 3413 switch (cmd_id) {
3414 ath6kl_err("bad packet 1\n"); 3414 case WMI_CONNECT_EVENTID:
3415 dev_kfree_skb(skb); 3415 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CONNECT_EVENTID\n");
3416 return ath6kl_wmi_connect_event_rx(wmi, datap, len, vif);
3417 case WMI_DISCONNECT_EVENTID:
3418 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DISCONNECT_EVENTID\n");
3419 return ath6kl_wmi_disconnect_event_rx(wmi, datap, len, vif);
3420 case WMI_TKIP_MICERR_EVENTID:
3421 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TKIP_MICERR_EVENTID\n");
3422 return ath6kl_wmi_tkip_micerr_event_rx(wmi, datap, len, vif);
3423 case WMI_BSSINFO_EVENTID:
3424 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_BSSINFO_EVENTID\n");
3425 return ath6kl_wmi_bssinfo_event_rx(wmi, datap, len, vif);
3426 case WMI_NEIGHBOR_REPORT_EVENTID:
3427 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_NEIGHBOR_REPORT_EVENTID\n");
3428 return ath6kl_wmi_neighbor_report_event_rx(wmi, datap, len,
3429 vif);
3430 case WMI_SCAN_COMPLETE_EVENTID:
3431 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SCAN_COMPLETE_EVENTID\n");
3432 return ath6kl_wmi_scan_complete_rx(wmi, datap, len, vif);
3433 case WMI_REPORT_STATISTICS_EVENTID:
3434 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REPORT_STATISTICS_EVENTID\n");
3435 return ath6kl_wmi_stats_event_rx(wmi, datap, len, vif);
3436 case WMI_CAC_EVENTID:
3437 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CAC_EVENTID\n");
3438 return ath6kl_wmi_cac_event_rx(wmi, datap, len, vif);
3439 case WMI_PSPOLL_EVENTID:
3440 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSPOLL_EVENTID\n");
3441 return ath6kl_wmi_pspoll_event_rx(wmi, datap, len, vif);
3442 case WMI_DTIMEXPIRY_EVENTID:
3443 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DTIMEXPIRY_EVENTID\n");
3444 return ath6kl_wmi_dtimexpiry_event_rx(wmi, datap, len, vif);
3445 case WMI_ADDBA_REQ_EVENTID:
3446 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_REQ_EVENTID\n");
3447 return ath6kl_wmi_addba_req_event_rx(wmi, datap, len, vif);
3448 case WMI_DELBA_REQ_EVENTID:
3449 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DELBA_REQ_EVENTID\n");
3450 return ath6kl_wmi_delba_req_event_rx(wmi, datap, len, vif);
3451 case WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID:
3452 ath6kl_dbg(ATH6KL_DBG_WMI,
3453 "WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID");
3454 return ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx(wmi, vif);
3455 case WMI_REMAIN_ON_CHNL_EVENTID:
3456 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REMAIN_ON_CHNL_EVENTID\n");
3457 return ath6kl_wmi_remain_on_chnl_event_rx(wmi, datap, len, vif);
3458 case WMI_CANCEL_REMAIN_ON_CHNL_EVENTID:
3459 ath6kl_dbg(ATH6KL_DBG_WMI,
3460 "WMI_CANCEL_REMAIN_ON_CHNL_EVENTID\n");
3461 return ath6kl_wmi_cancel_remain_on_chnl_event_rx(wmi, datap,
3462 len, vif);
3463 case WMI_TX_STATUS_EVENTID:
3464 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TX_STATUS_EVENTID\n");
3465 return ath6kl_wmi_tx_status_event_rx(wmi, datap, len, vif);
3466 case WMI_RX_PROBE_REQ_EVENTID:
3467 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_PROBE_REQ_EVENTID\n");
3468 return ath6kl_wmi_rx_probe_req_event_rx(wmi, datap, len, vif);
3469 case WMI_RX_ACTION_EVENTID:
3470 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_ACTION_EVENTID\n");
3471 return ath6kl_wmi_rx_action_event_rx(wmi, datap, len, vif);
3472 default:
3473 ath6kl_dbg(ATH6KL_DBG_WMI, "unknown cmd id 0x%x\n", cmd_id);
3416 return -EINVAL; 3474 return -EINVAL;
3417 } 3475 }
3418 3476
3477 return 0;
3478}
3479
3480static int ath6kl_wmi_proc_events(struct wmi *wmi, struct sk_buff *skb)
3481{
3482 struct wmi_cmd_hdr *cmd;
3483 int ret = 0;
3484 u32 len;
3485 u16 id;
3486 u8 if_idx;
3487 u8 *datap;
3488
3419 cmd = (struct wmi_cmd_hdr *) skb->data; 3489 cmd = (struct wmi_cmd_hdr *) skb->data;
3420 id = le16_to_cpu(cmd->cmd_id); 3490 id = le16_to_cpu(cmd->cmd_id);
3421 if_idx = le16_to_cpu(cmd->info1) & WMI_CMD_HDR_IF_ID_MASK; 3491 if_idx = le16_to_cpu(cmd->info1) & WMI_CMD_HDR_IF_ID_MASK;
3422 3492
3423 skb_pull(skb, sizeof(struct wmi_cmd_hdr)); 3493 skb_pull(skb, sizeof(struct wmi_cmd_hdr));
3424
3425 datap = skb->data; 3494 datap = skb->data;
3426 len = skb->len; 3495 len = skb->len;
3427 3496
@@ -3429,15 +3498,6 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
3429 ath6kl_dbg_dump(ATH6KL_DBG_WMI_DUMP, NULL, "wmi rx ", 3498 ath6kl_dbg_dump(ATH6KL_DBG_WMI_DUMP, NULL, "wmi rx ",
3430 datap, len); 3499 datap, len);
3431 3500
3432 vif = ath6kl_get_vif_by_index(wmi->parent_dev, if_idx);
3433 if (!vif) {
3434 ath6kl_dbg(ATH6KL_DBG_WMI,
3435 "Wmi event for unavailable vif, vif_index:%d\n",
3436 if_idx);
3437 dev_kfree_skb(skb);
3438 return -EINVAL;
3439 }
3440
3441 switch (id) { 3501 switch (id) {
3442 case WMI_GET_BITRATE_CMDID: 3502 case WMI_GET_BITRATE_CMDID:
3443 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_GET_BITRATE_CMDID\n"); 3503 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_GET_BITRATE_CMDID\n");
@@ -3455,26 +3515,10 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
3455 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_READY_EVENTID\n"); 3515 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_READY_EVENTID\n");
3456 ret = ath6kl_wmi_ready_event_rx(wmi, datap, len); 3516 ret = ath6kl_wmi_ready_event_rx(wmi, datap, len);
3457 break; 3517 break;
3458 case WMI_CONNECT_EVENTID:
3459 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CONNECT_EVENTID\n");
3460 ret = ath6kl_wmi_connect_event_rx(wmi, datap, len, vif);
3461 break;
3462 case WMI_DISCONNECT_EVENTID:
3463 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DISCONNECT_EVENTID\n");
3464 ret = ath6kl_wmi_disconnect_event_rx(wmi, datap, len, vif);
3465 break;
3466 case WMI_PEER_NODE_EVENTID: 3518 case WMI_PEER_NODE_EVENTID:
3467 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PEER_NODE_EVENTID\n"); 3519 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PEER_NODE_EVENTID\n");
3468 ret = ath6kl_wmi_peer_node_event_rx(wmi, datap, len); 3520 ret = ath6kl_wmi_peer_node_event_rx(wmi, datap, len);
3469 break; 3521 break;
3470 case WMI_TKIP_MICERR_EVENTID:
3471 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TKIP_MICERR_EVENTID\n");
3472 ret = ath6kl_wmi_tkip_micerr_event_rx(wmi, datap, len, vif);
3473 break;
3474 case WMI_BSSINFO_EVENTID:
3475 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_BSSINFO_EVENTID\n");
3476 ret = ath6kl_wmi_bssinfo_event_rx(wmi, datap, len, vif);
3477 break;
3478 case WMI_REGDOMAIN_EVENTID: 3522 case WMI_REGDOMAIN_EVENTID:
3479 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REGDOMAIN_EVENTID\n"); 3523 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REGDOMAIN_EVENTID\n");
3480 ath6kl_wmi_regdomain_event(wmi, datap, len); 3524 ath6kl_wmi_regdomain_event(wmi, datap, len);
@@ -3483,23 +3527,10 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
3483 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSTREAM_TIMEOUT_EVENTID\n"); 3527 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSTREAM_TIMEOUT_EVENTID\n");
3484 ret = ath6kl_wmi_pstream_timeout_event_rx(wmi, datap, len); 3528 ret = ath6kl_wmi_pstream_timeout_event_rx(wmi, datap, len);
3485 break; 3529 break;
3486 case WMI_NEIGHBOR_REPORT_EVENTID:
3487 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_NEIGHBOR_REPORT_EVENTID\n");
3488 ret = ath6kl_wmi_neighbor_report_event_rx(wmi, datap, len,
3489 vif);
3490 break;
3491 case WMI_SCAN_COMPLETE_EVENTID:
3492 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SCAN_COMPLETE_EVENTID\n");
3493 ret = ath6kl_wmi_scan_complete_rx(wmi, datap, len, vif);
3494 break;
3495 case WMI_CMDERROR_EVENTID: 3530 case WMI_CMDERROR_EVENTID:
3496 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CMDERROR_EVENTID\n"); 3531 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CMDERROR_EVENTID\n");
3497 ret = ath6kl_wmi_error_event_rx(wmi, datap, len); 3532 ret = ath6kl_wmi_error_event_rx(wmi, datap, len);
3498 break; 3533 break;
3499 case WMI_REPORT_STATISTICS_EVENTID:
3500 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REPORT_STATISTICS_EVENTID\n");
3501 ret = ath6kl_wmi_stats_event_rx(wmi, datap, len, vif);
3502 break;
3503 case WMI_RSSI_THRESHOLD_EVENTID: 3534 case WMI_RSSI_THRESHOLD_EVENTID:
3504 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RSSI_THRESHOLD_EVENTID\n"); 3535 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RSSI_THRESHOLD_EVENTID\n");
3505 ret = ath6kl_wmi_rssi_threshold_event_rx(wmi, datap, len); 3536 ret = ath6kl_wmi_rssi_threshold_event_rx(wmi, datap, len);
@@ -3519,10 +3550,6 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
3519 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_EXTENSION_EVENTID\n"); 3550 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_EXTENSION_EVENTID\n");
3520 ret = ath6kl_wmi_control_rx_xtnd(wmi, skb); 3551 ret = ath6kl_wmi_control_rx_xtnd(wmi, skb);
3521 break; 3552 break;
3522 case WMI_CAC_EVENTID:
3523 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CAC_EVENTID\n");
3524 ret = ath6kl_wmi_cac_event_rx(wmi, datap, len, vif);
3525 break;
3526 case WMI_CHANNEL_CHANGE_EVENTID: 3553 case WMI_CHANNEL_CHANGE_EVENTID:
3527 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CHANNEL_CHANGE_EVENTID\n"); 3554 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_CHANNEL_CHANGE_EVENTID\n");
3528 break; 3555 break;
@@ -3562,28 +3589,12 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
3562 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_GET_PMKID_LIST_EVENTID\n"); 3589 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_GET_PMKID_LIST_EVENTID\n");
3563 ret = ath6kl_wmi_get_pmkid_list_event_rx(wmi, datap, len); 3590 ret = ath6kl_wmi_get_pmkid_list_event_rx(wmi, datap, len);
3564 break; 3591 break;
3565 case WMI_PSPOLL_EVENTID:
3566 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_PSPOLL_EVENTID\n");
3567 ret = ath6kl_wmi_pspoll_event_rx(wmi, datap, len, vif);
3568 break;
3569 case WMI_DTIMEXPIRY_EVENTID:
3570 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DTIMEXPIRY_EVENTID\n");
3571 ret = ath6kl_wmi_dtimexpiry_event_rx(wmi, datap, len, vif);
3572 break;
3573 case WMI_SET_PARAMS_REPLY_EVENTID: 3592 case WMI_SET_PARAMS_REPLY_EVENTID:
3574 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SET_PARAMS_REPLY_EVENTID\n"); 3593 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_SET_PARAMS_REPLY_EVENTID\n");
3575 break; 3594 break;
3576 case WMI_ADDBA_REQ_EVENTID:
3577 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_REQ_EVENTID\n");
3578 ret = ath6kl_wmi_addba_req_event_rx(wmi, datap, len, vif);
3579 break;
3580 case WMI_ADDBA_RESP_EVENTID: 3595 case WMI_ADDBA_RESP_EVENTID:
3581 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_RESP_EVENTID\n"); 3596 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_ADDBA_RESP_EVENTID\n");
3582 break; 3597 break;
3583 case WMI_DELBA_REQ_EVENTID:
3584 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_DELBA_REQ_EVENTID\n");
3585 ret = ath6kl_wmi_delba_req_event_rx(wmi, datap, len, vif);
3586 break;
3587 case WMI_REPORT_BTCOEX_CONFIG_EVENTID: 3598 case WMI_REPORT_BTCOEX_CONFIG_EVENTID:
3588 ath6kl_dbg(ATH6KL_DBG_WMI, 3599 ath6kl_dbg(ATH6KL_DBG_WMI,
3589 "WMI_REPORT_BTCOEX_CONFIG_EVENTID\n"); 3600 "WMI_REPORT_BTCOEX_CONFIG_EVENTID\n");
@@ -3596,52 +3607,39 @@ int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
3596 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TX_COMPLETE_EVENTID\n"); 3607 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TX_COMPLETE_EVENTID\n");
3597 ret = ath6kl_wmi_tx_complete_event_rx(datap, len); 3608 ret = ath6kl_wmi_tx_complete_event_rx(datap, len);
3598 break; 3609 break;
3599 case WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID:
3600 ath6kl_dbg(ATH6KL_DBG_WMI,
3601 "WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID");
3602 ret = ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx(wmi, vif);
3603 break;
3604 case WMI_REMAIN_ON_CHNL_EVENTID:
3605 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_REMAIN_ON_CHNL_EVENTID\n");
3606 ret = ath6kl_wmi_remain_on_chnl_event_rx(wmi, datap, len, vif);
3607 break;
3608 case WMI_CANCEL_REMAIN_ON_CHNL_EVENTID:
3609 ath6kl_dbg(ATH6KL_DBG_WMI,
3610 "WMI_CANCEL_REMAIN_ON_CHNL_EVENTID\n");
3611 ret = ath6kl_wmi_cancel_remain_on_chnl_event_rx(wmi, datap,
3612 len, vif);
3613 break;
3614 case WMI_TX_STATUS_EVENTID:
3615 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_TX_STATUS_EVENTID\n");
3616 ret = ath6kl_wmi_tx_status_event_rx(wmi, datap, len, vif);
3617 break;
3618 case WMI_RX_PROBE_REQ_EVENTID:
3619 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_PROBE_REQ_EVENTID\n");
3620 ret = ath6kl_wmi_rx_probe_req_event_rx(wmi, datap, len, vif);
3621 break;
3622 case WMI_P2P_CAPABILITIES_EVENTID: 3610 case WMI_P2P_CAPABILITIES_EVENTID:
3623 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_CAPABILITIES_EVENTID\n"); 3611 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_CAPABILITIES_EVENTID\n");
3624 ret = ath6kl_wmi_p2p_capabilities_event_rx(datap, len); 3612 ret = ath6kl_wmi_p2p_capabilities_event_rx(datap, len);
3625 break; 3613 break;
3626 case WMI_RX_ACTION_EVENTID:
3627 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_RX_ACTION_EVENTID\n");
3628 ret = ath6kl_wmi_rx_action_event_rx(wmi, datap, len, vif);
3629 break;
3630 case WMI_P2P_INFO_EVENTID: 3614 case WMI_P2P_INFO_EVENTID:
3631 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_INFO_EVENTID\n"); 3615 ath6kl_dbg(ATH6KL_DBG_WMI, "WMI_P2P_INFO_EVENTID\n");
3632 ret = ath6kl_wmi_p2p_info_event_rx(datap, len); 3616 ret = ath6kl_wmi_p2p_info_event_rx(datap, len);
3633 break; 3617 break;
3634 default: 3618 default:
3635 ath6kl_dbg(ATH6KL_DBG_WMI, "unknown cmd id 0x%x\n", id); 3619 /* may be the event is interface specific */
3636 ret = -EINVAL; 3620 ret = ath6kl_wmi_proc_events_vif(wmi, if_idx, id, datap, len);
3637 break; 3621 break;
3638 } 3622 }
3639 3623
3640 dev_kfree_skb(skb); 3624 dev_kfree_skb(skb);
3641
3642 return ret; 3625 return ret;
3643} 3626}
3644 3627
3628/* Control Path */
3629int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb)
3630{
3631 if (WARN_ON(skb == NULL))
3632 return -EINVAL;
3633
3634 if (skb->len < sizeof(struct wmi_cmd_hdr)) {
3635 ath6kl_err("bad packet 1\n");
3636 dev_kfree_skb(skb);
3637 return -EINVAL;
3638 }
3639
3640 return ath6kl_wmi_proc_events(wmi, skb);
3641}
3642
3645void ath6kl_wmi_reset(struct wmi *wmi) 3643void ath6kl_wmi_reset(struct wmi *wmi)
3646{ 3644{
3647 spin_lock_bh(&wmi->lock); 3645 spin_lock_bh(&wmi->lock);