On Tue, 7 Jan 2025 at 10:01, Bjoern A. Zeeb <b...@freebsd.org> wrote:

> > (I don't mind renaming it, I'm just curious why!)
>
> Grml. Yes.  So be it.  The flags are all IEEE80211_CHAN_* and it
> would've been nice to have the common prefix for all channel stuff but
> history...
>

Yeah. :( Well, we can clean some of it up during the -16 timeline. I don't
mind doing huge renames of stuff.


> >> There are also plain "ANY" (no C) cases which should also be covered but
> >> they fit even less into this scheme.
> >>
> >
> > Which ones? I want to make sure those get covered too.
>
> I just grepped and didn't go through them anymore in drivers ...
> There seem to be two halfs in this output unintenionally nicely ordered
> ;-)
>
> sys/dev/bwi/bwiphy.c:   if (chan == IEEE80211_CHAN_ANY)
> sys/dev/bwi/bwirf.c:    rf->rf_curchan = IEEE80211_CHAN_ANY;
> sys/dev/bwi/bwirf.c:    if (chan == IEEE80211_CHAN_ANY)
> sys/dev/bwi/bwirf.c:    if (chan == IEEE80211_CHAN_ANY) {
> sys/dev/ral/rt2560.c:   KASSERT(chan != 0 && chan != IEEE80211_CHAN_ANY,
> ("chan 0x%x", chan));
> sys/dev/ral/rt2661.c:   KASSERT(chan != 0 && chan != IEEE80211_CHAN_ANY,
> ("chan 0x%x", chan));
> sys/dev/ral/rt2860.c:   if (chan == 0 || chan == IEEE80211_CHAN_ANY)
> sys/dev/usb/wlan/if_rum.c:      if (chan == 0 || chan ==
> IEEE80211_CHAN_ANY)
> sys/dev/usb/wlan/if_run.c:      if (chan == 0 || chan ==
> IEEE80211_CHAN_ANY)
> sys/dev/usb/wlan/if_upgt.c:     if (channel == 0 || channel ==
> IEEE80211_CHAN_ANY) {
> sys/dev/usb/wlan/if_ural.c:     if (chan == 0 || chan ==
> IEEE80211_CHAN_ANY)
> sys/dev/usb/wlan/if_zyd.c:      if (chan == 0 || chan ==
> IEEE80211_CHAN_ANY) {
>

Yeah. ew. :-)

Those will definitely need cleaning up. Lemme go look at why those chan
pointers may be 0 (which i believe is "NULL").



-adrian

Reply via email to