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]

 



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.

johannes


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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