Message ID | 20191111194046.26908-3-Larry.Finger@lwfinger.net (mailing list archive) |
---|---|
State | Accepted |
Commit | 3155db7613edea8fb943624062baf1e4f9cfbfd6 |
Delegated to: | Kalle Valo |
Headers | show |
Series | rtlwifi: rtl8192de: Fixes for several regressions | expand |
On 11/22/19 1:00 AM, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers"). > > The bot has tested the following trees: v5.3.11, v4.19.84, v4.14.154, v4.9.201, v4.4.201. > > v5.3.11: Build OK! > v4.19.84: Build OK! > v4.14.154: Failed to apply! Possible dependencies: > 0c07bd745760 ("rtlwifi: rtl8192ee: Make driver support 64bits DMA.") > > v4.9.201: Failed to apply! Possible dependencies: > 004a1e167905 ("rtlwifi: rtl8821ae: Remove all instances of DBG_EMERG") > 02527a73beb3 ("rtlwifi: rtl8188ee: Remove all instances of DBG_EMERG") > 0c07bd745760 ("rtlwifi: rtl8192ee: Make driver support 64bits DMA.") > 102e295ed5a4 ("rtlwifi: Redo debugging macros RTPRINT and RT_PRINT_DATA") > 2d15acac2354 ("rtlwifi: rtl8192se: Remove all instances of DBG_EMERG") > 4e2b4378f9d7 ("rtlwifi: rtl8723be: Remove all instances of DBG_EMERG") > a44f59d60365 ("rtlwifi: rtl8192ee: Remove all instances of DBG_EMERG") > a67005bc46d9 ("rtlwifi: rtl8723ae: Remove all instances of DBG_EMERG") > b8c79f454880 ("rtlwifi: rtl8192de: Remove all instances of DBG_EMERG") > c34df318ec9f ("rtlwifi: Convert COMP_XX entries into a proper debugging mask") > c38af3f06af4 ("rtlwifi: rtl8192cu: Remove all instances of DBG_EMERG") > e40a005652ad ("rtlwifi: rtl8192ce: Remove all instances of DBG_EMERG") > > v4.4.201: Failed to apply! Possible dependencies: > 02527a73beb3 ("rtlwifi: rtl8188ee: Remove all instances of DBG_EMERG") > 0c07bd745760 ("rtlwifi: rtl8192ee: Make driver support 64bits DMA.") > 102e295ed5a4 ("rtlwifi: Redo debugging macros RTPRINT and RT_PRINT_DATA") > 4713bd1c7407 ("rtlwifi: Add missing newlines to RT_TRACE calls") > 5345ea6a4bfb ("rtlwifi: fix error handling in *_read_adapter_info()") > 9ce221915a94 ("rtlwifi: Create _rtl_dbg_trace function to reduce RT_TRACE code size") > ad5748893b27 ("rtlwifi: Add switch variable to 'switch case not processed' messages") > b8c79f454880 ("rtlwifi: rtl8192de: Remove all instances of DBG_EMERG") > c34df318ec9f ("rtlwifi: Convert COMP_XX entries into a proper debugging mask") > c38af3f06af4 ("rtlwifi: rtl8192cu: Remove all instances of DBG_EMERG") > e40a005652ad ("rtlwifi: rtl8192ce: Remove all instances of DBG_EMERG") > > > NOTE: The patch will not be queued to stable trees until it is upstream. > > How should we proceed with this patch? Sasha, The underlying directories were moved from drivers/net/wireless/rtlwifi/ to drivers/net/wireless/realtek/rtlwifi/. I can refactor the patches to account for this change. How should I annotate them, and where should I send them? Larry
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c index 99e5cd9a5c86..1dbdddce0823 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c @@ -216,6 +216,7 @@ static struct rtl_hal_ops rtl8192de_hal_ops = { .led_control = rtl92de_led_control, .set_desc = rtl92de_set_desc, .get_desc = rtl92de_get_desc, + .is_tx_desc_closed = rtl92de_is_tx_desc_closed, .tx_polling = rtl92de_tx_polling, .enable_hw_sec = rtl92de_enable_hw_security_config, .set_key = rtl92de_set_key, diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c index b4561923a70a..92c9fb45f800 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c @@ -823,6 +823,23 @@ u64 rtl92de_get_desc(struct ieee80211_hw *hw, return ret; } +bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index) +{ + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); + struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue]; + u8 *entry = (u8 *)(&ring->desc[ring->idx]); + u8 own = (u8)rtl92de_get_desc(hw, entry, true, HW_DESC_OWN); + + /* a beacon packet will only use the first + * descriptor by defaut, and the own bit may not + * be cleared by the hardware + */ + if (own) + return false; + return true; +} + void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue) { struct rtl_priv *rtlpriv = rtl_priv(hw); diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h index 36820070fd76..635989e15282 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h @@ -715,6 +715,8 @@ void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx, u8 desc_name, u8 *val); u64 rtl92de_get_desc(struct ieee80211_hw *hw, u8 *p_desc, bool istx, u8 desc_name); +bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw, + u8 hw_queue, u16 index); void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool b_firstseg, bool b_lastseg,
In commit 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers"), a callback needed to check if the hardware has released a buffer indicating that a DMA operation is completed was not added. Fixes: 38506ecefab9 ("rtlwifi: rtl_pci: Start modification for new drivers") Cc: Stable <stable@vger.kernel.org> # v3.18+ Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> --- .../net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 1 + .../wireless/realtek/rtlwifi/rtl8192de/trx.c | 17 +++++++++++++++++ .../wireless/realtek/rtlwifi/rtl8192de/trx.h | 2 ++ 3 files changed, 20 insertions(+)