mac80211: assign bss_conf.bssid only once
Instead of checking every time bss_info_changed is called, assign the pointer once depending on the interface type and then leave it untouched until the interface type is changed. This makes the ieee80211_bss_info_change_notify() now a simple wrapper to call the driver only. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -810,6 +810,7 @@ void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local)
|
||||
void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata)
|
||||
{
|
||||
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
|
||||
static u8 zero_addr[ETH_ALEN] = {};
|
||||
|
||||
setup_timer(&ifmsh->housekeeping_timer,
|
||||
ieee80211_mesh_housekeeping_timer,
|
||||
@@ -835,4 +836,6 @@ void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata)
|
||||
INIT_LIST_HEAD(&ifmsh->preq_queue.list);
|
||||
spin_lock_init(&ifmsh->mesh_preq_queue_lock);
|
||||
spin_lock_init(&ifmsh->sync_offset_lock);
|
||||
|
||||
sdata->vif.bss_conf.bssid = zero_addr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user