rtw88: fix uninitialized 'tim_offset' warning
Ping-Ke Shih
maintainerPATCH 1/2 rtw88: fix uninitialized 'tim_offset' warning
From: Po-Hao Huang <[email protected]>
This avoids below warning and makes compiler happy.
error: uninitialized symbol 'tim_offset'
--- drivers/net/wireless/realtek/rtw88/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/fw.c +1 -1
@@ -1047,7 +1047,7 @@ static struct sk_buff *rtw_get_rsvd_page_skb(struct ieee80211_hw *hw,struct rtw_vif *rtwvif;struct sk_buff *skb_new;struct cfg80211_ssid *ssid; -u16 tim_offset; +u16 tim_offset =0 ;if (rsvd_pkt->type ==RSVD_DUMMY ) { skb_new =alloc_skb (1 ,GFP_KERNEL );
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 2/2 rtw88: pci: 8821c: Disable 21ce completion timeout
From: Po-Hao Huang <[email protected]>
Disable this capability to avoid timeout errors on certain platforms. Without it, pci bus might stuck and leads to disconnection.
--- drivers/net/wireless/realtek/rtw88/pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/net/wireless/realtek/rtw88/pci.c +12 -0
@@ -1482,12 +1482,15 @@ static void rtw_pci_interface_cfg(struct rtw_dev *rtwdev)static void rtw_pci_phy_cfg (struct rtw_dev *rtwdev) { +struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;struct rtw_chip_info *chip = rtwdev->chip; +struct pci_dev *pdev = rtwpci->pdev;const struct rtw_intf_phy_para *para;u16 cut;u16 value;u16 offset;int i; +int ret; cut =BIT (0 ) << rtwdev->hal.cut_version;
@@ -1520,6 +1523,15 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev) }rtw_pci_link_cfg (rtwdev); + +/* Disable 8821ce completion timeout by default */ +if (chip->id ==RTW_CHIP_TYPE_8821C ) { + ret =pcie_capability_set_word (pdev,PCI_EXP_DEVCTL2 , +PCI_EXP_DEVCTL2_COMP_TMOUT_DIS ); +if (ret) +rtw_err (rtwdev,"failed to set PCI cap, ret = %d\n" , + ret); + } }static int __maybe_unused rtw_pci_suspend (struct device *dev)
Signature · 1 line
2.25.1
Re: [PATCH 2/2] rtw88: pci: 8821c: Disable 21ce completion timeout
Quoted 8 lines · Ping-Ke Shih
From: Po-Hao Huang <[email protected]>
Disable this capability to avoid timeout errors on certain platforms. Without it, pci bus might stuck and leads to disconnection.
Signed-off-by Po-Hao Huang <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>---
Quoted 39 lines
drivers/net/wireless/realtek/rtw88/pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/net/wireless/realtek/rtw88/pci.c +12
-0@@ -1482,12 +1482,15 @@ static void rtw_pci_interface_cfg(struct rtw_dev *rtwdev)static void rtw_pci_phy_cfg (struct rtw_dev *rtwdev) { +struct rtw_pci *rtwpci = (struct rtw_pci *)rtwdev->priv;struct rtw_chip_info *chip = rtwdev->chip; +struct pci_dev *pdev = rtwpci->pdev;const struct rtw_intf_phy_para *para;u16 cut;u16 value;u16 offset;int i; +int ret; cut =BIT (0 ) << rtwdev->hal.cut_version;@@ -1520,6 +1523,15 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev) }rtw_pci_link_cfg (rtwdev); + +/* Disable 8821ce completion timeout by default */ +if (chip->id ==RTW_CHIP_TYPE_8821C ) { + ret =pcie_capability_set_word (pdev,PCI_EXP_DEVCTL2 , +PCI_EXP_DEVCTL2_COMP_TMOUT_DIS ); +if (ret) +rtw_err (rtwdev,"failed to set PCI cap, ret = %d\n" , + ret); + } }static int __maybe_unused rtw_pci_suspend (struct device *dev)
Quoted 7 lines · Ping-Ke Shih
From: Po-Hao Huang <[email protected]>
This avoids below warning and makes compiler happy.
error: uninitialized symbol 'tim_offset'Signed-off-by Po-Hao Huang <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
2 patches applied to wireless-next.git, thanks.
9cbdadf0097f rtw88: fix uninitialized 'tim_offset' warning 9ebacb1e7e75 rtw88: pci: 8821c: Disable 21ce completion timeout
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches