kernel: add missing config symbols
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 652-0043-rtl8xxxu-Disable-packet-DMA-aggregation-on-8188eu.patch
1 From 17cb73ae89e15b60276f0b6583d4ed30b6bdeb4f Mon Sep 17 00:00:00 2001
2 From: Jes Sorensen <Jes.Sorensen@redhat.com>
3 Date: Wed, 10 Aug 2016 15:41:13 -0400
4 Subject: [PATCH] rtl8xxxu: Disable packet DMA aggregation on 8188eu
5
6 For now disable packet DMA aggregation on the 8188eu, rather then
7 risking the feature being left on by the init tables.
8
9 Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
10 ---
11 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c | 14 ++++++++++++++
12 1 file changed, 14 insertions(+)
13
14 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
15 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c
16 @@ -345,6 +345,19 @@ rtl8188e_set_tx_power(struct rtl8xxxu_pr
17 rtl8xxxu_write32(priv, REG_TX_AGC_A_MCS15_MCS12, mcs);
18 }
19
20 +void rtl8188eu_init_aggregation(struct rtl8xxxu_priv *priv)
21 +{
22 + u8 agg_ctrl, usb_spec;
23 +
24 + usb_spec = rtl8xxxu_read8(priv, REG_USB_SPECIAL_OPTION);
25 + usb_spec &= ~USB_SPEC_USB_AGG_ENABLE;
26 + rtl8xxxu_write8(priv, REG_USB_SPECIAL_OPTION, usb_spec);
27 +
28 + agg_ctrl = rtl8xxxu_read8(priv, REG_TRXDMA_CTRL);
29 + agg_ctrl &= ~TRXDMA_CTRL_RXDMA_AGG_EN;
30 + rtl8xxxu_write8(priv, REG_TRXDMA_CTRL, agg_ctrl);
31 +}
32 +
33 static int rtl8188eu_parse_efuse(struct rtl8xxxu_priv *priv)
34 {
35 struct rtl8188eu_efuse *efuse = &priv->efuse_wifi.efuse8188eu;
36 @@ -1107,6 +1120,7 @@ struct rtl8xxxu_fileops rtl8188eu_fops =
37 .phy_iq_calibrate = rtl8188eu_phy_iq_calibrate,
38 .config_channel = rtl8xxxu_gen1_config_channel,
39 .parse_rx_desc = rtl8xxxu_parse_rxdesc16,
40 + .init_aggregation = rtl8188eu_init_aggregation,
41 .enable_rf = rtl8188e_enable_rf,
42 .disable_rf = rtl8188e_disable_rf,
43 .usb_quirks = rtl8188e_usb_quirks,