mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Maintain and call driver load count
When wiphy is registered with kernel, the kernel call the regulatory notifier with the last request cached by the kernel. The last request is initialized to world mode. So for the first time registration, ignore the kernel callback. Change-Id: I8c6070eebac4c04145e51daaecb7745f331f58b1 CRs-Fixed: 2174245
This commit is contained in:
parent
a05a025bcf
commit
2d812011d7
2 changed files with 7 additions and 3 deletions
|
|
@ -6669,8 +6669,7 @@ static int hdd_wiphy_init(struct hdd_context *hdd_ctx)
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
if (!hdd_ctx->reg_offload)
|
||||
hdd_program_country_code(hdd_ctx);
|
||||
pld_increment_driver_load_cnt(hdd_ctx->parent_dev);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -708,8 +708,13 @@ void hdd_reg_notifier(struct wiphy *wiphy,
|
|||
request->dfs_region);
|
||||
|
||||
switch (request->initiator) {
|
||||
case NL80211_REGDOM_SET_BY_USER:
|
||||
case NL80211_REGDOM_SET_BY_CORE:
|
||||
if (pld_get_driver_load_cnt(hdd_ctx->parent_dev) == 0) {
|
||||
hdd_debug("ignore the 1st time notifier from CORE");
|
||||
return;
|
||||
}
|
||||
/* fall through to set country */
|
||||
case NL80211_REGDOM_SET_BY_USER:
|
||||
status = ucfg_reg_set_country(hdd_ctx->hdd_pdev,
|
||||
request->alpha2);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue