staging: vt6655: set_channel replace parameter with ieee80211_channel
authorMalcolm Priestley <tvboxspy@gmail.com>
Mon, 19 Jan 2015 18:24:10 +0000 (18:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:16 +0000 (19:59 +0800)
replacing uConnectionChannel for hw_value as set in vnt_init_bands.

This allows other signaling of ieee80211_channel to move deeper into
driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/channel.c
drivers/staging/vt6655/channel.h
drivers/staging/vt6655/device_main.c

index d593f5f602b843c7a94e3cc6638c647644cde528..3fc09f4b3842d82f74ddf5670ea798451b5157d7 100644 (file)
@@ -174,12 +174,12 @@ void vnt_init_bands(struct vnt_private *priv)
  * Return Value: true if succeeded; false if failed.
  *
  */
-bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
+bool set_channel(void *pDeviceHandler, struct ieee80211_channel *ch)
 {
        struct vnt_private *pDevice = pDeviceHandler;
        bool bResult = true;
 
-       if (pDevice->byCurrentCh == uConnectionChannel)
+       if (pDevice->byCurrentCh == ch->hw_value)
                return bResult;
 
        /* Set VGA to max sensitivity */
@@ -197,15 +197,15 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
 
        if (pDevice->byRFType == RF_AIROHA7230)
                RFbAL7230SelectChannelPostProcess(pDevice, pDevice->byCurrentCh,
-                                                 (unsigned char)uConnectionChannel);
+                                                 (unsigned char)ch->hw_value);
 
-       pDevice->byCurrentCh = (unsigned char)uConnectionChannel;
+       pDevice->byCurrentCh = (unsigned char)ch->hw_value;
        bResult &= RFbSelectChannel(pDevice, pDevice->byRFType,
-                                   (unsigned char)uConnectionChannel);
+                                   (unsigned char)ch->hw_value);
 
        /* Init Synthesizer Table */
        if (pDevice->bEnablePSMode)
-               RFvWriteWakeProgSyn(pDevice, pDevice->byRFType, uConnectionChannel);
+               RFvWriteWakeProgSyn(pDevice, pDevice->byRFType, ch->hw_value);
 
        BBvSoftwareReset(pDevice);
 
index 4f4264e23462826463b0b7152e4a2d6af2af3a73..e2be6fca5f26d7d5e29c4699e051707b7a6da382 100644 (file)
@@ -27,6 +27,6 @@
 
 void vnt_init_bands(struct vnt_private *);
 
-bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel);
+bool set_channel(void *pDeviceHandler, struct ieee80211_channel *);
 
 #endif /* _CHANNEL_H_ */
index e5ed9e6a2e66e0336588ef172c8fa0caede895ee..05be34b62f7485a766e1b640db0246f4c9f75073 100644 (file)
@@ -1420,7 +1420,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)
 
        if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) ||
            (conf->flags & IEEE80211_CONF_OFFCHANNEL)) {
-               set_channel(priv, conf->chandef.chan->hw_value);
+               set_channel(priv, conf->chandef.chan);
 
                if (conf->chandef.chan->band == IEEE80211_BAND_5GHZ)
                        bb_type = BB_TYPE_11A;