aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/device_main.c
diff options
context:
space:
mode:
authorCharles Clément <caratorn@gmail.com>2010-06-21 10:39:51 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-22 15:39:58 -0700
commit79566eb2df013f0ed20e548f4be0f8afbe78f9a3 (patch)
treede21b0c37eded01d1dd8f2bda4ad2e6a74c32be7 /drivers/staging/vt6655/device_main.c
parent2a1a17498bcaea1580a4fa051286bc97d4c5e730 (diff)
downloadkernel_samsung_smdk4412-79566eb2df013f0ed20e548f4be0f8afbe78f9a3.zip
kernel_samsung_smdk4412-79566eb2df013f0ed20e548f4be0f8afbe78f9a3.tar.gz
kernel_samsung_smdk4412-79566eb2df013f0ed20e548f4be0f8afbe78f9a3.tar.bz2
Staging: vt6655: move channel mapping code from card.c to channel.c
Move functions managing the channel mapping to a new channel.c file, as done in the staging VT6656 driver. The function names contained in card.c were prefixed with CARD followed by the first letter of the return code, remove this and use more coherent function names. The following functions moved and were renamed: ChannelValid -> is_channel_valid CARDbSetChannel -> set_channel CARDvInitChannelTable -> init_channel_table CARDbyGetChannelMapping -> get_channel_mapping CARDvSetCountryInfo -> set_country_info CARDbySetSupportChannels -> set_support_channels CARDbChannelGetList -> channel_get_list CARDvSetCountryIE -> set_country_IE CARDbGetChannelMapInfo -> get_channel_map_info CARDvSetChannelMapInfo -> set_channel_map_info CARDvClearChannelMapInfo -> clear_channel_map_info CARDbyAutoChannelSelect -> auto_channel_select CARDbyGetChannelNumber -> get_channel_number Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655/device_main.c')
-rw-r--r--drivers/staging/vt6655/device_main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index bd27a95..090cc94 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -62,6 +62,7 @@
#include "device.h"
#include "card.h"
+#include "channel.h"
#include "baseband.h"
#include "mac.h"
#include "tether.h"
@@ -730,7 +731,7 @@ else
pDevice->abyOFDMPwrTbl[ii+CB_MAX_CHANNEL_24G+1] = SROMbyReadEmbedded(pDevice->PortOffset, (BYTE)(ii + EEP_OFS_OFDMA_PWR_TBL));
pDevice->abyOFDMDefaultPwr[ii+CB_MAX_CHANNEL_24G+1] = SROMbyReadEmbedded(pDevice->PortOffset, (BYTE)(ii + EEP_OFS_OFDMA_PWR_dBm));
}
- CARDvInitChannelTable((void *)pDevice);
+ init_channel_table((void *)pDevice);
if (pDevice->byLocalID > REV_ID_VT3253_B1) {
@@ -2749,7 +2750,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
MACvSelectPage0(pDevice->PortOffset);
//xxxx
// WCMDbFlushCommandQueue(pDevice->pMgmt, TRUE);
- if (CARDbSetChannel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == TRUE) {
+ if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == TRUE) {
pDevice->bMeasureInProgress = TRUE;
MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_READY);
@@ -2784,7 +2785,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
// clear measure control
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_EN);
MACvSelectPage0(pDevice->PortOffset);
- CARDbSetChannel(pDevice, pDevice->byOrgChannel);
+ set_channel(pDevice, pDevice->byOrgChannel);
// WCMDbResetCommandQueue(pDevice->pMgmt);
MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE);
@@ -2819,7 +2820,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0) {
pDevice->bChannelSwitch = FALSE;
- CARDbSetChannel(pDevice, pDevice->byNewChannel);
+ set_channel(pDevice, pDevice->byNewChannel);
VNTWIFIbChannelSwitch(pDevice->pMgmt, pDevice->byNewChannel);
MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE);
@@ -2905,7 +2906,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0) {
pDevice->bChannelSwitch = FALSE;
- CARDbSetChannel(pDevice, pDevice->byNewChannel);
+ set_channel(pDevice, pDevice->byNewChannel);
VNTWIFIbChannelSwitch(pDevice->pMgmt, pDevice->byNewChannel);
MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE);