Search Linux Wireless

Re: [PATCH v2 1/6] rtw88: use macro to check the current band

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 16, 2019 at 5:33 AM <yhchuang@xxxxxxxxxxx> wrote:
> index 4759d6a0ca6e..492a2bfc0d5a 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.h
> +++ b/drivers/net/wireless/realtek/rtw88/main.h
> @@ -58,6 +58,19 @@ struct rtw_hci {
>         u8 bulkout_num;
>  };
>
> +#define IS_CH_5G_BAND_1(channel) ((channel) >= 36 && (channel <= 48))
> +#define IS_CH_5G_BAND_2(channel) ((channel) >= 52 && (channel <= 64))
> +#define IS_CH_5G_BAND_3(channel) ((channel) >= 100 && (channel <= 144))
> +#define IS_CH_5G_BAND_4(channel) ((channel) >= 149 && (channel <= 177))

There are channels between 48 and 52, 64 and 100, and 144 and 149.
What are you doing with those?

> +#define IS_CH_5G_BAND_MID(channel) \
> +       (IS_CH_5G_BAND_2(channel) || IS_CH_5G_BAND_3(channel))
> +
> +#define IS_CH_2G_BAND(channel) ((channel) <= 14)
> +#define IS_CH_5G_BAND(channel) \
> +       (IS_CH_5G_BAND_1(channel) || IS_CH_5G_BAND_2(channel) || \
> +        IS_CH_5G_BAND_3(channel) || IS_CH_5G_BAND_4(channel))

Given the above (you have major holes in 5G_BAND{1,2,3,4}), this macro
seems like a regression.

Brian



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux