RE: [PATCH v7 4/6] wifi: rtw88: sdio: track free TX pages and OQT credits for RTL8723BS

Ping-Ke Shih <[email protected]>
Newsgroups org.kernel.vger.linux-wireless,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Luka Gejak <[email protected]> wrote:
> Hi Ping-Ke,
> 
> On August 25, 2026 8:12:58 AM GMT+02:00, Ping-Ke Shih <[email protected]> wrote:
> > guard(mutex)(&rtwsdio->tx_credit_lock);
> 
> The lock is only taken for this chip, and guard() is unconditional, so I
> split the locked region into its own function instead of branching around
> the lock:
> 
>         if (!rtw_is_8723bs(rtwdev)) {
>                 txsize = sdio_align_size(rtwsdio->sdio_func, skb->len);
> 
>                 ret = rtw_sdio_check_free_txpg(rtwdev, queue, txsize);
>                 if (ret)
>                         return ret;
> 
>                 return rtw_sdio_write_to_port(rtwdev, skb, queue, txaddr,
>                                               txsize);
>         }
>         ...
>         guard(mutex)(&rtwsdio->tx_credit_lock);
> 
>         return rtw_sdio_8723bs_write_port(rtwdev, skb, queue, txaddr, txsize,
>                                           write_size);

I meant

    if (rtw_is_8723bs(rtwdev))
        guard(mutex)(&rtwsdio->tx_credit_lock);

Doesn't it work?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.