Lines Matching refs:ar

32 static bool ath11k_regdom_changes(struct ath11k *ar, char *alpha2)
36 regd = rcu_dereference_rtnl(ar->hw->wiphy->regd);
53 struct ath11k *ar = hw->priv;
56 ath11k_dbg(ar->ab, ATH11K_DBG_REG,
66 ath11k_warn(ar->ab, "Unexpected Regulatory event for this wiphy\n");
71 ath11k_dbg(ar->ab, ATH11K_DBG_REG,
76 if (!ath11k_regdom_changes(ar, request->alpha2)) {
77 ath11k_dbg(ar->ab, ATH11K_DBG_REG, "Country is already set\n");
85 if (ar->ab->hw_params.current_cc_support) {
87 memcpy(&ar->alpha2, &set_current_param.alpha2, 2);
88 ret = ath11k_wmi_send_set_current_country_cmd(ar, &set_current_param);
90 ath11k_warn(ar->ab,
97 ret = ath11k_wmi_send_init_country_cmd(ar, init_country_param);
99 ath11k_warn(ar->ab,
103 ath11k_mac_11d_scan_stop(ar);
104 ar->regdom_set_by_user = true;
107 int ath11k_reg_update_chan_list(struct ath11k *ar, bool wait)
112 struct ieee80211_hw *hw = ar->hw;
118 if (wait && ar->state_11d != ATH11K_11D_IDLE) {
119 left = wait_for_completion_timeout(&ar->completed_11d_scan,
122 ath11k_dbg(ar->ab, ATH11K_DBG_REG,
124 ar->state_11d = ATH11K_11D_IDLE;
126 ath11k_dbg(ar->ab, ATH11K_DBG_REG,
131 (ar->scan.state == ATH11K_SCAN_STARTING ||
132 ar->scan.state == ATH11K_SCAN_RUNNING)) {
133 left = wait_for_completion_timeout(&ar->scan.completed,
136 ath11k_dbg(ar->ab, ATH11K_DBG_REG,
139 ath11k_dbg(ar->ab, ATH11K_DBG_REG,
143 if (ar->state == ATH11K_STATE_RESTARTING)
168 params->pdev_id = ar->pdev->pdev_id;
210 ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
223 ret = ath11k_wmi_send_scan_chan_list_cmd(ar, params);
242 int ath11k_regd_update(struct ath11k *ar)
248 ab = ar->ab;
249 pdev_id = ar->pdev_idx;
291 ret = regulatory_set_wiphy_regd(ar->hw->wiphy, regd_copy);
298 if (ar->state == ATH11K_STATE_ON) {
299 ret = ath11k_reg_update_chan_list(ar, true);
820 static enum wmi_vdev_type ath11k_reg_get_ar_vdev_type(struct ath11k *ar)
830 arvif = list_first_entry_or_null(&ar->arvifs, struct ath11k_vif, list);
844 struct ath11k *ar;
904 ar = ab->pdevs[pdev_idx].ar;
905 vdev_type = ath11k_reg_get_ar_vdev_type(ar);
928 * generated regd to ar. NULL pointer handling will be
931 ar = ab->pdevs[pdev_idx].ar;
934 queue_work(ab->workqueue, &ar->regd_update_work);
964 struct ath11k *ar = container_of(work, struct ath11k,
968 ret = ath11k_regd_update(ar);
979 void ath11k_reg_init(struct ath11k *ar)
981 ar->hw->wiphy->regulatory_flags = REGULATORY_WIPHY_SELF_MANAGED;
982 ar->hw->wiphy->reg_notifier = ath11k_reg_notifier;