Lines Matching refs:wl
23 int wl1271_init_templates_config(struct wl1271 *wl) in wl1271_init_templates_config() argument
29 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
30 wl->scan_templ_id_2_4, NULL, in wl1271_init_templates_config()
36 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
37 wl->scan_templ_id_5, in wl1271_init_templates_config()
43 if (wl->quirks & WLCORE_QUIRK_DUAL_PROBE_TMPL) { in wl1271_init_templates_config()
44 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
45 wl->sched_scan_templ_id_2_4, in wl1271_init_templates_config()
52 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
53 wl->sched_scan_templ_id_5, in wl1271_init_templates_config()
61 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
68 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
75 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
83 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
90 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
99 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
110 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
117 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
124 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
133 ret = wl1271_cmd_template_set(wl, WL12XX_INVALID_ROLE_ID, in wl1271_init_templates_config()
144 static int wl1271_ap_init_deauth_template(struct wl1271 *wl, in wl1271_ap_init_deauth_template() argument
160 rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set); in wl1271_ap_init_deauth_template()
161 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_ap_init_deauth_template()
170 static int wl1271_ap_init_null_template(struct wl1271 *wl, in wl1271_ap_init_null_template() argument
193 rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set); in wl1271_ap_init_null_template()
194 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_ap_init_null_template()
203 static int wl1271_ap_init_qos_null_template(struct wl1271 *wl, in wl1271_ap_init_qos_null_template() argument
226 rate = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set); in wl1271_ap_init_qos_null_template()
227 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_ap_init_qos_null_template()
236 static int wl12xx_init_rx_config(struct wl1271 *wl) in wl12xx_init_rx_config() argument
240 ret = wl1271_acx_rx_msdu_life_time(wl); in wl12xx_init_rx_config()
247 static int wl12xx_init_phy_vif_config(struct wl1271 *wl, in wl12xx_init_phy_vif_config() argument
252 ret = wl1271_acx_slot(wl, wlvif, DEFAULT_SLOT_TIME); in wl12xx_init_phy_vif_config()
256 ret = wl1271_acx_service_period_timeout(wl, wlvif); in wl12xx_init_phy_vif_config()
260 ret = wl1271_acx_rts_threshold(wl, wlvif, wl->hw->wiphy->rts_threshold); in wl12xx_init_phy_vif_config()
267 static int wl1271_init_sta_beacon_filter(struct wl1271 *wl, in wl1271_init_sta_beacon_filter() argument
272 ret = wl1271_acx_beacon_filter_table(wl, wlvif); in wl1271_init_sta_beacon_filter()
277 ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false); in wl1271_init_sta_beacon_filter()
284 int wl1271_init_pta(struct wl1271 *wl) in wl1271_init_pta() argument
288 ret = wl12xx_acx_sg_cfg(wl); in wl1271_init_pta()
292 ret = wl1271_acx_sg_enable(wl, wl->sg_enabled); in wl1271_init_pta()
299 int wl1271_init_energy_detection(struct wl1271 *wl) in wl1271_init_energy_detection() argument
303 ret = wl1271_acx_cca_threshold(wl); in wl1271_init_energy_detection()
310 static int wl1271_init_beacon_broadcast(struct wl1271 *wl, in wl1271_init_beacon_broadcast() argument
315 ret = wl1271_acx_bcn_dtim_options(wl, wlvif); in wl1271_init_beacon_broadcast()
322 static int wl12xx_init_fwlog(struct wl1271 *wl) in wl12xx_init_fwlog() argument
326 if (wl->quirks & WLCORE_QUIRK_FWLOG_NOT_IMPLEMENTED) in wl12xx_init_fwlog()
329 ret = wl12xx_cmd_config_fwlog(wl); in wl12xx_init_fwlog()
337 int wl1271_sta_hw_init(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_sta_hw_init() argument
342 ret = wl12xx_acx_config_ps(wl, wlvif); in wl1271_sta_hw_init()
347 ret = wl1271_acx_fm_coex(wl); in wl1271_sta_hw_init()
351 ret = wl1271_acx_sta_rate_policies(wl, wlvif); in wl1271_sta_hw_init()
358 static int wl1271_sta_hw_init_post_mem(struct wl1271 *wl, in wl1271_sta_hw_init_post_mem() argument
365 ret = wl1271_acx_keep_alive_mode(wl, wlvif, false); in wl1271_sta_hw_init_post_mem()
373 static int wl1271_ap_hw_init(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_ap_hw_init() argument
377 ret = wl1271_init_ap_rates(wl, wlvif); in wl1271_ap_hw_init()
382 ret = wlcore_hw_ap_sleep(wl); in wl1271_ap_hw_init()
389 int wl1271_ap_init_templates(struct wl1271 *wl, struct ieee80211_vif *vif) in wl1271_ap_init_templates() argument
394 ret = wl1271_ap_init_deauth_template(wl, wlvif); in wl1271_ap_init_templates()
398 ret = wl1271_ap_init_null_template(wl, vif); in wl1271_ap_init_templates()
402 ret = wl1271_ap_init_qos_null_template(wl, vif); in wl1271_ap_init_templates()
410 ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false); in wl1271_ap_init_templates()
417 static int wl1271_ap_hw_init_post_mem(struct wl1271 *wl, in wl1271_ap_hw_init_post_mem() argument
420 return wl1271_ap_init_templates(wl, vif); in wl1271_ap_hw_init_post_mem()
423 int wl1271_init_ap_rates(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_init_ap_rates() argument
439 ret = wl1271_acx_ap_rate_policy(wl, &rc, wlvif->ap.mgmt_rate_idx); in wl1271_init_ap_rates()
444 rc.enabled_rates = wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set); in wl1271_init_ap_rates()
448 ret = wl1271_acx_ap_rate_policy(wl, &rc, wlvif->ap.bcast_rate_idx); in wl1271_init_ap_rates()
456 if (wl->ofdm_only_ap && (wlvif->basic_rate_set & CONF_TX_OFDM_RATES)) in wl1271_init_ap_rates()
465 supported_rates |= wlcore_hw_ap_get_mimo_wide_rate_mask(wl, wlvif); in wl1271_init_ap_rates()
468 for (i = 0; i < wl->conf.tx.ac_conf_count; i++) { in wl1271_init_ap_rates()
473 ret = wl1271_acx_ap_rate_policy(wl, &rc, in wl1271_init_ap_rates()
482 static int wl1271_set_ba_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_set_ba_policies() argument
486 wl->ba_rx_session_count = 0; in wl1271_set_ba_policies()
498 return wl12xx_acx_set_ba_initiator_policy(wl, wlvif); in wl1271_set_ba_policies()
502 static int wl12xx_init_sta_role(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_init_sta_role() argument
506 ret = wl1271_acx_group_address_tbl(wl, wlvif, true, NULL, 0); in wl12xx_init_sta_role()
511 ret = wl1271_acx_conn_monit_params(wl, wlvif, false); in wl12xx_init_sta_role()
516 ret = wl1271_init_sta_beacon_filter(wl, wlvif); in wl12xx_init_sta_role()
521 ret = wl1271_init_beacon_broadcast(wl, wlvif); in wl12xx_init_sta_role()
526 ret = wl1271_acx_rssi_snr_avg_weights(wl, wlvif); in wl12xx_init_sta_role()
534 static int wl12xx_init_ap_role(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_init_ap_role() argument
538 ret = wl1271_acx_ap_max_tx_retry(wl, wlvif); in wl12xx_init_ap_role()
543 ret = wl1271_acx_tx_power(wl, wlvif, wlvif->power_level); in wl12xx_init_ap_role()
547 if (wl->radar_debug_mode) in wl12xx_init_ap_role()
548 wlcore_cmd_generic_cfg(wl, wlvif, in wl12xx_init_ap_role()
550 wl->radar_debug_mode, 0); in wl12xx_init_ap_role()
555 int wl1271_init_vif_specific(struct wl1271 *wl, struct ieee80211_vif *vif) in wl1271_init_vif_specific() argument
565 if (wl->ap_count == 0 && is_ap) { /* first AP */ in wl1271_init_vif_specific()
566 ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_ELP); in wl1271_init_vif_specific()
571 wl->event_mask |= wl->ap_event_mask; in wl1271_init_vif_specific()
572 ret = wl1271_event_unmask(wl); in wl1271_init_vif_specific()
576 } else if (wl->sta_count == 0 && wl->ap_count == 0 && !is_ap) { in wl1271_init_vif_specific()
577 u8 sta_auth = wl->conf.conn.sta_sleep_auth; in wl1271_init_vif_specific()
580 ret = wl1271_acx_sleep_auth(wl, sta_auth); in wl1271_init_vif_specific()
583 ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_ELP); in wl1271_init_vif_specific()
591 ret = wl1271_ap_hw_init(wl, wlvif); in wl1271_init_vif_specific()
595 ret = wl12xx_init_ap_role(wl, wlvif); in wl1271_init_vif_specific()
599 ret = wl1271_sta_hw_init(wl, wlvif); in wl1271_init_vif_specific()
603 ret = wl12xx_init_sta_role(wl, wlvif); in wl1271_init_vif_specific()
608 wl12xx_init_phy_vif_config(wl, wlvif); in wl1271_init_vif_specific()
611 BUG_ON(wl->conf.tx.tid_conf_count != wl->conf.tx.ac_conf_count); in wl1271_init_vif_specific()
612 for (i = 0; i < wl->conf.tx.tid_conf_count; i++) { in wl1271_init_vif_specific()
613 conf_ac = &wl->conf.tx.ac_conf[i]; in wl1271_init_vif_specific()
614 ret = wl1271_acx_ac_cfg(wl, wlvif, conf_ac->ac, in wl1271_init_vif_specific()
620 conf_tid = &wl->conf.tx.tid_conf[i]; in wl1271_init_vif_specific()
621 ret = wl1271_acx_tid_cfg(wl, wlvif, in wl1271_init_vif_specific()
634 ret = wl1271_acx_feature_cfg(wl, wlvif); in wl1271_init_vif_specific()
640 ret = wl1271_ap_hw_init_post_mem(wl, vif); in wl1271_init_vif_specific()
642 ret = wl1271_sta_hw_init_post_mem(wl, vif); in wl1271_init_vif_specific()
648 ret = wl1271_set_ba_policies(wl, wlvif); in wl1271_init_vif_specific()
652 ret = wlcore_hw_init_vif(wl, wlvif); in wl1271_init_vif_specific()
659 int wl1271_hw_init(struct wl1271 *wl) in wl1271_hw_init() argument
664 ret = wl->ops->hw_init(wl); in wl1271_hw_init()
669 ret = wl1271_init_templates_config(wl); in wl1271_hw_init()
673 ret = wl12xx_acx_mem_cfg(wl); in wl1271_hw_init()
678 ret = wl12xx_init_fwlog(wl); in wl1271_hw_init()
682 ret = wlcore_cmd_regdomain_config_locked(wl); in wl1271_hw_init()
687 ret = wl1271_init_pta(wl); in wl1271_hw_init()
692 ret = wl1271_acx_init_mem_config(wl); in wl1271_hw_init()
697 ret = wl12xx_init_rx_config(wl); in wl1271_hw_init()
701 ret = wl1271_acx_dco_itrim_params(wl); in wl1271_hw_init()
706 ret = wl1271_acx_tx_config_options(wl); in wl1271_hw_init()
711 ret = wl1271_acx_init_rx_interrupt(wl); in wl1271_hw_init()
716 ret = wl1271_init_energy_detection(wl); in wl1271_hw_init()
721 ret = wl1271_acx_frag_threshold(wl, wl->hw->wiphy->frag_threshold); in wl1271_hw_init()
726 ret = wl1271_cmd_data_path(wl, 1); in wl1271_hw_init()
731 ret = wl1271_acx_pm_config(wl); in wl1271_hw_init()
735 ret = wl12xx_acx_set_rate_mgmt_params(wl); in wl1271_hw_init()
740 ret = wl12xx_acx_config_hangover(wl); in wl1271_hw_init()
747 kfree(wl->target_mem_map); in wl1271_hw_init()
748 wl->target_mem_map = NULL; in wl1271_hw_init()