Search Linux Wireless

Re: [PATCH 3/4] mt76: mt76x2: move mutex_lock inside mt76x2_set_channel

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

 



On 2019-05-13 11:19, Lorenzo Bianconi wrote:
>> On Sat, May 11, 2019 at 12:17:53PM +0200, Lorenzo Bianconi wrote:
>> > This is a preliminary patch to run mt76x02_edcca_init atomically
>> > 
>> > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
>> > ---
>> >  .../wireless/mediatek/mt76/mt76x2/pci_main.c  | 16 ++++++++------
>> >  .../wireless/mediatek/mt76/mt76x2/usb_main.c  | 22 ++++++++++---------
>> >  2 files changed, 21 insertions(+), 17 deletions(-)
>> > 
>> > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
>> > index e416eee6a306..3a1467326f4d 100644
>> > --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
>> > +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
>> > @@ -54,14 +54,14 @@ mt76x2_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
>> >  	int ret;
>> >  
>> >  	cancel_delayed_work_sync(&dev->cal_work);
>> 
>> Since now you use mutex in mt76x2_phy_calibrate() you can remove  
>> cancel_delayed_work_sync() and drop other changes from this patch
>> as releasing mutex just to acquire it in almost next step make
>> no sense.
> 
> I agree with you, the only difference is in that way we will perform phy
> calibration even during scanning. If the there are no
> objections I will post a v3 removing cancel_delayed_work_sync and
> reworking patch 3/4
I don't agree for two reasons:

1. If we only rely on the mutex, we're blocking the workqueue. That
might have some unwanted side effects.
2. We really should avoid having the calibration work during scanning,
otherwise this creates extra latency on channel changes, making the
whole scan slower.

- Felix



[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