Search Linux Wireless

Re: [PATCH v5 03/11] wifi: rtlwifi: Add rtl8192du/hw.{c,h}

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

 



On 10/05/2024 06:04, Ping-Ke Shih wrote:
> Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote:
> 
>> +
>> +int rtl92du_hw_init(struct ieee80211_hw *hw)
>> +{
>> +       struct rtl_usb_priv *usb_priv = rtl_usbpriv(hw);
>> +       struct rtl_usb *rtlusb = rtl_usbdev(usb_priv);
>> +       struct rtl_priv *rtlpriv = rtl_priv(hw);
>> +       struct rtl_ps_ctl *ppsc = rtl_psc(rtlpriv);
>> +       struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
>> +       struct rtl_mac *mac = rtl_mac(rtlpriv);
>> +       struct rtl_phy *rtlphy = &rtlpriv->phy;
>> +       u8 val8, txpktbuf_bndy;
>> +       unsigned long flags;
>> +       int err, i;
>> +       u32 val32;
>> +       u16 val16;
>> +
>> +       /* As this function can take a very long time
>> +        * and can be called with irqs disabled, reenable the irqs
>> +        * to let the other devices continue being serviced.
>> +        *
>> +        * It is safe doing so since our own interrupts will only be enabled
>> +        * in a subsequent step.
>> +        */
>> +       local_save_flags(flags);
>> +       local_irq_enable();
> 
> I think you just copy and paste this chunk. I wonder if USB has the same behavior?
> Driver force to enable IRQ is weird to me. Please check I this is really called
> with irq disabled? If not, we can remove them.
> 

Yes, I copied that. Removing it from rtl8192du makes no
difference for me. I'm not sure how to check if the function
is called with irq disabled. Is it raw_irqs_disabled() ?
It returns 0 for me.

> [...]
> 
>> +       local_irq_disable();
>> +       local_irq_restore(flags);
>> +
>> +       return err;
>> +}
>> +
> 
> 





[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