Date: Wed, 8 Jan 2025 17:32:11 -0800 From: Adrian Chadd <adrian@freebsd.org> To: "Bjoern A. Zeeb" <bz@freebsd.org> Cc: freebsd-wireless <freebsd-wireless@freebsd.org> Subject: Re: net80211 channel cleanup - IEEE80211_IS_CHAN_DEFINED() / IEEE80211_IS_CHAN_ANYC() Message-ID: <CAJ-VmomzEtZjx9G8jUcPbC8oa02_9irdW=j5yHhaATFaepc7hQ@mail.gmail.com> In-Reply-To: <2846qs8s-3503-s299-1158-sppp2r312293@serrofq.bet> References: <CAJ-Vmom1vKu-S%2BpNeVme=WyE5GmGDs_=aduCTimXPYPMKfTDwQ@mail.gmail.com> <322ss8n1-1334-8s6q-85s9-80nsns73724q@SerrOFQ.bet> <CAJ-Vmo=j3tyquMmZxw62zmj9%2BPVdtk%2BROGYE=MCKCEB-E=ux1Q@mail.gmail.com> <2846qs8s-3503-s299-1158-sppp2r312293@serrofq.bet>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000036928e062b3bf395 Content-Type: text/plain; charset="UTF-8" On Tue, 7 Jan 2025 at 10:01, Bjoern A. Zeeb <bz@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 --00000000000036928e062b3bf395 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, 7 Jan 2= 025 at 10:01, Bjoern A. Zeeb <<a href=3D"mailto:bz@freebsd.org">bz@freeb= sd.org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m= argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left= :1ex">> (I don't mind renaming it, I'm just curious why!)<br> <br> Grml. Yes.=C2=A0 So be it.=C2=A0 The flags are all IEEE80211_CHAN_* and it<= br> would've been nice to have the common prefix for all channel stuff but<= br> history...<br></blockquote><div><br></div><div>Yeah. :( Well, we can clean = some of it up during the -16 timeline. I don't mind doing huge renames = of stuff.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex"> >> There are also plain "ANY" (no C) cases which should als= o be covered but<br> >> they fit even less into this scheme.<br> >><br> ><br> > Which ones? I want to make sure those get covered too.<br> <br> I just grepped and didn't go through them anymore in drivers ...<br> There seem to be two halfs in this output unintenionally nicely ordered<br> ;-)<br> <br> sys/dev/bwi/bwiphy.c:=C2=A0 =C2=A0if (chan =3D=3D IEEE80211_CHAN_ANY)<br> sys/dev/bwi/bwirf.c:=C2=A0 =C2=A0 rf->rf_curchan =3D IEEE80211_CHAN_ANY;= <br> sys/dev/bwi/bwirf.c:=C2=A0 =C2=A0 if (chan =3D=3D IEEE80211_CHAN_ANY)<br> sys/dev/bwi/bwirf.c:=C2=A0 =C2=A0 if (chan =3D=3D IEEE80211_CHAN_ANY) {<br> sys/dev/ral/rt2560.c:=C2=A0 =C2=A0KASSERT(chan !=3D 0 && chan !=3D = IEEE80211_CHAN_ANY, ("chan 0x%x", chan));<br> sys/dev/ral/rt2661.c:=C2=A0 =C2=A0KASSERT(chan !=3D 0 && chan !=3D = IEEE80211_CHAN_ANY, ("chan 0x%x", chan));<br> sys/dev/ral/rt2860.c:=C2=A0 =C2=A0if (chan =3D=3D 0 || chan =3D=3D IEEE8021= 1_CHAN_ANY)<br> sys/dev/usb/wlan/if_rum.c:=C2=A0 =C2=A0 =C2=A0 if (chan =3D=3D 0 || chan = =3D=3D IEEE80211_CHAN_ANY)<br> sys/dev/usb/wlan/if_run.c:=C2=A0 =C2=A0 =C2=A0 if (chan =3D=3D 0 || chan = =3D=3D IEEE80211_CHAN_ANY)<br> sys/dev/usb/wlan/if_upgt.c:=C2=A0 =C2=A0 =C2=A0if (channel =3D=3D 0 || chan= nel =3D=3D IEEE80211_CHAN_ANY) {<br> sys/dev/usb/wlan/if_ural.c:=C2=A0 =C2=A0 =C2=A0if (chan =3D=3D 0 || chan = =3D=3D IEEE80211_CHAN_ANY)<br> sys/dev/usb/wlan/if_zyd.c:=C2=A0 =C2=A0 =C2=A0 if (chan =3D=3D 0 || chan = =3D=3D IEEE80211_CHAN_ANY) {<br></blockquote><div><br></div><div>Yeah. ew. = :-)</div><div><br></div><div>Those will definitely need cleaning up. Lemme = go look at why those chan pointers may be 0 (which i believe is "NULL&= quot;).</div><div><br></div><div><br></div><div><br></div><div>-adrian</div= ><div><br></div></div></div> --00000000000036928e062b3bf395--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomzEtZjx9G8jUcPbC8oa02_9irdW=j5yHhaATFaepc7hQ>