Search Linux Wireless

RE: [PATCH v2 04/22] wifi: rtw88: Extend the init table parsing for RTL8812AU

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

 



Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote:
> @@ -1080,8 +1103,28 @@ static bool check_positive(struct rtw_dev *rtwdev, struct rtw_phy_cond cond)
>         if (cond.intf && cond.intf != drv_cond.intf)
>                 return false;
> 
> -       if (cond.rfe != drv_cond.rfe)
> -               return false;
> +       if (rtwdev->chip->id == RTW_CHIP_TYPE_8812A ||
> +           rtwdev->chip->id == RTW_CHIP_TYPE_8821A) {
> +               if (cond.rfe & 0x0f) {

if (!(cond.rfe & 0x0f))
    return true;

Then we can reduce one indentation level.  

> +                       if ((cond.rfe & drv_cond.rfe) != cond.rfe)
> +                               return false;
> +
> +                       if ((cond.rfe & BIT(0)) && cond2.type_glna != drv_cond2.type_glna)
> +                               return false;
> +
> +                       if ((cond.rfe & BIT(1)) && cond2.type_gpa != drv_cond2.type_gpa)
> +                               return false;
> +
> +                       if ((cond.rfe & BIT(2)) && cond2.type_alna != drv_cond2.type_alna)
> +                               return false;
> +
> +                       if ((cond.rfe & BIT(3)) && cond2.type_apa != drv_cond2.type_apa)
> +                               return false;
> +               }
> +       } else {
> +               if (cond.rfe != drv_cond.rfe)
> +                       return false;
> +       }
> 
>         return true;
>  }







[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