]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8192e: rtl8192_phy_checkBBAndRF(): Don't check MAC
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Sun, 31 May 2015 18:19:49 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 21:33:22 +0000 (06:33 +0900)
This function never supported checking of MAC block.
Instead of printing several warnings - print it once and exit.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c

index 0765c97e06a87734474ae148a3e1a106e69d4537..6c4832c8009b9c57ced7ca24ec3b6a5a63dc087d 100644 (file)
@@ -504,13 +504,15 @@ bool rtl8192_phy_checkBBAndRF(struct net_device *dev,
        WriteAddr[HW90_BLOCK_RF] = 0x3;
        RT_TRACE(COMP_PHY, "=======>%s(), CheckBlock:%d\n", __func__,
                 CheckBlock);
+
+       if (CheckBlock == HW90_BLOCK_MAC) {
+               netdev_warn(dev, "%s(): No checks available for MAC block.\n",
+                           __func__);
+               return ret;
+       }
+
        for (i = 0; i < CheckTimes; i++) {
                switch (CheckBlock) {
-               case HW90_BLOCK_MAC:
-                       RT_TRACE(COMP_ERR,
-                                "PHY_CheckBBRFOK(): Never Write 0x100 here!");
-                       break;
-
                case HW90_BLOCK_PHY0:
                case HW90_BLOCK_PHY1:
                        write_nic_dword(dev, WriteAddr[CheckBlock],