From: Greg Kroah-Hartman <[EMAIL PROTECTED]>

Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---

 zd_chip.c |   35 +++++++++++++++++++++++++----------
 zd_mac.c  |   36 ++++++++++++++++++++++++------------
 zd_rf.c   |    6 ++++--
 zd_usb.c  |   61 ++++++++++++++++++++++++++++++++++++++++++++-----------------
 4 files changed, 97 insertions(+), 41 deletions(-)

509cb7e43300aa1833293e7a6386765838783fbc
diff --git a/zd_chip.c b/zd_chip.c
index b72a188..1e257f1 100644
--- a/zd_chip.c
+++ b/zd_chip.c
@@ -1067,11 +1067,17 @@ int zd_chip_led_status(struct zd_chip *c
        case LED_STATUS:
                return (reg & mask) ? LED_ON : LED_OFF;
        case LED_OFF:
-               reg &= ~mask; ret = LED_OFF; break;
+               reg &= ~mask;
+               ret = LED_OFF;
+               break;
        case LED_FLIP:
-               reg ^= mask; ret = (reg&mask) ? LED_ON : LED_OFF; break;
+               reg ^= mask;
+               ret = (reg&mask) ? LED_ON : LED_OFF;
+               break;
        case LED_ON:
-               reg |= mask; ret = LED_ON; break;
+               reg |= mask;
+               ret = LED_ON;
+               break;
        default:
                return -EINVAL;
        }
@@ -1208,14 +1214,19 @@ static int to_dB(u32 x, u8 rate)
        case ZD_OFDM_RATE_6M:
        case ZD_OFDM_RATE_12M:
        case ZD_OFDM_RATE_24M:
-               x /= 2; break;
+               x /= 2;
+               break;
        case ZD_OFDM_RATE_9M:
        case ZD_OFDM_RATE_18M:
        case ZD_OFDM_RATE_36M:
        case ZD_OFDM_RATE_54M:
-               x *= 3; x /= 4; break;
+               x *= 3;
+               x /= 4;
+               break;
        case ZD_OFDM_RATE_48M:
-               x *= 2; x /= 3; break;
+               x *= 2;
+               x /= 3;
+               break;
        default:
                return -EINVAL;
        }
@@ -1229,16 +1240,20 @@ static int to_dB(u32 x, u8 rate)
        switch (rate) {
        case ZD_OFDM_RATE_6M:
        case ZD_OFDM_RATE_9M:
-               i += 3; break;
+               i += 3;
+               break;
        case ZD_OFDM_RATE_12M:
        case ZD_OFDM_RATE_18M:
-               i += 5; break;
+               i += 5;
+               break;
        case ZD_OFDM_RATE_24M:
        case ZD_OFDM_RATE_36M:
-               i += 9; break;
+               i += 9;
+               break;
        case ZD_OFDM_RATE_48M:
        case ZD_OFDM_RATE_54M:
-               i += 15; break;
+               i += 15;
+               break;
        }
 
        return i;
diff --git a/zd_mac.c b/zd_mac.c
index 0537078..2b39652 100644
--- a/zd_mac.c
+++ b/zd_mac.c
@@ -313,17 +313,28 @@ static u8 cs_typed_rate(u8 cs_rate)
 static u8 rate_to_cs_rate(u8 rate)
 {
        switch (rate) {
-       case IEEE80211_CCK_RATE_2MB: return ZD_CS_CCK_RATE_2M;
-       case IEEE80211_CCK_RATE_5MB: return ZD_CS_CCK_RATE_5_5M;
-       case IEEE80211_CCK_RATE_11MB: return ZD_CS_CCK_RATE_11M;
-       case IEEE80211_OFDM_RATE_6MB: return ZD_OFDM_RATE_6M;
-       case IEEE80211_OFDM_RATE_9MB: return ZD_OFDM_RATE_9M;
-       case IEEE80211_OFDM_RATE_12MB: return ZD_OFDM_RATE_12M;
-       case IEEE80211_OFDM_RATE_18MB: return ZD_OFDM_RATE_18M;
-       case IEEE80211_OFDM_RATE_24MB: return ZD_OFDM_RATE_24M;
-       case IEEE80211_OFDM_RATE_36MB: return ZD_OFDM_RATE_36M;
-       case IEEE80211_OFDM_RATE_48MB: return ZD_OFDM_RATE_48M;
-       case IEEE80211_OFDM_RATE_54MB: return ZD_OFDM_RATE_54M;
+       case IEEE80211_CCK_RATE_2MB:
+               return ZD_CS_CCK_RATE_2M;
+       case IEEE80211_CCK_RATE_5MB:
+               return ZD_CS_CCK_RATE_5_5M;
+       case IEEE80211_CCK_RATE_11MB:
+               return ZD_CS_CCK_RATE_11M;
+       case IEEE80211_OFDM_RATE_6MB:
+               return ZD_OFDM_RATE_6M;
+       case IEEE80211_OFDM_RATE_9MB:
+               return ZD_OFDM_RATE_9M;
+       case IEEE80211_OFDM_RATE_12MB:
+               return ZD_OFDM_RATE_12M;
+       case IEEE80211_OFDM_RATE_18MB:
+               return ZD_OFDM_RATE_18M;
+       case IEEE80211_OFDM_RATE_24MB:
+               return ZD_OFDM_RATE_24M;
+       case IEEE80211_OFDM_RATE_36MB:
+               return ZD_OFDM_RATE_36M;
+       case IEEE80211_OFDM_RATE_48MB:
+               return ZD_OFDM_RATE_48M;
+       case IEEE80211_OFDM_RATE_54MB:
+               return ZD_OFDM_RATE_54M;
        }
        return ZD_CS_CCK_RATE_1M;
 }
