mac80211: fix compile warning in rt2800lib.c
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 6 Jul 2015 21:43:48 +0000 (21:43 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 6 Jul 2015 21:43:48 +0000 (21:43 +0000)
reorder some parts of the patch to remove the declaration-after-
statement warning.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 46205

package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch

index 5ddb821..b0536ce 100644 (file)
 +      u32 mac_sys_ctrl, mac_status;
 +      u32 tx_pin = 0x00150F0F;
 +      struct hw_mode_spec *spec = &rt2x00dev->spec;
++      struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
 +
 +      /* Frequeny plan setting */
 +      /*      
 +              rfcsr &= (~0x4);
 +      rt2800_rfcsr_write(rt2x00dev, 28, rfcsr);
 +
-+      struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
 +      /*if (bScan == FALSE)*/
 +      if (conf_is_ht40(conf)) {
 +              txrx_agc_fc = rt2x00_get_field8(drv_data->calibration_bw40,
                break;
        case RT5592:
                rt2800_init_bbp_5592(rt2x00dev);
-@@ -7391,6 +8037,295 @@ static void rt2800_init_rfcsr_5592(struc
+@@ -7391,6 +8037,296 @@ static void rt2800_init_rfcsr_5592(struc
        rt2800_led_open_drain_enable(rt2x00dev);
  }
  
 +{
 +      u16 freq;
 +      u8 rfvalue;
++      struct hw_mode_spec *spec = &rt2x00dev->spec;
++
 +      /* Initialize RF central register to default value */
 +      rt2800_rfcsr_write(rt2x00dev, 0, 0x02);
 +      rt2800_rfcsr_write(rt2x00dev, 1, 0x03);
 +      rt2800_rfcsr_write(rt2x00dev, 42, 0x5B);
 +      rt2800_rfcsr_write(rt2x00dev, 43, 0x00);
 +
-+      struct hw_mode_spec *spec = &rt2x00dev->spec;
 +      rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
 +      if (spec->clk_is_20mhz)
 +              rt2800_rfcsr_write(rt2x00dev, 13, 0x03);
  static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
  {
        if (rt2800_is_305x_soc(rt2x00dev)) {
-@@ -7426,7 +8361,10 @@ static void rt2800_init_rfcsr(struct rt2
+@@ -7426,7 +8362,10 @@ static void rt2800_init_rfcsr(struct rt2
                rt2800_init_rfcsr_5350(rt2x00dev);
                break;
        case RT5390:
                break;
        case RT5392:
                rt2800_init_rfcsr_5392(rt2x00dev);
-@@ -7858,6 +8796,7 @@ static int rt2800_init_eeprom(struct rt2
+@@ -7858,6 +8797,7 @@ static int rt2800_init_eeprom(struct rt2
        case RF5390:
        case RF5392:
        case RF5592:
                break;
        default:
                rt2x00_err(rt2x00dev, "Invalid RF chipset 0x%04x detected\n",
-@@ -8422,6 +9361,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -8422,6 +9362,7 @@ static int rt2800_probe_hw_mode(struct r
        case RF5372:
        case RF5390:
        case RF5392:
                spec->num_channels = 14;
                if (spec->clk_is_20mhz)
                        spec->channels = rf_vals_xtal20mhz_3x;
-@@ -8562,6 +9502,7 @@ static int rt2800_probe_hw_mode(struct r
+@@ -8562,6 +9503,7 @@ static int rt2800_probe_hw_mode(struct r
        case RF5372:
        case RF5390:
        case RF5392: