qcacld-3.0: Use the regulatory sync kernel API with no lock

The init thread takes the rtnl lock during initialization.
So use kernel API regulatory_set_wiphy_regd that does not
take the rtnl lock.

Change-Id: I50e7aa96dd8c819d1531b84b181a058197d9b24f
CRs-Fixed: 2265624
This commit is contained in:
Amar Singhal 2018-06-22 12:53:06 -07:00 • committed by nshrivas
commit ac26de2077
2 changed files with 6 additions and 2 deletions

View file

@ -7167,12 +7167,13 @@ static int hdd_wiphy_init(struct hdd_context *hdd_ctx)
hdd_err("wiphy registration failed");
return ret_val;
}
/* Check the kernel version for upstream commit aced43ce780dc5 that
* has support for processing user cell_base hints when wiphy is
* self managed or check the backport flag for the same.
*/
#if defined CFG80211_USER_HINT_CELL_BASE_SELF_MANAGED || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0))
#if defined CFG80211_USER_HINT_CELL_BASE_SELF_MANAGED || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0))
hdd_send_wiphy_regd_sync_event(hdd_ctx);
#endif

View file

@ -1270,6 +1270,9 @@ void hdd_send_wiphy_regd_sync_event(struct hdd_context *hdd_ctx)
regd_rules[i].power_rule.max_eirp,
regd_rules[i].flags);
}
regulatory_set_wiphy_regd(hdd_ctx->wiphy, regd);
hdd_debug("regd sync event sent with reg rules info");
qdf_mem_free(regd);
}