ibss.c (6b41f832a26e41d82b751afc4bfc3ce8034d68d0) ibss.c (cb71f1d136a635decf43c3b502ee34fb05640fcd)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * IBSS mode implementation
4 * Copyright 2003-2008, Jouni Malinen <j@w1.fi>
5 * Copyright 2004, Instant802 Networks, Inc.
6 * Copyright 2005, Devicescape Software, Inc.
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>

--- 615 unchanged lines hidden (view full) ---

624 rcu_read_lock();
625 chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
626 if (WARN_ON_ONCE(!chanctx_conf))
627 return NULL;
628 band = chanctx_conf->def.chan->band;
629 scan_width = cfg80211_chandef_to_scan_width(&chanctx_conf->def);
630 rcu_read_unlock();
631
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * IBSS mode implementation
4 * Copyright 2003-2008, Jouni Malinen <j@w1.fi>
5 * Copyright 2004, Instant802 Networks, Inc.
6 * Copyright 2005, Devicescape Software, Inc.
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>

--- 615 unchanged lines hidden (view full) ---

624 rcu_read_lock();
625 chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
626 if (WARN_ON_ONCE(!chanctx_conf))
627 return NULL;
628 band = chanctx_conf->def.chan->band;
629 scan_width = cfg80211_chandef_to_scan_width(&chanctx_conf->def);
630 rcu_read_unlock();
631
632 sta = sta_info_alloc(sdata, addr, GFP_KERNEL);
632 sta = sta_info_alloc(sdata, addr, -1, GFP_KERNEL);
633 if (!sta) {
634 rcu_read_lock();
635 return NULL;
636 }
637
638 /* make sure mandatory rates are always added */
639 sband = local->hw.wiphy->bands[band];
640 sta->sta.deflink.supp_rates[band] = supp_rates |

--- 583 unchanged lines hidden (view full) ---

1224 if (WARN_ON_ONCE(!chanctx_conf)) {
1225 rcu_read_unlock();
1226 return;
1227 }
1228 band = chanctx_conf->def.chan->band;
1229 scan_width = cfg80211_chandef_to_scan_width(&chanctx_conf->def);
1230 rcu_read_unlock();
1231
633 if (!sta) {
634 rcu_read_lock();
635 return NULL;
636 }
637
638 /* make sure mandatory rates are always added */
639 sband = local->hw.wiphy->bands[band];
640 sta->sta.deflink.supp_rates[band] = supp_rates |

--- 583 unchanged lines hidden (view full) ---

1224 if (WARN_ON_ONCE(!chanctx_conf)) {
1225 rcu_read_unlock();
1226 return;
1227 }
1228 band = chanctx_conf->def.chan->band;
1229 scan_width = cfg80211_chandef_to_scan_width(&chanctx_conf->def);
1230 rcu_read_unlock();
1231
1232 sta = sta_info_alloc(sdata, addr, GFP_ATOMIC);
1232 sta = sta_info_alloc(sdata, addr, -1, GFP_ATOMIC);
1233 if (!sta)
1234 return;
1235
1236 /* make sure mandatory rates are always added */
1237 sband = local->hw.wiphy->bands[band];
1238 sta->sta.deflink.supp_rates[band] = supp_rates |
1239 ieee80211_mandatory_rates(sband, scan_width);
1240

--- 649 unchanged lines hidden ---
1233 if (!sta)
1234 return;
1235
1236 /* make sure mandatory rates are always added */
1237 sband = local->hw.wiphy->bands[band];
1238 sta->sta.deflink.supp_rates[band] = supp_rates |
1239 ieee80211_mandatory_rates(sband, scan_width);
1240

--- 649 unchanged lines hidden ---