rtl8xxxu: Do not use hard-wired RF enable settings for 8723bu
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 29 Feb 2016 22:05:17 +0000 (17:05 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 10 Mar 2016 13:29:12 +0000 (15:29 +0200)
These settings simply block the 8723bu, for now leave an empty
function.

With this change we can finally communicate with aliens using the
8723bu!

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h

index 3e99a17c79626ed59945e09ccf305aece006ffca..5b6b9c5efc86901384bdddf9e5fcd1939817aea3 100644 (file)
@@ -1596,6 +1596,10 @@ static void rtl8723a_enable_rf(struct rtl8xxxu_priv *priv)
        rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
 }
 
+static void rtl8723b_enable_rf(struct rtl8xxxu_priv *priv)
+{
+}
+
 static void rtl8723a_disable_rf(struct rtl8xxxu_priv *priv)
 {
        u8 sps0;
@@ -7665,7 +7669,7 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw)
        init_usb_anchor(&priv->tx_anchor);
        init_usb_anchor(&priv->int_anchor);
 
-       rtl8723a_enable_rf(priv);
+       priv->fops->enable_rf(priv);
        if (priv->usb_interrupts) {
                ret = rtl8xxxu_submit_int_urb(hw);
                if (ret)
@@ -8031,6 +8035,7 @@ static struct rtl8xxxu_fileops rtl8723au_fops = {
        .phy_iq_calibrate = rtl8723au_phy_iq_calibrate,
        .config_channel = rtl8723au_config_channel,
        .parse_rx_desc = rtl8723au_parse_rx_desc,
+       .enable_rf = rtl8723a_enable_rf,
        .writeN_block_size = 1024,
        .mbox_ext_reg = REG_HMBOX_EXT_0,
        .mbox_ext_width = 2,
@@ -8052,6 +8057,7 @@ static struct rtl8xxxu_fileops rtl8723bu_fops = {
        .parse_rx_desc = rtl8723bu_parse_rx_desc,
        .init_aggregation = rtl8723bu_init_aggregation,
        .init_statistics = rtl8723bu_init_statistics,
+       .enable_rf = rtl8723b_enable_rf,
        .writeN_block_size = 1024,
        .mbox_ext_reg = REG_HMBOX_EXT0_8723B,
        .mbox_ext_width = 4,
@@ -8072,6 +8078,7 @@ static struct rtl8xxxu_fileops rtl8192cu_fops = {
        .phy_iq_calibrate = rtl8723au_phy_iq_calibrate,
        .config_channel = rtl8723au_config_channel,
        .parse_rx_desc = rtl8723au_parse_rx_desc,
+       .enable_rf = rtl8723a_enable_rf,
        .writeN_block_size = 128,
        .mbox_ext_reg = REG_HMBOX_EXT_0,
        .mbox_ext_width = 2,
@@ -8091,6 +8098,7 @@ static struct rtl8xxxu_fileops rtl8192eu_fops = {
        .phy_iq_calibrate = rtl8723bu_phy_iq_calibrate,
        .config_channel = rtl8723bu_config_channel,
        .parse_rx_desc = rtl8723bu_parse_rx_desc,
+       .enable_rf = rtl8723b_enable_rf,
        .writeN_block_size = 128,
        .mbox_ext_reg = REG_HMBOX_EXT0_8723B,
        .mbox_ext_width = 4,
index b75678b9b60da37fb36e6919cb8f1f32fae8d170..ac8f47f66d5f69d7f6cd7215f134806a4dfedcbd 100644 (file)
@@ -1135,6 +1135,7 @@ struct rtl8xxxu_fileops {
                              struct ieee80211_rx_status *rx_status);
        void (*init_aggregation) (struct rtl8xxxu_priv *priv);
        void (*init_statistics) (struct rtl8xxxu_priv *priv);
+       void (*enable_rf) (struct rtl8xxxu_priv *priv);
        int writeN_block_size;
        u16 mbox_ext_reg;
        char mbox_ext_width;