summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/iwctl.c
diff options
context:
space:
mode:
authorForest Bond2009-06-02 02:00:35 +0200
committerGreg Kroah-Hartman2009-06-19 20:00:51 +0200
commit7bb8dc2d7eb5594ec890e822bb0517446d369698 (patch)
tree7667ffc2ce9e7df1baf6276b3d4f710de7df59d9 /drivers/staging/vt6655/iwctl.c
parentStaging: vt6655: Replace net_device->priv accesses with netdev_priv calls. (diff)
downloadkernel-qcow2-linux-7bb8dc2d7eb5594ec890e822bb0517446d369698.tar.gz
kernel-qcow2-linux-7bb8dc2d7eb5594ec890e822bb0517446d369698.tar.xz
kernel-qcow2-linux-7bb8dc2d7eb5594ec890e822bb0517446d369698.zip
Staging: vt6655: Remove LINUX_VERSION_CODE preprocessor conditionals.
vt6655: Remove LINUX_VERSION_CODE preprocessor conditionals. Signed-off-by: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655/iwctl.c')
-rw-r--r--drivers/staging/vt6655/iwctl.c78
1 files changed, 11 insertions, 67 deletions
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index 60ea9b4d44ba..4d5a1da8edfc 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -307,22 +307,14 @@ int iwctl_giwscan(struct net_device *dev,
iwe.cmd = SIOCGIWAP;
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
memcpy(iwe.u.ap_addr.sa_data, pBSS->abyBSSID, WLAN_BSSID_LEN);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
- #else
- current_ev = iwe_stream_add_event(current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
- #endif
+ current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
//ADD ssid
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWESSID;
pItemSSID = (PWLAN_IE_SSID)pBSS->abySSID;
iwe.u.data.length = pItemSSID->len;
iwe.u.data.flags = 1;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_point(info,current_ev,end_buf, &iwe, pItemSSID->abySSID);
- #else
- current_ev = iwe_stream_add_point(current_ev,end_buf, &iwe, pItemSSID->abySSID);
- #endif
+ current_ev = iwe_stream_add_point(info,current_ev,end_buf, &iwe, pItemSSID->abySSID);
//ADD mode
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWMODE;
@@ -333,11 +325,7 @@ int iwctl_giwscan(struct net_device *dev,
iwe.u.mode = IW_MODE_ADHOC;
}
iwe.len = IW_EV_UINT_LEN;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_event(info,current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
- #else
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
- #endif
+ current_ev = iwe_stream_add_event(info,current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
//ADD frequency
pSuppRates = (PWLAN_IE_SUPP_RATES)pBSS->abySuppRates;
pExtSuppRates = (PWLAN_IE_SUPP_RATES)pBSS->abyExtSuppRates;
@@ -346,11 +334,7 @@ int iwctl_giwscan(struct net_device *dev,
iwe.u.freq.m = pBSS->uChannel;
iwe.u.freq.e = 0;
iwe.u.freq.i = 0;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
- #else
- current_ev = iwe_stream_add_event(current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
- #endif
+ current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
//2008-0409-04, <Add> by Einsn Liu
@@ -360,11 +344,7 @@ int iwctl_giwscan(struct net_device *dev,
iwe.u.freq.m = frequency_list[f] * 100000;
iwe.u.freq.e = 1;
}
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
- #else
- current_ev = iwe_stream_add_event(current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
- #endif
+ current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN);
//ADD quality
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVQUAL;
@@ -382,11 +362,7 @@ int iwctl_giwscan(struct net_device *dev,
iwe.u.qual.updated=7;
// iwe.u.qual.qual = 0;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_event(info,current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
- #else
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
- #endif
+ current_ev = iwe_stream_add_event(info,current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWENCODE;
@@ -396,11 +372,7 @@ int iwctl_giwscan(struct net_device *dev,
}else {
iwe.u.data.flags = IW_ENCODE_DISABLED;
}
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
current_ev = iwe_stream_add_point(info,current_ev,end_buf, &iwe, pItemSSID->abySSID);
- #else
- current_ev = iwe_stream_add_point(current_ev,end_buf, &iwe, pItemSSID->abySSID);
- #endif
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWRATE;
@@ -412,22 +384,14 @@ int iwctl_giwscan(struct net_device *dev,
break;
// Bit rate given in 500 kb/s units (+ 0x80)
iwe.u.bitrate.value = ((pSuppRates->abyRates[kk] & 0x7f) * 500000);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
- #else
- current_val = iwe_stream_add_value(current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
- #endif
+ current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
}
for (kk = 0 ; kk < 8 ; kk++) {
if (pExtSuppRates->abyRates[kk] == 0)
break;
// Bit rate given in 500 kb/s units (+ 0x80)
iwe.u.bitrate.value = ((pExtSuppRates->abyRates[kk] & 0x7f) * 500000);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
- #else
- current_val = iwe_stream_add_value(current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
- #endif
+ current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
}
if((current_val - current_ev) > IW_EV_LCP_LEN)
@@ -438,33 +402,21 @@ int iwctl_giwscan(struct net_device *dev,
iwe.cmd = IWEVCUSTOM;
sprintf(buf, "bcn_int=%d", pBSS->wBeaconInterval);
iwe.u.data.length = strlen(buf);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf);
- #else
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf);
- #endif
+ current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf);
#if WIRELESS_EXT > 17
if ((pBSS->wWPALen > 0) && (pBSS->wWPALen <= MAX_WPA_IE_LEN)) {
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = pBSS->wWPALen;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, pBSS->byWPAIE);
- #else
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, pBSS->byWPAIE);
- #endif
}
if ((pBSS->wRSNLen > 0) && (pBSS->wRSNLen <= MAX_WPA_IE_LEN)) {
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = pBSS->wRSNLen;
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, pBSS->byRSNIE);
- #else
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, pBSS->byRSNIE);
- #endif
}
#else // WIRELESS_EXT > 17
@@ -477,11 +429,7 @@ int iwctl_giwscan(struct net_device *dev,
p += sprintf(p, "%02x", pBSS->byWPAIE[ii]);
}
iwe.u.data.length = strlen(buf);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf);
- #else
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf);
- #endif
+ current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf);
}
@@ -494,11 +442,7 @@ int iwctl_giwscan(struct net_device *dev,
p += sprintf(p, "%02x", pBSS->byRSNIE[ii]);
}
iwe.u.data.length = strlen(buf);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) //mike add
- current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf);
- #else
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf);
- #endif
+ current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf);
}
#endif
#endif