enum bcm_led_events currdriverstate,
ulong *timeout)
{
- bool bBlinkBothLED = TRUE;
-
/*
- * Blink Tx and Rx LED when both Tx and Rx is
- * in normal bandwidth
+ * Assign minimum number of blinks of
+ * either Tx or Rx.
*/
- if (bBlinkBothLED) {
- /*
- * Assign minimum number of blinks of
- * either Tx or Rx.
- */
- if (*num_of_time_tx > *num_of_time_rx)
- *num_of_time = *num_of_time_rx;
- else
- *num_of_time = *num_of_time_tx;
- if (*num_of_time > 0) {
- /* Blink both Tx and Rx LEDs */
- if (LED_Blink(ad, 1 << GPIO_Num_tx,
- uiTxLedIndex, *timeout,
- *num_of_time, currdriverstate)
- == EVENT_SIGNALED)
- return EVENT_SIGNALED;
-
- if (LED_Blink(ad, 1 << GPIO_Num_rx,
- uiRxLedIndex, *timeout,
- *num_of_time, currdriverstate)
- == EVENT_SIGNALED)
- return EVENT_SIGNALED;
+ if (*num_of_time_tx > *num_of_time_rx)
+ *num_of_time = *num_of_time_rx;
+ else
+ *num_of_time = *num_of_time_tx;
+ if (*num_of_time > 0) {
+ /* Blink both Tx and Rx LEDs */
+ if (LED_Blink(ad, 1 << GPIO_Num_tx,
+ uiTxLedIndex, *timeout,
+ *num_of_time, currdriverstate)
+ == EVENT_SIGNALED)
+ return EVENT_SIGNALED;
- }
+ if (LED_Blink(ad, 1 << GPIO_Num_rx,
+ uiRxLedIndex, *timeout,
+ *num_of_time, currdriverstate)
+ == EVENT_SIGNALED)
+ return EVENT_SIGNALED;
- if (*num_of_time == *num_of_time_tx) {
- /* Blink pending rate of Rx */
- if (LED_Blink(ad, (1 << GPIO_Num_rx),
- uiRxLedIndex, *timeout,
- *num_of_time_rx - *num_of_time,
- currdriverstate)
- == EVENT_SIGNALED)
- return EVENT_SIGNALED;
+ }
- *num_of_time = *num_of_time_rx;
- } else {
- /* Blink pending rate of Tx */
- if (LED_Blink(ad, 1 << GPIO_Num_tx,
- uiTxLedIndex, *timeout,
- *num_of_time_tx - *num_of_time,
- currdriverstate)
- == EVENT_SIGNALED)
- return EVENT_SIGNALED;
+ if (*num_of_time == *num_of_time_tx) {
+ /* Blink pending rate of Rx */
+ if (LED_Blink(ad, (1 << GPIO_Num_rx),
+ uiRxLedIndex, *timeout,
+ *num_of_time_rx - *num_of_time,
+ currdriverstate)
+ == EVENT_SIGNALED)
+ return EVENT_SIGNALED;
- *num_of_time = *num_of_time_tx;
- }
+ *num_of_time = *num_of_time_rx;
} else {
- if (*num_of_time == *num_of_time_tx) {
- /* Blink pending rate of Rx */
- if (LED_Blink(ad, 1 << GPIO_Num_tx,
- uiTxLedIndex, *timeout,
- *num_of_time, currdriverstate)
- == EVENT_SIGNALED)
- return EVENT_SIGNALED;
- } else {
- /* Blink pending rate of Tx */
- if (LED_Blink(ad, 1 << GPIO_Num_rx,
- uiRxLedIndex, *timeout,
- *num_of_time, currdriverstate)
- == EVENT_SIGNALED)
- return EVENT_SIGNALED;
- }
+ /* Blink pending rate of Tx */
+ if (LED_Blink(ad, 1 << GPIO_Num_tx,
+ uiTxLedIndex, *timeout,
+ *num_of_time_tx - *num_of_time,
+ currdriverstate)
+ == EVENT_SIGNALED)
+ return EVENT_SIGNALED;
+
+ *num_of_time = *num_of_time_tx;
}
return 0;