We do not want to partially change chanspec just to find out there is not
entry in table for given channel.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
 
        if (dev->phy.rev >= 3) {
                /* TODO */
+       } else {
+               tabent = b43_nphy_get_chantabent(dev, channel);
+               if (!tabent)
+                       return -ESRCH;
        }
 
        nphy->radio_chanspec = chanspec;
                /* TODO: PHY Radio2056 Setup (chan_info_ptr[i]) */
                /* TODO: N PHY Chanspec Setup (chan_info_ptr[i]) */
        } else {
-               tabent = b43_nphy_get_chantabent(dev, channel);
-               if (!tabent)
-                       return -ESRCH;
-
                tmp = (chanspec.b_freq == 1) ? 0x0020 : 0x0050;
                b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp);
                b43_radio_2055_setup(dev, tabent);