qcacld-3.0: Call callback to sync the user-space

When the country code is changed, it needs to call
the new cfg80211 api cfg80211_send_reg_change_event
to sync the user-space info.

Change-Id: I1e31ff122f9337c353d8be260b4802cc363790d6
CRs-Fixed: 2183992
This commit is contained in:
Paul Zhang 2018-02-03 15:46:29 +08:00 • committed by snandini
commit 3d026fbf4e

View file

@ -959,13 +959,14 @@ static void hdd_regulatory_dyn_cbk(struct wlan_objmgr_psoc *psoc,
struct pdev_osif_priv *pdev_priv;
struct hdd_context *hdd_ctx;
enum country_src cc_src;
struct regulatory_request request;
uint8_t alpha2[REG_ALPHA2_LEN + 1];
pdev_priv = wlan_pdev_get_ospriv(pdev);
wiphy = pdev_priv->wiphy;
hdd_ctx = wiphy_priv(wiphy);
hdd_debug("%s: process channel list update from regulatory", __func__);
hdd_debug("process channel list update from regulatory");
fill_wiphy_band_channels(wiphy, chan_list, NL80211_BAND_2GHZ);
fill_wiphy_band_channels(wiphy, chan_list, NL80211_BAND_5GHZ);
@ -980,6 +981,31 @@ static void hdd_regulatory_dyn_cbk(struct wlan_objmgr_psoc *psoc,
if (avoid_freq_ind)
hdd_ch_avoid_ind(hdd_ctx, &avoid_freq_ind->chan_list,
&avoid_freq_ind->freq_list);
if (SOURCE_UNKNOWN != cc_src) {
qdf_mem_set(&request, sizeof(request), 0);
request.alpha2[0] = alpha2[0];
request.alpha2[1] = alpha2[1];
switch (cc_src) {
case SOURCE_CORE:
request.initiator = NL80211_REGDOM_SET_BY_CORE;
break;
case SOURCE_11D:
request.initiator = NL80211_REGDOM_SET_BY_COUNTRY_IE;
break;
case SOURCE_USERSPACE:
request.initiator = NL80211_REGDOM_SET_BY_USER;
break;
case SOURCE_DRIVER:
default:
request.initiator = NL80211_REGDOM_SET_BY_DRIVER;
break;
}
cfg80211_send_reg_change_event(&request, wiphy);
}
}
/**