|
@@ -1901,6 +1901,7 @@ int hdd_regulatory_init(struct hdd_context *hdd_ctx, struct wiphy *wiphy)
|
|
|
struct regulatory_channel *cur_chan_list;
|
|
|
enum country_src cc_src;
|
|
|
uint8_t alpha2[REG_ALPHA2_LEN + 1];
|
|
|
+ int ret;
|
|
|
|
|
|
cur_chan_list = qdf_mem_malloc(sizeof(*cur_chan_list) * NUM_CHANNELS);
|
|
|
if (!cur_chan_list) {
|
|
@@ -1913,6 +1914,12 @@ int hdd_regulatory_init(struct hdd_context *hdd_ctx, struct wiphy *wiphy)
|
|
|
hdd_regulatory_dyn_cbk,
|
|
|
NULL);
|
|
|
|
|
|
+ ret = hdd_update_country_code(hdd_ctx);
|
|
|
+ if (ret) {
|
|
|
+ hdd_err("Failed to update country code; errno:%d", ret);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
wiphy->regulatory_flags |= REGULATORY_WIPHY_SELF_MANAGED;
|
|
|
/* Check the kernel version for upstream commit aced43ce780dc5 that
|
|
|
* has support for processing user cell_base hints when wiphy is
|