From: Ping-Ke Shih Date: Wed, 1 Nov 2017 15:29:19 +0000 (-0500) Subject: rtlwifi: rtl_pci: Add support for 8822be TX/RX BD X-Git-Tag: v4.19~2168^2~50^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57869e4ba77a75714ffcec628c9c440baaafa836;p=platform%2Fkernel%2Flinux-rpi.git rtlwifi: rtl_pci: Add support for 8822be TX/RX BD The number of TX/RX BD desc for 8822BE is 512. The TX/RX BD architecture of 8822BE is the same as 8192EE. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index 01c65c8..e8c8ce6 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -1140,6 +1140,8 @@ static void _rtl_pci_init_trx_var(struct ieee80211_hw *hw) if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192EE) desc_num = TX_DESC_NUM_92E; + else if (rtlhal->hw_type == HARDWARE_TYPE_RTL8822BE) + desc_num = TX_DESC_NUM_8822B; else desc_num = RT_TXDESC_NUM; @@ -1981,11 +1983,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, } } - /* 92ee use new trx flow */ - if (rtlhal->hw_type == HARDWARE_TYPE_RTL8192EE) + switch (rtlhal->hw_type) { + case HARDWARE_TYPE_RTL8192EE: + case HARDWARE_TYPE_RTL8822BE: + /* use new trx flow */ rtlpriv->use_new_trx_flow = true; - else + break; + + default: rtlpriv->use_new_trx_flow = false; + break; + } /*find bus info */ pcipriv->ndis_adapter.busnumber = pdev->bus->number; diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.h b/drivers/net/wireless/realtek/rtlwifi/pci.h index e331f5a..0f1a0f85 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.h +++ b/drivers/net/wireless/realtek/rtlwifi/pci.h @@ -39,6 +39,7 @@ #define RT_TXDESC_NUM 128 #define TX_DESC_NUM_92E 512 +#define TX_DESC_NUM_8822B 512 #define RT_TXDESC_NUM_BE_QUEUE 256 #define BK_QUEUE 0