• Home
  • Raw
  • Download

Lines Matching refs:ar

42 int ath6kl_core_init(struct ath6kl *ar)  in ath6kl_core_init()  argument
48 ar->ath6kl_wq = create_singlethread_workqueue("ath6kl"); in ath6kl_core_init()
49 if (!ar->ath6kl_wq) in ath6kl_core_init()
52 ret = ath6kl_bmi_init(ar); in ath6kl_core_init()
61 ret = ath6kl_hif_power_on(ar); in ath6kl_core_init()
65 ret = ath6kl_bmi_get_target_info(ar, &targ_info); in ath6kl_core_init()
69 ar->version.target_ver = le32_to_cpu(targ_info.version); in ath6kl_core_init()
70 ar->target_type = le32_to_cpu(targ_info.type); in ath6kl_core_init()
71 ar->wiphy->hw_version = le32_to_cpu(targ_info.version); in ath6kl_core_init()
73 ret = ath6kl_init_hw_params(ar); in ath6kl_core_init()
77 ar->htc_target = ath6kl_htc_create(ar); in ath6kl_core_init()
79 if (!ar->htc_target) { in ath6kl_core_init()
84 ar->testmode = testmode; in ath6kl_core_init()
86 ret = ath6kl_init_fetch_firmwares(ar); in ath6kl_core_init()
93 set_bit(WMI_ENABLED, &ar->flag); in ath6kl_core_init()
94 ar->wmi = ath6kl_wmi_init(ar); in ath6kl_core_init()
95 if (!ar->wmi) { in ath6kl_core_init()
101 ath6kl_dbg(ATH6KL_DBG_TRC, "%s: got wmi @ 0x%p.\n", __func__, ar->wmi); in ath6kl_core_init()
104 ar->ac_stream_pri_map[WMM_AC_BK] = 0; /* lowest */ in ath6kl_core_init()
105 ar->ac_stream_pri_map[WMM_AC_BE] = 1; in ath6kl_core_init()
106 ar->ac_stream_pri_map[WMM_AC_VI] = 2; in ath6kl_core_init()
107 ar->ac_stream_pri_map[WMM_AC_VO] = 3; /* highest */ in ath6kl_core_init()
110 ath6kl_refill_amsdu_rxbufs(ar, ATH6KL_MAX_AMSDU_RX_BUFFERS); in ath6kl_core_init()
112 ath6kl_cookie_init(ar); in ath6kl_core_init()
114 ar->conf_flags = ATH6KL_CONF_IGNORE_ERP_BARKER | in ath6kl_core_init()
120 ar->suspend_mode = suspend_mode; in ath6kl_core_init()
122 ar->suspend_mode = 0; in ath6kl_core_init()
127 ar->wow_suspend_mode = wow_mode; in ath6kl_core_init()
129 ar->wow_suspend_mode = 0; in ath6kl_core_init()
132 ar->conf_flags |= ATH6KL_CONF_UART_DEBUG; in ath6kl_core_init()
134 set_bit(FIRST_BOOT, &ar->flag); in ath6kl_core_init()
136 ath6kl_debug_init(ar); in ath6kl_core_init()
138 ret = ath6kl_init_hw_start(ar); in ath6kl_core_init()
145 ath6kl_rx_refill(ar->htc_target, ar->ctrl_ep); in ath6kl_core_init()
146 ath6kl_rx_refill(ar->htc_target, ar->ac2ep_map[WMM_AC_BE]); in ath6kl_core_init()
148 ret = ath6kl_cfg80211_init(ar); in ath6kl_core_init()
152 ret = ath6kl_debug_init_fs(ar); in ath6kl_core_init()
154 wiphy_unregister(ar->wiphy); in ath6kl_core_init()
158 for (i = 0; i < ar->vif_max; i++) in ath6kl_core_init()
159 ar->avail_idx_map |= BIT(i); in ath6kl_core_init()
164 ndev = ath6kl_interface_add(ar, "wlan%d", NL80211_IFTYPE_STATION, 0, in ath6kl_core_init()
172 wiphy_unregister(ar->wiphy); in ath6kl_core_init()
177 __func__, ndev->name, ndev, ar); in ath6kl_core_init()
182 ath6kl_debug_cleanup(ar); in ath6kl_core_init()
183 ath6kl_htc_flush_rx_buf(ar->htc_target); in ath6kl_core_init()
184 ath6kl_cleanup_amsdu_rxbufs(ar); in ath6kl_core_init()
185 ath6kl_wmi_shutdown(ar->wmi); in ath6kl_core_init()
186 clear_bit(WMI_ENABLED, &ar->flag); in ath6kl_core_init()
187 ar->wmi = NULL; in ath6kl_core_init()
189 ath6kl_htc_cleanup(ar->htc_target); in ath6kl_core_init()
191 ath6kl_hif_power_off(ar); in ath6kl_core_init()
193 ath6kl_bmi_cleanup(ar); in ath6kl_core_init()
195 destroy_workqueue(ar->ath6kl_wq); in ath6kl_core_init()
203 struct ath6kl *ar; in ath6kl_core_create() local
206 ar = ath6kl_cfg80211_create(); in ath6kl_core_create()
207 if (!ar) in ath6kl_core_create()
210 ar->p2p = !!ath6kl_p2p; in ath6kl_core_create()
211 ar->dev = dev; in ath6kl_core_create()
213 ar->vif_max = 1; in ath6kl_core_create()
215 ar->max_norm_iface = 1; in ath6kl_core_create()
217 spin_lock_init(&ar->lock); in ath6kl_core_create()
218 spin_lock_init(&ar->mcastpsq_lock); in ath6kl_core_create()
219 spin_lock_init(&ar->list_lock); in ath6kl_core_create()
221 init_waitqueue_head(&ar->event_wq); in ath6kl_core_create()
222 sema_init(&ar->sem, 1); in ath6kl_core_create()
224 INIT_LIST_HEAD(&ar->amsdu_rx_buffer_queue); in ath6kl_core_create()
225 INIT_LIST_HEAD(&ar->vif_list); in ath6kl_core_create()
227 clear_bit(WMI_ENABLED, &ar->flag); in ath6kl_core_create()
228 clear_bit(SKIP_SCAN, &ar->flag); in ath6kl_core_create()
229 clear_bit(DESTROY_IN_PROGRESS, &ar->flag); in ath6kl_core_create()
231 ar->tx_pwr = 0; in ath6kl_core_create()
232 ar->intra_bss = 1; in ath6kl_core_create()
233 ar->lrssi_roam_threshold = DEF_LRSSI_ROAM_THRESHOLD; in ath6kl_core_create()
235 ar->state = ATH6KL_STATE_OFF; in ath6kl_core_create()
237 memset((u8 *)ar->sta_list, 0, in ath6kl_core_create()
242 spin_lock_init(&ar->sta_list[ctr].psq_lock); in ath6kl_core_create()
243 skb_queue_head_init(&ar->sta_list[ctr].psq); in ath6kl_core_create()
244 skb_queue_head_init(&ar->sta_list[ctr].apsdq); in ath6kl_core_create()
245 ar->sta_list[ctr].mgmt_psq_len = 0; in ath6kl_core_create()
246 INIT_LIST_HEAD(&ar->sta_list[ctr].mgmt_psq); in ath6kl_core_create()
247 ar->sta_list[ctr].aggr_conn = in ath6kl_core_create()
249 if (!ar->sta_list[ctr].aggr_conn) { in ath6kl_core_create()
251 ath6kl_core_destroy(ar); in ath6kl_core_create()
256 skb_queue_head_init(&ar->mcastpsq); in ath6kl_core_create()
258 memcpy(ar->ap_country_code, DEF_AP_COUNTRY_CODE, 3); in ath6kl_core_create()
260 return ar; in ath6kl_core_create()
264 void ath6kl_core_cleanup(struct ath6kl *ar) in ath6kl_core_cleanup() argument
266 ath6kl_hif_power_off(ar); in ath6kl_core_cleanup()
268 destroy_workqueue(ar->ath6kl_wq); in ath6kl_core_cleanup()
270 if (ar->htc_target) in ath6kl_core_cleanup()
271 ath6kl_htc_cleanup(ar->htc_target); in ath6kl_core_cleanup()
273 ath6kl_cookie_cleanup(ar); in ath6kl_core_cleanup()
275 ath6kl_cleanup_amsdu_rxbufs(ar); in ath6kl_core_cleanup()
277 ath6kl_bmi_cleanup(ar); in ath6kl_core_cleanup()
279 ath6kl_debug_cleanup(ar); in ath6kl_core_cleanup()
281 kfree(ar->fw_board); in ath6kl_core_cleanup()
282 kfree(ar->fw_otp); in ath6kl_core_cleanup()
283 kfree(ar->fw); in ath6kl_core_cleanup()
284 kfree(ar->fw_patch); in ath6kl_core_cleanup()
285 kfree(ar->fw_testscript); in ath6kl_core_cleanup()
287 ath6kl_cfg80211_cleanup(ar); in ath6kl_core_cleanup()
291 void ath6kl_core_destroy(struct ath6kl *ar) in ath6kl_core_destroy() argument
293 ath6kl_cfg80211_destroy(ar); in ath6kl_core_destroy()