staging: vt6656: Create new function to set led state.
authorMalcolm Priestley <tvboxspy@gmail.com>
Mon, 26 May 2014 12:59:04 +0000 (13:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 May 2014 17:36:49 +0000 (10:36 -0700)
Create vnt_mac_set_led to set state and led.

state has two modes LEDSTS_TMLEN which sets the blink rate
on TX activity and LEDSTS_STS which sets the led.

As result of this patch ControlvMaskByte becomes dead code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/iwctl.c
drivers/staging/vt6656/mac.c
drivers/staging/vt6656/mac.h
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/wcmd.c
drivers/staging/vt6656/wmgr.c

index 5f631c8..12b6436 100644 (file)
@@ -1015,10 +1015,10 @@ void BSSvSecondCallBack(struct work_struct *work)
                                pMgmt->eCurrState = WMAC_STATE_IDLE;
                                netif_stop_queue(pDevice->dev);
                                pDevice->bLinkPass = false;
-                               ControlvMaskByte(pDevice,
-                                                MESSAGE_REQUEST_MACREG,
-                                                MAC_REG_PAPEDELAY, LEDSTS_STS,
-                                                LEDSTS_SLOW);
+
+                               vnt_mac_set_led(pDevice, LEDSTS_STS,
+                                                               LEDSTS_SLOW);
+
                                pDevice->bRoaming = true;
                                pDevice->bIsRoaming = false;
 
@@ -1126,10 +1126,8 @@ void BSSvSecondCallBack(struct work_struct *work)
                                pMgmt->eCurrState = WMAC_STATE_STARTED;
                                netif_stop_queue(pDevice->dev);
                                pDevice->bLinkPass = false;
-                               ControlvMaskByte(pDevice,
-                                                MESSAGE_REQUEST_MACREG,
-                                                MAC_REG_PAPEDELAY, LEDSTS_STS,
-                                                LEDSTS_SLOW);
+                               vnt_mac_set_led(pDevice, LEDSTS_STS,
+                                                               LEDSTS_SLOW);
                        }
                }
        }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge