[PATCH 09/10] wifi: mt76: mt7996: rework background radar check for mt7990
Shayne Chen
shayne.chen at mediatek.com
Tue Apr 1 06:47:13 PDT 2025
On Mon, 2025-03-31 at 05:55 +0000, Ping-Ke Shih wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Shayne Chen <shayne.chen at mediatek.com> wrote:
>
> [...]
>
> > +
> > +bool mt7996_eeprom_has_background_radar(struct mt7996_dev *dev)
> > +{
> > + switch (mt76_chip(&dev->mt76)) {
> > + case MT7996_DEVICE_ID:
> > + if (dev->var.type == MT7996_VAR_TYPE_233)
> > + return false;
> > + break;
> > + case MT7992_DEVICE_ID:
> > + if (dev->var.type == MT7992_VAR_TYPE_23)
> > + return false;
> > + break;
> > + case MT7990_DEVICE_ID: {
> > + u8 path, rx_path, nss, *eeprom = dev-
> > >mt76.eeprom.data;
> > +
> > + mt7996_eeprom_parse_stream(eeprom, MT_BAND1, &path,
> > &rx_path, &nss);
> > + /* Disable background radar capability in 3T3R */
> > + if (path == 3 || rx_path == 3)
> > + return false;
> > + break;
> > + }
>
> The indentation of close brace looks weird.
Will fix it, thanks.
>
> Since -Wdeclaration-after-statement is dropped, I think compilers
> will not
> warn without the braces. But note that it is still not recommended to
> put declarations in the middle.
>
Since those variables are currently only used by mt7990 case, I think
they can be putting there for the moment.
> > + default:
> > + return false;
> > + }
> > +
> > + return true;
> > +}
>
>
>
More information about the Linux-mediatek
mailing list