kfree_rcu(lr, rcu_head);
}
+static void reg_update_last_request(struct regulatory_request *request)
+{
+ reg_kfree_last_request();
+ rcu_assign_pointer(last_request, request);
+}
+
static void reset_regdomains(bool full_reset,
const struct ieee80211_regdomain *new_regdom)
{
if (!full_reset)
return;
- reg_kfree_last_request();
- rcu_assign_pointer(last_request, &core_request_world);
+ reg_update_last_request(&core_request_world);
}
/*
core_request->intersect = false;
core_request->processed = false;
- reg_kfree_last_request();
- rcu_assign_pointer(last_request, core_request);
+ reg_update_last_request(core_request);
if (call_crda(core_request->alpha2))
return REG_REQ_IGNORE;
user_request->intersect = treatment == REG_REQ_INTERSECT;
user_request->processed = false;
- reg_kfree_last_request();
- rcu_assign_pointer(last_request, user_request);
+ reg_update_last_request(user_request);
user_alpha2[0] = user_request->alpha2[0];
user_alpha2[1] = user_request->alpha2[1];
driver_request->intersect = treatment == REG_REQ_INTERSECT;
driver_request->processed = false;
- reg_kfree_last_request();
- rcu_assign_pointer(last_request, driver_request);
+ reg_update_last_request(driver_request);
/*
* Since CRDA will not be called in this case as we already
country_ie_request->intersect = false;
country_ie_request->processed = false;
- reg_kfree_last_request();
- rcu_assign_pointer(last_request, country_ie_request);
+ reg_update_last_request(country_ie_request);
if (call_crda(country_ie_request->alpha2))
return REG_REQ_IGNORE;