Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / net / wireless / b43 / main.c
index c4d0cc582555f0a86e9e925d5e11ecf266c63370..d377f77d30b536de0ddaeb1ed9cef382619ccfa6 100644 (file)
@@ -1310,17 +1310,19 @@ static u32 b43_jssi_read(struct b43_wldev *dev)
 {
        u32 val = 0;
 
-       val = b43_shm_read16(dev, B43_SHM_SHARED, 0x08A);
+       val = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI1);
        val <<= 16;
-       val |= b43_shm_read16(dev, B43_SHM_SHARED, 0x088);
+       val |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI0);
 
        return val;
 }
 
 static void b43_jssi_write(struct b43_wldev *dev, u32 jssi)
 {
-       b43_shm_write16(dev, B43_SHM_SHARED, 0x088, (jssi & 0x0000FFFF));
-       b43_shm_write16(dev, B43_SHM_SHARED, 0x08A, (jssi & 0xFFFF0000) >> 16);
+       b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI0,
+                       (jssi & 0x0000FFFF));
+       b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_JSSI1,
+                       (jssi & 0xFFFF0000) >> 16);
 }
 
 static void b43_generate_noise_sample(struct b43_wldev *dev)
@@ -1623,7 +1625,7 @@ static void b43_upload_beacon0(struct b43_wldev *dev)
 
        if (wl->beacon0_uploaded)
                return;
-       b43_write_beacon_template(dev, 0x68, 0x18);
+       b43_write_beacon_template(dev, B43_SHM_SH_BT_BASE0, B43_SHM_SH_BTL0);
        wl->beacon0_uploaded = true;
 }
 
@@ -1633,7 +1635,7 @@ static void b43_upload_beacon1(struct b43_wldev *dev)
 
        if (wl->beacon1_uploaded)
                return;
-       b43_write_beacon_template(dev, 0x468, 0x1A);
+       b43_write_beacon_template(dev, B43_SHM_SH_BT_BASE1, B43_SHM_SH_BTL1);
        wl->beacon1_uploaded = true;
 }
 
@@ -2780,9 +2782,7 @@ static int b43_gpio_init(struct b43_wldev *dev)
        switch (dev->dev->bus_type) {
 #ifdef CONFIG_B43_BCMA
        case B43_BUS_BCMA:
-               bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL,
-                               (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc,
-                                       BCMA_CC_GPIOCTL) & ~mask) | set);
+               bcma_chipco_gpio_control(&dev->dev->bdev->bus->drv_cc, mask, set);
                break;
 #endif
 #ifdef CONFIG_B43_SSB
@@ -2807,8 +2807,7 @@ static void b43_gpio_cleanup(struct b43_wldev *dev)
        switch (dev->dev->bus_type) {
 #ifdef CONFIG_B43_BCMA
        case B43_BUS_BCMA:
-               bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL,
-                               0);
+               bcma_chipco_gpio_control(&dev->dev->bdev->bus->drv_cc, ~0, 0);
                break;
 #endif
 #ifdef CONFIG_B43_SSB
@@ -3116,7 +3115,7 @@ static int b43_chip_init(struct b43_wldev *dev)
 
        /* Probe Response Timeout value */
        /* FIXME: Default to 0, has to be set by ioctl probably... :-/ */
-       b43_shm_write16(dev, B43_SHM_SHARED, 0x0074, 0x0000);
+       b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_PRMAXTIME, 0);
 
        /* Initially set the wireless operation mode. */
        b43_adjust_opmode(dev);
@@ -3853,7 +3852,7 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
        dev = wl->current_dev;
 
        /* Switch the band (if necessary). This might change the active core. */
-       err = b43_switch_band(wl, conf->channel);
+       err = b43_switch_band(wl, conf->chandef.chan);
        if (err)
                goto out_unlock_mutex;
 
@@ -3883,8 +3882,8 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
 
        /* Switch to the requested channel.
         * The firmware takes care of races with the TX handler. */
-       if (conf->channel->hw_value != phy->channel)
-               b43_switch_channel(dev, conf->channel->hw_value);
+       if (conf->chandef.chan->hw_value != phy->channel)
+               b43_switch_channel(dev, conf->chandef.chan->hw_value);
 
        dev->wl->radiotap_enabled = !!(conf->flags & IEEE80211_CONF_MONITOR);
 
@@ -5007,7 +5006,7 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
        if (idx != 0)
                return -ENOENT;
 
-       survey->channel = conf->channel;
+       survey->channel = conf->chandef.chan;
        survey->filled = SURVEY_INFO_NOISE_DBM;
        survey->noise = dev->stats.link_noise;