Return-Path: MIME-Version: 1.0 In-Reply-To: <87r2po6gts.fsf@kamboji.qca.qualcomm.com> References: <1513168977-2121-1-git-send-email-amitkarwar@gmail.com> <1513168977-2121-5-git-send-email-amitkarwar@gmail.com> <87r2q5mc4x.fsf@purkki.adurom.net> <87r2po6gts.fsf@kamboji.qca.qualcomm.com> From: Amitkumar Karwar Date: Fri, 16 Feb 2018 20:16:02 +0530 Message-ID: Subject: Re: [v5 4/8] rsi: add coex support To: Kalle Valo Cc: Marcel Holtmann , linux-wireless , Amitkumar Karwar , Prameela Rani Garnepudi , "open list:BLUETOOTH DRIVERS" , Siva Rebbagondla Content-Type: text/plain; charset="UTF-8" List-ID: On Tue, Feb 13, 2018 at 9:07 PM, Kalle Valo wrote: > Amitkumar Karwar writes: > >> On Thu, Feb 1, 2018 at 12:26 PM, Kalle Valo wrote: >>> Amitkumar Karwar writes: >>> >>>> From: Prameela Rani Garnepudi >>>> >>>> With BT support, driver has to handle two streams of data >>>> (i.e. wlan and BT). Actual coex implementation is in firmware. >>>> Coex module just schedule the packets to firmware by taking them >>>> from the corresponding paths. >>>> >>>> Structures for module and protocol operations are introduced for >>>> this purpose. Protocol operations structure is global structure >>>> which can be shared among different modules. Initialization of >>>> coex and operating mode values is moved to rsi_91x_init(). >>>> >>>> Signed-off-by: Prameela Rani Garnepudi >>>> Signed-off-by: Siva Rebbagondla >>>> Signed-off-by: Amitkumar Karwar >>> >>> [...] >>> >>>> @@ -270,6 +271,7 @@ struct rsi_common { >>>> u8 obm_ant_sel_val; >>>> int tx_power; >>>> u8 ant_in_use; >>>> + struct semaphore tx_bus_lock; >>> >>> Do you really need to use semaphore? I think nowadays the preference is >>> to use something other than semaphores. >> >> We used semaphore here, as USB/SDIO bus write operations could be >> blocking/waiting. I will check if spinlock suits here in follow up >> patch. It will need some testing. > > I was more thinking about using a mutex. Right. mutex would be better option. I will submit updated version with this change Regards, Amitkumar Karwar