@@ -565,7 +576,8 @@ static void cs_set_modulation(struct zd_
                case IEEE80211_STYPE_PROBE_REQ:
                case IEEE80211_STYPE_PROBE_RESP:
                case IEEE80211_STYPE_PSPOLL:
-                       cs_rate = ZD_CS_CCK_RATE_1M; break;
+                       cs_rate = ZD_CS_CCK_RATE_1M;
+                       break;
                default:
                        cs_rate = get_max_basic_rate(mac);
                }
diff --git a/zd_rf.c b/zd_rf.c
index 4dc1b44..94f50bc 100644
--- a/zd_rf.c
+++ b/zd_rf.c
@@ -67,9 +67,11 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 t
        ZD_ASSERT(mutex_is_locked(&chip->mutex));
        switch (type) {
        case RF2959_RF:
-               zd_rf_init_rf2959(rf); break;
+               zd_rf_init_rf2959(rf);
+               break;
        case AL2230_RF:
-               zd_rf_init_al2230(rf); break;
+               zd_rf_init_al2230(rf);
+               break;
        default:
                PERROR("RF %s %#x is not supported.", zd_rf_name(type), type);
                rf->type = 0;
diff --git a/zd_usb.c b/zd_usb.c
index 7c2b9b7..30b8ca6 100644
--- a/zd_usb.c
+++ b/zd_usb.c
@@ -118,9 +118,15 @@ static u16 usb_addr(struct zd_usb *usb, 
 #endif
 
        switch (base) {
-       case CR_BASE:   offset += CR_BASE_OFFSET; break;
-       case E2P_BASE:  offset += E2P_BASE_OFFSET; break;
-       case FW_BASE:   offset += usb->fw_base_offset; break;
+       case CR_BASE:
+               offset += CR_BASE_OFFSET;
+               break;
+       case E2P_BASE:
+               offset += E2P_BASE_OFFSET;
+               break;
+       case FW_BASE:
+               offset += usb->fw_base_offset;
+               break;
        }
 
        PDEBUGFG("usb offset %#06x from address %#010x", offset, addr);
@@ -139,11 +145,21 @@ static void print_endpoint_descriptor(in
        in = desc->bEndpointAddress & USB_DIR_IN;
 
        switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
-       case USB_ENDPOINT_XFER_CONTROL: xfer_type = "control"; break;
-       case USB_ENDPOINT_XFER_ISOC:    xfer_type = "isoc"; break;
-       case USB_ENDPOINT_XFER_BULK:    xfer_type = "bulk"; break;
-       case USB_ENDPOINT_XFER_INT:     xfer_type = "int"; break;
-       default:                        xfer_type = "unknown"; break;
+       case USB_ENDPOINT_XFER_CONTROL:
+               xfer_type = "control";
+               break;
+       case USB_ENDPOINT_XFER_ISOC:
+               xfer_type = "isoc";
+               break;
+       case USB_ENDPOINT_XFER_BULK:
+               xfer_type = "bulk";
+               break;
+       case USB_ENDPOINT_XFER_INT:
+               xfer_type = "int";
+               break;
+       default:
+               xfer_type = "unknown";
+               break;
        };
 
        PDEBUG("ep%d %s xfer %s max size %u",
@@ -389,8 +405,12 @@ static void int_urb_complete(struct urb 
        }
 
        switch (hdr->id) {
-       case USB_INT_ID_REGS: handle_regs_int(urb); break;
-       case USB_INT_ID_RETRY_FAILED: handle_retry_failed_int(urb); break;
+       case USB_INT_ID_REGS:
+               handle_regs_int(urb);
+               break;
+       case USB_INT_ID_RETRY_FAILED:
+               handle_retry_failed_int(urb);
+               break;
        default:
                PDEBUGF("error: urb %p unknown id %x", urb,
                        (unsigned int)hdr->id);
@@ -412,9 +432,10 @@ kfree:
 static inline int int_urb_interval(struct usb_device *udev)
 {
        switch (udev->speed) {
-       case USB_SPEED_HIGH: return 4;
+       case USB_SPEED_HIGH:
+               return 4;
        case USB_SPEED_LOW:
-                            return 10;
+               return 10;
        case USB_SPEED_FULL:
        default:
                return 1;
@@ -801,10 +822,14 @@ void zd_usb_clear(struct zd_usb *usb)
 static const char *speed(enum usb_device_speed speed)
 {
        switch (speed) {
-       case USB_SPEED_LOW: return "low";
-       case USB_SPEED_FULL: return "full";
-       case USB_SPEED_HIGH: return "high";
-       default: return "unknown speed";
+       case USB_SPEED_LOW:
+               return "low";
+       case USB_SPEED_FULL:
+               return "full";
+       case USB_SPEED_HIGH:
+               return "high";
+       default:
+               return "unknown speed";
        }
 }
 
@@ -843,7 +868,9 @@ static int probe(struct usb_interface *i
        print_id(udev);
 
        switch (udev->speed) {
-       case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH:
+       case USB_SPEED_LOW:
+       case USB_SPEED_FULL:
+       case USB_SPEED_HIGH:
                break;
        default:
                PDEBUGF("Unknown USB speed");
-- 
1.2.6



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Zd1211-devs mailing list - http://zd1211.ath.cx/
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs

Reply via email to