Lines Matching +full:hb +full:- +full:pll +full:- +full:clock
4 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
32 #include "hif-ops.h"
33 #include "htc-ops.h"
230 skb_reserve(skb, reserved - L1_CACHE_BYTES); in ath6kl_buf_alloc()
236 vif->ssid_len = 0; in ath6kl_init_profile_info()
237 memset(vif->ssid, 0, sizeof(vif->ssid)); in ath6kl_init_profile_info()
239 vif->dot11_auth_mode = OPEN_AUTH; in ath6kl_init_profile_info()
240 vif->auth_mode = NONE_AUTH; in ath6kl_init_profile_info()
241 vif->prwise_crypto = NONE_CRYPT; in ath6kl_init_profile_info()
242 vif->prwise_crypto_len = 0; in ath6kl_init_profile_info()
243 vif->grp_crypto = NONE_CRYPT; in ath6kl_init_profile_info()
244 vif->grp_crypto_len = 0; in ath6kl_init_profile_info()
245 memset(vif->wep_key_list, 0, sizeof(vif->wep_key_list)); in ath6kl_init_profile_info()
246 memset(vif->req_bssid, 0, sizeof(vif->req_bssid)); in ath6kl_init_profile_info()
247 memset(vif->bssid, 0, sizeof(vif->bssid)); in ath6kl_init_profile_info()
248 vif->bss_ch = 0; in ath6kl_init_profile_info()
259 address = TARG_VTOP(ar->target_type, address); in ath6kl_set_host_app_area()
262 return -EIO; in ath6kl_set_host_app_area()
264 address = TARG_VTOP(ar->target_type, data); in ath6kl_set_host_app_area()
268 return -EIO; in ath6kl_set_host_app_area()
277 ar->ac2ep_map[ac] = ep; in set_ac2_ep_map()
278 ar->ep2ac_map[ep] = ac; in set_ac2_ep_map()
291 status = ath6kl_htc_conn_service(ar->htc_target, con_req, &response); in ath6kl_connectservice()
298 switch (con_req->svc_id) { in ath6kl_connectservice()
300 if (test_bit(WMI_ENABLED, &ar->flag)) in ath6kl_connectservice()
301 ath6kl_wmi_set_control_ep(ar->wmi, response.endpoint); in ath6kl_connectservice()
302 ar->ctrl_ep = response.endpoint; in ath6kl_connectservice()
317 ath6kl_err("service id is not mapped %d\n", con_req->svc_id); in ath6kl_connectservice()
318 return -EINVAL; in ath6kl_connectservice()
348 return -EIO; in ath6kl_init_service_ep()
354 * receive A-MSDU frames of 4K, we will only send ethernet-sized in ath6kl_init_service_ep()
361 * frames, use the recv-alloc threshold mechanism for larger in ath6kl_init_service_ep()
378 return -EIO; in ath6kl_init_service_ep()
380 /* connect to back-ground map this to WMI LOW_PRI */ in ath6kl_init_service_ep()
383 return -EIO; in ath6kl_init_service_ep()
388 return -EIO; in ath6kl_init_service_ep()
399 return -EIO; in ath6kl_init_service_ep()
407 vif->def_txkey_index = 0; in ath6kl_init_control_info()
408 memset(vif->wep_key_list, 0, sizeof(vif->wep_key_list)); in ath6kl_init_control_info()
409 vif->ch_hint = 0; in ath6kl_init_control_info()
422 blk_size = ar->mbox_info.block_size; in ath6kl_set_htc_params()
461 ret = ath6kl_wmi_set_rx_frame_format_cmd(ar->wmi, idx, in ath6kl_target_config_wlan_params()
462 ar->rx_meta_ver, 0, 0); in ath6kl_target_config_wlan_params()
468 if (ar->conf_flags & ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN) { in ath6kl_target_config_wlan_params()
469 ret = ath6kl_wmi_pmparams_cmd(ar->wmi, idx, 0, 1, 0, 0, 1, in ath6kl_target_config_wlan_params()
478 if (!(ar->conf_flags & ATH6KL_CONF_IGNORE_ERP_BARKER)) { in ath6kl_target_config_wlan_params()
479 ret = ath6kl_wmi_set_lpreamble_cmd(ar->wmi, idx, 0, in ath6kl_target_config_wlan_params()
488 ret = ath6kl_wmi_set_keepalive_cmd(ar->wmi, idx, in ath6kl_target_config_wlan_params()
495 ret = ath6kl_wmi_disctimeout_cmd(ar->wmi, idx, in ath6kl_target_config_wlan_params()
502 if (!(ar->conf_flags & ATH6KL_CONF_ENABLE_TX_BURST)) { in ath6kl_target_config_wlan_params()
503 ret = ath6kl_wmi_set_wmm_txop(ar->wmi, idx, WMI_TXOP_DISABLED); in ath6kl_target_config_wlan_params()
510 if (ar->p2p && (ar->vif_max == 1 || idx)) { in ath6kl_target_config_wlan_params()
511 ret = ath6kl_wmi_info_req_cmd(ar->wmi, idx, in ath6kl_target_config_wlan_params()
517 "failed to request P2P capabilities (%d) - assuming P2P not supported\n", in ath6kl_target_config_wlan_params()
519 ar->p2p = false; in ath6kl_target_config_wlan_params()
523 if (ar->p2p && (ar->vif_max == 1 || idx)) { in ath6kl_target_config_wlan_params()
525 ret = ath6kl_wmi_probe_report_req_cmd(ar->wmi, idx, true); in ath6kl_target_config_wlan_params()
542 param = !!(ar->conf_flags & ATH6KL_CONF_UART_DEBUG); in ath6kl_configure_target()
545 return -EIO; in ath6kl_configure_target()
552 * remains normal mode (0 - AP, STA and IBSS). But in ath6kl_configure_target()
558 for (i = 0; i < ar->vif_max; i++) in ath6kl_configure_target()
564 * vif[0] - AP/STA/IBSS in ath6kl_configure_target()
565 * vif[1] - "P2P dev"/"P2P GO"/"P2P Client" in ath6kl_configure_target()
566 * vif[2] - "P2P dev"/"P2P GO"/"P2P Client" in ath6kl_configure_target()
571 ar->fw_capabilities)) { in ath6kl_configure_target()
572 for (i = 0; i < ar->vif_max; i++) in ath6kl_configure_target()
576 for (i = 0; i < ar->max_norm_iface; i++) in ath6kl_configure_target()
580 for (i = ar->max_norm_iface; i < ar->vif_max; i++) in ath6kl_configure_target()
584 if (ar->p2p && ar->vif_max == 1) in ath6kl_configure_target()
591 return -EIO; in ath6kl_configure_target()
599 return -EIO; in ath6kl_configure_target()
602 param |= (ar->vif_max << HI_OPTION_NUM_DEV_SHIFT); in ath6kl_configure_target()
611 return -EIO; in ath6kl_configure_target()
618 * Ideally this should be pre-allocate by the OS at boot time in ath6kl_configure_target()
625 if ((ar->target_type == TARGET_TYPE_AR6003) || in ath6kl_configure_target()
626 (ar->version.target_ver == AR6004_HW_1_3_VERSION) || in ath6kl_configure_target()
627 (ar->version.target_ver == AR6004_HW_3_0_VERSION)) { in ath6kl_configure_target()
628 param = ar->hw.board_ext_data_addr; in ath6kl_configure_target()
629 ram_reserved_size = ar->hw.reserved_ram_size; in ath6kl_configure_target()
633 return -EIO; in ath6kl_configure_target()
639 return -EIO; in ath6kl_configure_target()
646 return -EIO; in ath6kl_configure_target()
650 ar->hw.uarttx_pin); in ath6kl_configure_target()
655 if (ar->conf_flags & ATH6KL_CONF_UART_DEBUG) { in ath6kl_configure_target()
657 ar->hw.uarttx_rate); in ath6kl_configure_target()
663 if (ar->hw.refclk_hz != 0) { in ath6kl_configure_target()
665 ar->hw.refclk_hz); in ath6kl_configure_target()
680 ret = request_firmware(&fw_entry, filename, ar->dev); in ath6kl_get_fw()
684 *fw_len = fw_entry->size; in ath6kl_get_fw()
685 *fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL); in ath6kl_get_fw()
688 ret = -ENOMEM; in ath6kl_get_fw()
697 * Check the device tree for a board-id and use it to construct
699 * fallback to the "bdata.bin" file--typically a symlink to the
700 * appropriate board-specific file.
704 static const char *board_id_prop = "atheros,board-id"; in check_device_tree()
718 "%s/bdata.%s.bin", ar->hw.fw.dir, board_id); in check_device_tree()
720 ret = ath6kl_get_fw(ar, board_filename, &ar->fw_board, in check_device_tree()
721 &ar->fw_board_len); in check_device_tree()
744 if (ar->fw_board != NULL) in ath6kl_fetch_board_file()
747 if (WARN_ON(ar->hw.fw_board == NULL)) in ath6kl_fetch_board_file()
748 return -EINVAL; in ath6kl_fetch_board_file()
750 filename = ar->hw.fw_board; in ath6kl_fetch_board_file()
752 ret = ath6kl_get_fw(ar, filename, &ar->fw_board, in ath6kl_fetch_board_file()
753 &ar->fw_board_len); in ath6kl_fetch_board_file()
768 filename = ar->hw.fw_default_board; in ath6kl_fetch_board_file()
770 ret = ath6kl_get_fw(ar, filename, &ar->fw_board, in ath6kl_fetch_board_file()
771 &ar->fw_board_len); in ath6kl_fetch_board_file()
789 if (ar->fw_otp != NULL) in ath6kl_fetch_otp_file()
792 if (ar->hw.fw.otp == NULL) { in ath6kl_fetch_otp_file()
799 ar->hw.fw.dir, ar->hw.fw.otp); in ath6kl_fetch_otp_file()
801 ret = ath6kl_get_fw(ar, filename, &ar->fw_otp, in ath6kl_fetch_otp_file()
802 &ar->fw_otp_len); in ath6kl_fetch_otp_file()
817 if (ar->testmode == 0) in ath6kl_fetch_testmode_file()
820 ath6kl_dbg(ATH6KL_DBG_BOOT, "testmode %d\n", ar->testmode); in ath6kl_fetch_testmode_file()
822 if (ar->testmode == 2) { in ath6kl_fetch_testmode_file()
823 if (ar->hw.fw.utf == NULL) { in ath6kl_fetch_testmode_file()
825 return -EOPNOTSUPP; in ath6kl_fetch_testmode_file()
829 ar->hw.fw.dir, ar->hw.fw.utf); in ath6kl_fetch_testmode_file()
831 if (ar->hw.fw.tcmd == NULL) { in ath6kl_fetch_testmode_file()
833 return -EOPNOTSUPP; in ath6kl_fetch_testmode_file()
837 ar->hw.fw.dir, ar->hw.fw.tcmd); in ath6kl_fetch_testmode_file()
840 set_bit(TESTMODE, &ar->flag); in ath6kl_fetch_testmode_file()
842 ret = ath6kl_get_fw(ar, filename, &ar->fw, &ar->fw_len); in ath6kl_fetch_testmode_file()
845 ar->testmode, filename, ret); in ath6kl_fetch_testmode_file()
857 if (ar->fw != NULL) in ath6kl_fetch_fw_file()
861 if (WARN_ON(ar->hw.fw.fw == NULL)) in ath6kl_fetch_fw_file()
862 return -EINVAL; in ath6kl_fetch_fw_file()
865 ar->hw.fw.dir, ar->hw.fw.fw); in ath6kl_fetch_fw_file()
867 ret = ath6kl_get_fw(ar, filename, &ar->fw, &ar->fw_len); in ath6kl_fetch_fw_file()
882 if (ar->fw_patch != NULL) in ath6kl_fetch_patch_file()
885 if (ar->hw.fw.patch == NULL) in ath6kl_fetch_patch_file()
889 ar->hw.fw.dir, ar->hw.fw.patch); in ath6kl_fetch_patch_file()
891 ret = ath6kl_get_fw(ar, filename, &ar->fw_patch, in ath6kl_fetch_patch_file()
892 &ar->fw_patch_len); in ath6kl_fetch_patch_file()
907 if (ar->testmode != 2) in ath6kl_fetch_testscript_file()
910 if (ar->fw_testscript != NULL) in ath6kl_fetch_testscript_file()
913 if (ar->hw.fw.testscript == NULL) in ath6kl_fetch_testscript_file()
917 ar->hw.fw.dir, ar->hw.fw.testscript); in ath6kl_fetch_testscript_file()
919 ret = ath6kl_get_fw(ar, filename, &ar->fw_testscript, in ath6kl_fetch_testscript_file()
920 &ar->fw_testscript_len); in ath6kl_fetch_testscript_file()
963 snprintf(filename, sizeof(filename), "%s/%s", ar->hw.fw.dir, name); in ath6kl_fetch_fw_apin()
965 ret = request_firmware(&fw, filename, ar->dev); in ath6kl_fetch_fw_apin()
971 data = fw->data; in ath6kl_fetch_fw_apin()
972 len = fw->size; in ath6kl_fetch_fw_apin()
980 ret = -EINVAL; in ath6kl_fetch_fw_apin()
987 ret = -EINVAL; in ath6kl_fetch_fw_apin()
991 len -= magic_len; in ath6kl_fetch_fw_apin()
999 ie_id = le32_to_cpup(&hdr->id); in ath6kl_fetch_fw_apin()
1000 ie_len = le32_to_cpup(&hdr->len); in ath6kl_fetch_fw_apin()
1002 len -= sizeof(*hdr); in ath6kl_fetch_fw_apin()
1005 ath6kl_dbg(ATH6KL_DBG_BOOT, "ie-id: %d len: %zd (0x%zx)\n", in ath6kl_fetch_fw_apin()
1009 ath6kl_err("IE len is invalid, len: %zd ie_len: %zd ie-id: %d\n", in ath6kl_fetch_fw_apin()
1011 ret = -EINVAL; in ath6kl_fetch_fw_apin()
1017 strscpy(ar->wiphy->fw_version, data, in ath6kl_fetch_fw_apin()
1018 min(sizeof(ar->wiphy->fw_version), ie_len+1)); in ath6kl_fetch_fw_apin()
1022 ar->wiphy->fw_version); in ath6kl_fetch_fw_apin()
1028 ar->fw_otp = kmemdup(data, ie_len, GFP_KERNEL); in ath6kl_fetch_fw_apin()
1030 if (ar->fw_otp == NULL) { in ath6kl_fetch_fw_apin()
1032 ret = -ENOMEM; in ath6kl_fetch_fw_apin()
1036 ar->fw_otp_len = ie_len; in ath6kl_fetch_fw_apin()
1043 if (ar->fw != NULL) in ath6kl_fetch_fw_apin()
1046 ar->fw = vmalloc(ie_len); in ath6kl_fetch_fw_apin()
1048 if (ar->fw == NULL) { in ath6kl_fetch_fw_apin()
1050 ret = -ENOMEM; in ath6kl_fetch_fw_apin()
1054 memcpy(ar->fw, data, ie_len); in ath6kl_fetch_fw_apin()
1055 ar->fw_len = ie_len; in ath6kl_fetch_fw_apin()
1061 ar->fw_patch = kmemdup(data, ie_len, GFP_KERNEL); in ath6kl_fetch_fw_apin()
1063 if (ar->fw_patch == NULL) { in ath6kl_fetch_fw_apin()
1065 ret = -ENOMEM; in ath6kl_fetch_fw_apin()
1069 ar->fw_patch_len = ie_len; in ath6kl_fetch_fw_apin()
1073 ar->hw.reserved_ram_size = le32_to_cpup(val); in ath6kl_fetch_fw_apin()
1077 ar->hw.reserved_ram_size); in ath6kl_fetch_fw_apin()
1092 __set_bit(i, ar->fw_capabilities); in ath6kl_fetch_fw_apin()
1096 ar->fw_capabilities, in ath6kl_fetch_fw_apin()
1097 sizeof(ar->fw_capabilities)); in ath6kl_fetch_fw_apin()
1104 ar->hw.dataset_patch_addr = le32_to_cpup(val); in ath6kl_fetch_fw_apin()
1108 ar->hw.dataset_patch_addr); in ath6kl_fetch_fw_apin()
1115 ar->hw.board_addr = le32_to_cpup(val); in ath6kl_fetch_fw_apin()
1119 ar->hw.board_addr); in ath6kl_fetch_fw_apin()
1126 ar->vif_max = min_t(unsigned int, le32_to_cpup(val), in ath6kl_fetch_fw_apin()
1129 if (ar->vif_max > 1 && !ar->p2p) in ath6kl_fetch_fw_apin()
1130 ar->max_norm_iface = 2; in ath6kl_fetch_fw_apin()
1133 "found vif max ie %d\n", ar->vif_max); in ath6kl_fetch_fw_apin()
1137 le32_to_cpup(&hdr->id)); in ath6kl_fetch_fw_apin()
1141 len -= ie_len; in ath6kl_fetch_fw_apin()
1166 ar->fw_api = 5; in ath6kl_init_fetch_firmwares()
1172 ar->fw_api = 4; in ath6kl_init_fetch_firmwares()
1178 ar->fw_api = 3; in ath6kl_init_fetch_firmwares()
1184 ar->fw_api = 2; in ath6kl_init_fetch_firmwares()
1192 ar->fw_api = 1; in ath6kl_init_fetch_firmwares()
1195 ath6kl_dbg(ATH6KL_DBG_BOOT, "using fw api %d\n", ar->fw_api); in ath6kl_init_fetch_firmwares()
1206 if (WARN_ON(ar->fw_board == NULL)) in ath6kl_upload_board_file()
1207 return -ENOENT; in ath6kl_upload_board_file()
1214 if (ar->hw.board_addr != 0) { in ath6kl_upload_board_file()
1215 board_address = ar->hw.board_addr; in ath6kl_upload_board_file()
1233 if (ar->target_type == TARGET_TYPE_AR6003 && in ath6kl_upload_board_file()
1236 return -EINVAL; in ath6kl_upload_board_file()
1239 switch (ar->target_type) { in ath6kl_upload_board_file()
1243 if (ar->fw_board_len > (board_data_size + board_ext_data_size)) in ath6kl_upload_board_file()
1252 return -EINVAL; in ath6kl_upload_board_file()
1256 ar->fw_board_len == (board_data_size + board_ext_data_size)) { in ath6kl_upload_board_file()
1263 ar->fw_board + board_data_size, in ath6kl_upload_board_file()
1277 if (ar->fw_board_len < board_data_size) { in ath6kl_upload_board_file()
1278 ath6kl_err("Too small board file: %zu\n", ar->fw_board_len); in ath6kl_upload_board_file()
1279 ret = -EINVAL; in ath6kl_upload_board_file()
1286 ret = ath6kl_bmi_write(ar, board_address, ar->fw_board, in ath6kl_upload_board_file()
1295 if ((ar->version.target_ver == AR6004_HW_1_3_VERSION) || in ath6kl_upload_board_file()
1296 (ar->version.target_ver == AR6004_HW_3_0_VERSION)) in ath6kl_upload_board_file()
1312 if (ar->fw_otp == NULL) in ath6kl_upload_otp()
1315 address = ar->hw.app_load_addr; in ath6kl_upload_otp()
1318 ar->fw_otp_len); in ath6kl_upload_otp()
1320 ret = ath6kl_bmi_fast_download(ar, address, ar->fw_otp, in ath6kl_upload_otp()
1321 ar->fw_otp_len); in ath6kl_upload_otp()
1335 if (ar->hw.app_start_override_addr == 0) { in ath6kl_upload_otp()
1336 ar->hw.app_start_override_addr = address; in ath6kl_upload_otp()
1342 ar->hw.app_start_override_addr); in ath6kl_upload_otp()
1346 ar->hw.app_start_override_addr); in ath6kl_upload_otp()
1348 ath6kl_bmi_execute(ar, ar->hw.app_start_override_addr, ¶m); in ath6kl_upload_otp()
1358 if (WARN_ON(ar->fw == NULL)) in ath6kl_upload_firmware()
1361 address = ar->hw.app_load_addr; in ath6kl_upload_firmware()
1364 address, ar->fw_len); in ath6kl_upload_firmware()
1366 ret = ath6kl_bmi_fast_download(ar, address, ar->fw, ar->fw_len); in ath6kl_upload_firmware()
1377 if (ar->target_type != TARGET_TYPE_AR6004) { in ath6kl_upload_firmware()
1378 address = ar->hw.app_start_override_addr; in ath6kl_upload_firmware()
1389 if (ar->fw_patch == NULL) in ath6kl_upload_patch()
1392 address = ar->hw.dataset_patch_addr; in ath6kl_upload_patch()
1395 address, ar->fw_patch_len); in ath6kl_upload_patch()
1397 ret = ath6kl_bmi_write(ar, address, ar->fw_patch, ar->fw_patch_len); in ath6kl_upload_patch()
1413 if (ar->testmode != 2) in ath6kl_upload_testscript()
1416 if (ar->fw_testscript == NULL) in ath6kl_upload_testscript()
1419 address = ar->hw.testscript_addr; in ath6kl_upload_testscript()
1422 address, ar->fw_testscript_len); in ath6kl_upload_testscript()
1424 ret = ath6kl_bmi_write(ar, address, ar->fw_testscript, in ath6kl_upload_testscript()
1425 ar->fw_testscript_len); in ath6kl_upload_testscript()
1433 if ((ar->version.target_ver != AR6004_HW_1_3_VERSION) && in ath6kl_upload_testscript()
1434 (ar->version.target_ver != AR6004_HW_3_0_VERSION)) in ath6kl_upload_testscript()
1447 if (ar->target_type != TARGET_TYPE_AR6003 && in ath6kl_init_upload()
1448 ar->target_type != TARGET_TYPE_AR6004) in ath6kl_init_upload()
1449 return -EINVAL; in ath6kl_init_upload()
1479 /* program analog PLL register */ in ath6kl_init_upload()
1480 /* no need to control 40/44MHz clock on AR6004 */ in ath6kl_init_upload()
1481 if (ar->target_type != TARGET_TYPE_AR6004) { in ath6kl_init_upload()
1505 if (ar->hw.flags & ATH6KL_HW_SDIO_CRC_ERROR_WAR) { in ath6kl_init_upload()
1584 if (hw->id == ar->version.target_ver) in ath6kl_init_hw_params()
1590 ar->version.target_ver); in ath6kl_init_hw_params()
1591 return -EINVAL; in ath6kl_init_hw_params()
1594 ar->hw = *hw; in ath6kl_init_hw_params()
1598 ar->version.target_ver, ar->target_type, in ath6kl_init_hw_params()
1599 ar->hw.dataset_patch_addr, ar->hw.app_load_addr); in ath6kl_init_hw_params()
1602 ar->hw.app_start_override_addr, ar->hw.board_ext_data_addr, in ath6kl_init_hw_params()
1603 ar->hw.reserved_ram_size); in ath6kl_init_hw_params()
1606 ar->hw.refclk_hz, ar->hw.uarttx_pin); in ath6kl_init_hw_params()
1628 { ATH6KL_FW_CAPABILITY_HOST_P2P, "host-p2p" },
1629 { ATH6KL_FW_CAPABILITY_SCHED_SCAN, "sched-scan" },
1630 { ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX, "sta-p2pdev-duplex" },
1631 { ATH6KL_FW_CAPABILITY_INACTIVITY_TIMEOUT, "inactivity-timeout" },
1632 { ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE, "rsn-cap-override" },
1633 { ATH6KL_FW_CAPABILITY_WOW_MULTICAST_FILTER, "wow-mc-filter" },
1634 { ATH6KL_FW_CAPABILITY_BMISS_ENHANCE, "bmiss-enhance" },
1635 { ATH6KL_FW_CAPABILITY_SCHED_SCAN_MATCH_LIST, "sscan-match-list" },
1636 { ATH6KL_FW_CAPABILITY_RSSI_SCAN_THOLD, "rssi-scan-thold" },
1637 { ATH6KL_FW_CAPABILITY_CUSTOM_MAC_ADDR, "custom-mac-addr" },
1638 { ATH6KL_FW_CAPABILITY_TX_ERR_NOTIFY, "tx-err-notify" },
1640 { ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2, "sched-scan-v2" },
1641 { ATH6KL_FW_CAPABILITY_HEART_BEAT_POLL, "hb-poll" },
1642 { ATH6KL_FW_CAPABILITY_64BIT_RATES, "64bit-rates" },
1643 { ATH6KL_FW_CAPABILITY_AP_INACTIVITY_MINS, "ap-inactivity-mins" },
1644 { ATH6KL_FW_CAPABILITY_MAP_LP_ENDPOINT, "map-lp-endpoint" },
1645 { ATH6KL_FW_CAPABILITY_RATETABLE_MCS15, "ratetable-mcs15" },
1646 { ATH6KL_FW_CAPABILITY_NO_IP_CHECKSUM, "no-ip-checksum" },
1663 u8 *data = (u8 *) ar->fw_capabilities; in ath6kl_init_get_fwcaps()
1672 if (index >= sizeof(ar->fw_capabilities) * 4) in ath6kl_init_get_fwcaps()
1675 if (buf_len - len < 4) { in ath6kl_init_get_fwcaps()
1680 memcpy(buf + buf_len - trunc_len, trunc, trunc_len); in ath6kl_init_get_fwcaps()
1686 len += scnprintf(buf + len, buf_len - len, "%s,", in ath6kl_init_get_fwcaps()
1693 len--; in ath6kl_init_get_fwcaps()
1736 ret = ath6kl_htc_wait_target(ar->htc_target); in __ath6kl_init_hw_start()
1738 if (ret == -ETIMEDOUT) { in __ath6kl_init_hw_start()
1760 ath6kl_htc_credit_setup(ar->htc_target, &ar->credit_state_info); in __ath6kl_init_hw_start()
1763 ret = ath6kl_htc_start(ar->htc_target); in __ath6kl_init_hw_start()
1771 timeleft = wait_event_interruptible_timeout(ar->event_wq, in __ath6kl_init_hw_start()
1773 &ar->flag), in __ath6kl_init_hw_start()
1776 clear_bit(WMI_READY, &ar->flag); in __ath6kl_init_hw_start()
1779 ret = -EIO; in __ath6kl_init_hw_start()
1785 if (test_and_clear_bit(FIRST_BOOT, &ar->flag)) { in __ath6kl_init_hw_start()
1787 ar->hw.name, in __ath6kl_init_hw_start()
1788 ath6kl_init_get_hif_name(ar->hif_type), in __ath6kl_init_hw_start()
1789 ar->wiphy->fw_version, in __ath6kl_init_hw_start()
1790 ar->fw_api, in __ath6kl_init_hw_start()
1791 test_bit(TESTMODE, &ar->flag) ? " testmode" : ""); in __ath6kl_init_hw_start()
1796 if (ar->version.abi_ver != ATH6KL_ABI_VERSION) { in __ath6kl_init_hw_start()
1798 ATH6KL_ABI_VERSION, ar->version.abi_ver); in __ath6kl_init_hw_start()
1799 ret = -EIO; in __ath6kl_init_hw_start()
1810 for (i = 0; i < ar->vif_max; i++) { in __ath6kl_init_hw_start()
1819 ath6kl_htc_stop(ar->htc_target); in __ath6kl_init_hw_start()
1835 ar->state = ATH6KL_STATE_ON; in ath6kl_init_hw_start()
1845 ath6kl_htc_stop(ar->htc_target); in __ath6kl_init_hw_stop()
1865 ar->state = ATH6KL_STATE_OFF; in ath6kl_init_hw_stop()
1871 clear_bit(WMI_READY, &ar->flag); in ath6kl_init_hw_restart()
1891 set_bit(DESTROY_IN_PROGRESS, &ar->flag); in ath6kl_stop_txrx()
1893 if (down_interruptible(&ar->sem)) { in ath6kl_stop_txrx()
1899 aggr_reset_state(ar->sta_list[i].aggr_conn); in ath6kl_stop_txrx()
1901 spin_lock_bh(&ar->list_lock); in ath6kl_stop_txrx()
1902 list_for_each_entry_safe(vif, tmp_vif, &ar->vif_list, list) { in ath6kl_stop_txrx()
1903 list_del(&vif->list); in ath6kl_stop_txrx()
1904 spin_unlock_bh(&ar->list_lock); in ath6kl_stop_txrx()
1905 ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag)); in ath6kl_stop_txrx()
1907 wiphy_lock(ar->wiphy); in ath6kl_stop_txrx()
1909 wiphy_unlock(ar->wiphy); in ath6kl_stop_txrx()
1911 spin_lock_bh(&ar->list_lock); in ath6kl_stop_txrx()
1913 spin_unlock_bh(&ar->list_lock); in ath6kl_stop_txrx()
1915 clear_bit(WMI_READY, &ar->flag); in ath6kl_stop_txrx()
1917 if (ar->fw_recovery.enable) in ath6kl_stop_txrx()
1918 del_timer_sync(&ar->fw_recovery.hb_timer); in ath6kl_stop_txrx()
1929 ath6kl_wmi_shutdown(ar->wmi); in ath6kl_stop_txrx()
1931 clear_bit(WMI_ENABLED, &ar->flag); in ath6kl_stop_txrx()
1932 if (ar->htc_target) { in ath6kl_stop_txrx()
1934 ath6kl_htc_stop(ar->htc_target); in ath6kl_stop_txrx()
1943 up(&ar->sem); in ath6kl_stop_txrx()