Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5348a1e authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by Kalle Valo
Browse files

ath6kl: Make sure wiphy is registered before calling regulatory_hint()



As regulatory events are processed even before the wiphy is registered,
calling regulatory_hint() at early stage should be fixed.

Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent b796f093
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -3097,12 +3097,16 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
		return ret;
		return ret;
	}
	}


	ar->wiphy_registered = true;

	return 0;
	return 0;
}
}


void ath6kl_cfg80211_cleanup(struct ath6kl *ar)
void ath6kl_cfg80211_cleanup(struct ath6kl *ar)
{
{
	wiphy_unregister(ar->wiphy);
	wiphy_unregister(ar->wiphy);

	ar->wiphy_registered = false;
}
}


struct ath6kl *ath6kl_cfg80211_create(void)
struct ath6kl *ath6kl_cfg80211_create(void)
+2 −0
Original line number Original line Diff line number Diff line
@@ -666,6 +666,8 @@ struct ath6kl {


	bool p2p;
	bool p2p;


	bool wiphy_registered;

#ifdef CONFIG_ATH6KL_DEBUG
#ifdef CONFIG_ATH6KL_DEBUG
	struct {
	struct {
		struct sk_buff_head fwlog_queue;
		struct sk_buff_head fwlog_queue;
+1 −1
Original line number Original line Diff line number Diff line
@@ -914,7 +914,7 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len)
				regpair->regDmnEnum);
				regpair->regDmnEnum);
	}
	}


	if (country) {
	if (country && wmi->parent_dev->wiphy_registered) {
		alpha2[0] = country->isoName[0];
		alpha2[0] = country->isoName[0];
		alpha2[1] = country->isoName[1];
		alpha2[1] = country->isoName[1];