On Mon, 2024-02-12 at 14:45 +0100, Johannes Berg wrote: > On Tue, 2024-02-06 at 16:54 +0200, Miri Korenblit wrote: > > Some drivers need the data in it, so move it to the link conf, > > which is exposed to the driver. > > > + * @bss: the cfg80211 bss descriptor. Valid only for a station, and only > > + * when associated. > > > > For the record, I'm dropping this patch. > > Yes, the data is there in the stack, but the cfg80211 BSS contains data > that is not authenticated (from probe responses etc.) whereas mac80211 > is (hopefully always) operating on data that is authenticated with > beacon protection. > > So exposing this to the driver feels fragile - if it actually gets used > for pretty much anything, it won't necessarily be authenticated data. Changed my mind again ;-) The issue ends up being as described above, but there are some other things that the iwlwifi driver would like to access that are most easily obtained via this information, not just RSSI. The other thing on our list now is the BSS load, and we had a patch [1] to parse it in mac80211 and then it's authenticated, but really we don't care much for security purposes and would like to also have it from probe responses which are never authenticated. [1] https://lore.kernel.org/r/20240216135047.b771830d9b12.If5885d651cb0114711ee1f6c1cb8fe31a69bf0a7@changeid So I'll apply this patch with a documentation change to warn the data contained is not authenticated, and drop the patch [1] linked above instead. This gives the driver more flexibility, at the expense of perhaps a slightly greater risk of using it for something it shouldn't be used for, but the alternatives would put more driver-specific logic into mac80211, which we don't really want either. johannes