Re: [v5 4/8] rsi: add coex support

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

 



On Thu, Feb 1, 2018 at 12:38 PM, Kalle Valo <kvalo@xxxxxxxxxxxxxx> wrote:
> Amitkumar Karwar <amitkarwar@xxxxxxxxx> writes:
>
>> From: Prameela Rani Garnepudi <prameela.j04cs@xxxxxxxxx>
>>
>> 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 <prameela.j04cs@xxxxxxxxx>
>> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@xxxxxxxxxxxxxxxxxx>
>> Signed-off-by: Amitkumar Karwar <amit.karwar@xxxxxxxxxxxxxxxxxx>
>
> [...]
>
>> +static void rsi_coex_sched_tx_pkts(struct rsi_coex_ctrl_block *coex_cb)
>> +{
>> +     enum rsi_coex_queues coex_q;
>> +     struct sk_buff *skb;
>> +
>> +     while (1) {
>> +             coex_q = rsi_coex_determine_coex_q(coex_cb);
>> +             rsi_dbg(INFO_ZONE, "queue = %d\n", coex_q);
>> +
>> +             if (coex_q == RSI_COEX_Q_INVALID) {
>> +                     rsi_dbg(DATA_TX_ZONE, "No more pkt\n");
>> +                     break;
>> +             }
>> +
>> +             if (coex_q == RSI_COEX_Q_BT)
>> +                     skb = skb_dequeue(&coex_cb->coex_tx_qs[RSI_COEX_Q_BT]);
>> +     }
>> +}
>
> Neverending loops are dangerous in kernel. Can you put a limit so that
> if there's a bug the loop will not run forever?

I will get rid of while(1) in v6 patch series.

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



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux