freebsd-skq/sys/net80211
Adrian Chadd 2808a02bf4 Prepare for supporting driver-overridden curchan when submitting scan
results.

Right now the scan infrastructure assumes the channel is under net80211
control, and that when receiving beacon frames for scanning, the
current channel is indeed what ic_curchan is set to.

But firmware NICs with firmware scan support need more than this -
they can do background scans whilst hiding the off-channel behaviour
from net80211.  Ie, net80211 still thinks everything is associated
and on the main channel, but it's getting scan results from all the
background traffic.

However sta_add() pays attention to ic_curchan and discards scan
results that aren't on the right channel.  CCK beacon frames can be
decoded from adjacent channels so the receive path and sta_add
discard these as appropriate.  This is fine for software scanning
like for ath(4), but not for firmware NICs.  So with those, the
whole concept of background firmware scanning won't work without
major hacks (eg, overriding ic_curchan before calling the beacon
input / scan add.)

As part of my scan overhaul, modify sta_add() and the scan_add()
APIs to take an explicit current channel.  The normal RX path
will set it to ic_curchan so it's a no-op.  However, drivers may
decide to (eventually!) override the scan method to set the
"right" current channel based on what the firmware reports the
scan state is.

So for example, iwn, rsu and other NICs will eventually do this:

* driver issues scan start firmware command;
* firmware sends a "scan start on channel X" notify;
* firmware sends a bunch of beacon RX's as part of
  the scan results;
* .. and the driver will replace scan_add() curchan with channel X,
  so scan results are correct.
* firmware sends a "scan start on channel Y" notify;
* firmware sends more beacons...
* .. the driver replaces scan_add() curchan with channel Y.

Note:

* Eventually, net80211 should eventually grow the idea of a per-packet
  current channel.  It's possible in various modes (eg WAVE, P2P, etc)
  that individual frames can come in from different channels and that
  is under firmware control rather than driver/net80211 control, so
  we should support that.
2015-05-10 22:07:53 +00:00
..
_ieee80211.h
ieee80211_acl.c
ieee80211_action.c
ieee80211_action.h
ieee80211_adhoc.c Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_adhoc.h
ieee80211_ageq.c
ieee80211_ageq.h
ieee80211_alq.c
ieee80211_alq.h
ieee80211_amrr.c After much toying around with this AMRR initial rate stuff, 2014-08-20 09:10:03 +00:00
ieee80211_amrr.h
ieee80211_crypto_ccmp.c
ieee80211_crypto_none.c
ieee80211_crypto_tkip.c
ieee80211_crypto_wep.c
ieee80211_crypto.c
ieee80211_crypto.h
ieee80211_ddb.c
ieee80211_dfs.c
ieee80211_dfs.h
ieee80211_freebsd.c Use SYSCTL_OUT_STR() to return strings. 2015-03-14 21:41:00 +00:00
ieee80211_freebsd.h Fix string concatenation - "wlan_##name" -> "wlan_" #name 2015-05-04 00:47:22 +00:00
ieee80211_hostap.c Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_hostap.h
ieee80211_ht.c Attempt to address Bug #176201 - don't advertise what the AP announced 2015-05-10 06:57:53 +00:00
ieee80211_ht.h
ieee80211_hwmp.c Fix multiple incorrect SYSCTL arguments in the kernel: 2014-10-21 07:31:21 +00:00
ieee80211_input.c Mechanically convert to if_inc_counter(). 2014-09-19 09:20:55 +00:00
ieee80211_input.h
ieee80211_ioctl.c Use logical rather than bitwise OR in if() expression. 2014-04-26 23:22:49 +00:00
ieee80211_ioctl.h
ieee80211_mesh.c Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_mesh.h
ieee80211_monitor.c Mechanically convert to if_inc_counter(). 2014-09-19 09:20:55 +00:00
ieee80211_monitor.h
ieee80211_node.c Add node_clear_keyixmap() and use it in the ieee80211_free_node() / node_reclaim(). 2015-05-04 00:29:19 +00:00
ieee80211_node.h
ieee80211_output.c Fix kern/196290 - don't announce 11n HTINFO rates if the channel is 2015-02-27 04:45:47 +00:00
ieee80211_phy.c
ieee80211_phy.h
ieee80211_power.c Update ieee80211_sta_tim_notify() to do double duty - handle STA sleep 2014-12-21 04:58:45 +00:00
ieee80211_power.h Begin fleshing out support for net80211 provided (legacy) sleep management. 2014-04-24 01:39:53 +00:00
ieee80211_proto.c
ieee80211_proto.h Make ieee80211_add_ssid() public. 2014-12-19 01:39:58 +00:00
ieee80211_radiotap.c
ieee80211_radiotap.h
ieee80211_ratectl_none.c
ieee80211_ratectl.c
ieee80211_ratectl.h Switch around the order of static inline to be in line with how it's 2015-01-11 18:43:45 +00:00
ieee80211_regdomain.c
ieee80211_regdomain.h
ieee80211_rssadapt.c
ieee80211_rssadapt.h
ieee80211_scan_sta.c Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_scan_sw.c Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_scan_sw.h Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_scan.c Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_scan.h Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_sta.c Prepare for supporting driver-overridden curchan when submitting scan 2015-05-10 22:07:53 +00:00
ieee80211_sta.h
ieee80211_superg.c Fix multiple incorrect SYSCTL arguments in the kernel: 2014-10-21 07:31:21 +00:00
ieee80211_superg.h
ieee80211_tdma.c
ieee80211_tdma.h
ieee80211_var.h Global-ify channel_type() - this fixes non-debug net80211 builds. 2015-01-06 18:25:10 +00:00
ieee80211_wds.c Mechanically convert to if_inc_counter(). 2014-09-19 09:20:55 +00:00
ieee80211_wds.h
ieee80211_xauth.c
ieee80211.c Global-ify channel_type() - this fixes non-debug net80211 builds. 2015-01-06 18:25:10 +00:00
ieee80211.h