Skip to content

Commit d8eb741

Browse files
ordexjmberg-intel
authored andcommitted
mac80211: ibss - do not scan if not needed when creating an IBSS
In some cases mac80211 will scan before creating an IBSS even if bssid and frequency have been forced by the user. This is not needed and leads only to a delay in the IBSS establishment phase. Immediately create the cell if both bssid and frequency (and fixed_freq is set) have been specified. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 52981cd commit d8eb741

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎net/mac80211/ibss.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,17 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
891891
return;
892892
}
893893

894+
/* if a fixed bssid and a fixed freq have been provided create the IBSS
895+
* directly and do not waste time scanning
896+
*/
897+
if (ifibss->fixed_bssid && ifibss->fixed_channel) {
898+
sdata_info(sdata, "Created IBSS using preconfigured BSSID %pM\n",
899+
bssid);
900+
ieee80211_sta_create_ibss(sdata);
901+
return;
902+
}
903+
904+
894905
ibss_dbg(sdata, "sta_find_ibss: did not try to join ibss\n");
895906

896907
/* Selected IBSS not found in current scan results - try to scan */

0 commit comments

Comments
 (0)