Search Linux Wireless

RE: [PATCH v3 11/12] wifi: rtlwifi: Add rtl8192du/sw.{c,h}

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

 



> I got another idea: if we have a guarantee that the two USB
> interfaces are probed one at a time, then we can move the global
> things into struct rtl_priv. The first probe call will allocate
> the arrays and initialise the mutexes. The second probe call
> will obtain those from the first struct rtl_priv:
> 
> int rtl_usb_probe(struct usb_interface *intf, ...) {
>         udev = interface_to_usbdev(intf);
>         struct ieee80211_hw *first_hw = usb_get_intfdata(udev->actconfig->interface[0]);
>         struct rtl_priv *first_rtlpriv = rtl_priv(first_hw);
> 

Could it have racing when obtaining mutexes from second probe? 
Should we need a lock to ensure the sequence? 

When driver is going to down, how can mutexes get free safely?

It seems like we still need another global lock to ensure that. 






[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