Search Linux Wireless

RE: [PATCH] mwifiex: use separate wait queue for each command node

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

 



Hi Johannes,

> -----Original Message-----
> From: Johannes Berg [mailto:johannes@xxxxxxxxxxxxxxxx]
> Sent: Monday, October 03, 2011 11:30 PM
> To: Bing Zhao
> Cc: linux-wireless@xxxxxxxxxxxxxxx; John W. Linville; Amitkumar Karwar; Kiran Divekar; Yogesh Powar;
> Frank Huang
> Subject: Re: [PATCH] mwifiex: use separate wait queue for each command node
> 
> On Mon, 2011-10-03 at 21:08 -0700, Bing Zhao wrote:
> > From: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
> >
> > Currently global wait queue (adapter->cmd_wait_q) is used for
> > sending synchronous commands to FW. When two threads enter in
> > mwifiex_send_cmd_sync() routine at the same time, both the
> > threads wait for their command responses. They wake up
> > simultaneously after getting response of 1st command. After
> > this when a thread is waiting for command response of 3rd
> > command, it wakes up after getting response of 2nd command
> > and so on. Therefore we don't wait for the response of last
> > command(0xaa) during unload. Hence while next time loading the
> > driver command time out is seen for INIT command.
> >
> > This problem is resolved by having separate wait queue for each
> > command. Since driver sends multiple scan commands asynchronously
> > to FW for scanning the network, we will need separate wait queue
> > for the whole scan operation. Earlier the global wait queue was
> > being used for scan.
> 
> I can't say I really care about this, but this seems completely
> pointless. A waitqueue doesn't imply that just a single thing can be
> waiting on it, since you should be using wait_for() macros. Thus, all
> you *really* need is a bit in the command that marks it as completed,
> and then you use the waitqueue to wait for that bit to be set.

Thanks for your comment.
Will work on v2 patch and resubmit.

Thanks,
Bing

> 
> johannes
> 

��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux