* [PATCH 1/3] Staging: otus: remove dependency on WIRELESS_EXT version @ 2009-06-21 16:52 Alexander Beregalov 2009-06-21 16:52 ` [PATCH 2/3] Staging: rt2860: " Alexander Beregalov 0 siblings, 1 reply; 3+ messages in thread From: Alexander Beregalov @ 2009-06-21 16:52 UTC (permalink / raw) To: gregkh, linux-kernel; +Cc: Alexander Beregalov As the driver is in mainline now we can remove such dependencies. WIRELESS_EXT is 22 now. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> --- drivers/staging/otus/ioctl.c | 20 ++------------------ drivers/staging/otus/usbdrv.c | 13 ------------- drivers/staging/otus/wrap_buf.c | 4 ---- drivers/staging/otus/wrap_dbg.c | 3 --- drivers/staging/otus/wrap_ev.c | 7 ------- drivers/staging/otus/wrap_mem.c | 3 --- drivers/staging/otus/wrap_mis.c | 3 --- drivers/staging/otus/wrap_pkt.c | 4 ---- drivers/staging/otus/wrap_sec.c | 3 --- drivers/staging/otus/wrap_usb.c | 3 --- drivers/staging/otus/wwrap.c | 3 --- drivers/staging/otus/zdcompat.h | 10 ---------- 12 files changed, 2 insertions(+), 74 deletions(-) diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index ce04218..f8d5c2b 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -58,9 +58,7 @@ #define ZD_MAX_KEY_SIZE 32 #define ZD_MAX_GENERIC_SIZE 64 -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif extern u16_t zfLnxGetVapId(zdev_t *dev); @@ -248,7 +246,6 @@ int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq) return 0; } -#if WIRELESS_EXT > 14 /* * Encode a WPA or RSN information element as a custom * element using the hostap format. @@ -269,7 +266,6 @@ u32 encode_ie(void *buf, u32 bufsize, const u8 *ie, u32 ielen, p += sprintf(p, "%02x", ie[i]); return (i == ielen ? p - (u8 *)buf:0); } -#endif /* WIRELESS_EXT > 14 */ /* * Translate scan data returned from the card to a card independent @@ -284,9 +280,7 @@ char *usbdrv_translate_scan(struct net_device *dev, char *current_val; /* For rates */ char *last_ev; int i; - #if WIRELESS_EXT > 14 - char buf[64*2 + 30]; - #endif + char buf[64*2 + 30]; last_ev = current_ev; @@ -365,10 +359,8 @@ char *usbdrv_translate_scan(struct net_device *dev, /* Add quality statistics */ iwe.cmd = IWEVQUAL; - #if WIRELESS_EXT > 18 iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED | IW_QUAL_NOISE_UPDATED; - #endif iwe.u.qual.level = list->signalStrength; iwe.u.qual.noise = 0; iwe.u.qual.qual = list->signalQuality; @@ -441,8 +433,7 @@ char *usbdrv_translate_scan(struct net_device *dev, /* Check if we added any event */ if ((current_val - current_ev) > IW_EV_LCP_LEN) current_ev = current_val; - #if WIRELESS_EXT > 14 - #define IEEE80211_ELEMID_RSN 0x30 +#define IEEE80211_ELEMID_RSN 0x30 memset(&iwe, 0, sizeof(iwe)); iwe.cmd = IWEVCUSTOM; snprintf(buf, sizeof(buf), "bcn_int=%d", (list->beaconInterval[1] << 8) @@ -503,7 +494,6 @@ char *usbdrv_translate_scan(struct net_device *dev, last_ev = current_ev; } } - #endif /* The other data in the scan result are not really * interesting, so for now drop it */ @@ -697,12 +687,9 @@ int usbdrvwext_giwrange(struct net_device *dev, if (!netif_running(dev)) return -EINVAL; - #if WIRELESS_EXT > 9 range->txpower_capa = IW_TXPOW_DBM; /* XXX what about min/max_pmp, min/max_pmt, etc. */ - #endif - #if WIRELESS_EXT > 10 range->we_version_compiled = WIRELESS_EXT; range->we_version_source = 13; @@ -710,7 +697,6 @@ int usbdrvwext_giwrange(struct net_device *dev, range->retry_flags = IW_RETRY_LIMIT; range->min_retry = 0; range->max_retry = 255; - #endif /* WIRELESS_EXT > 10 */ channel_num = zfiWlanQueryAllowChannels(dev, channels); @@ -917,13 +903,11 @@ int usbdrvwext_giwscan(struct net_device *dev, current_ev = usbdrv_translate_scan(dev, info, current_ev, end_buf, &pBssList->bssInfo[i]); - #if WIRELESS_EXT > 16 if (current_ev == end_buf) { kfree(pBssList); data->length = current_ev - extra; return -E2BIG; } - #endif } /* Length of data */ diff --git a/drivers/staging/otus/usbdrv.c b/drivers/staging/otus/usbdrv.c index 540cbbb..e137b81 100644 --- a/drivers/staging/otus/usbdrv.c +++ b/drivers/staging/otus/usbdrv.c @@ -39,9 +39,7 @@ #include "linux/netlink.h" #include "linux/rtnetlink.h" -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif #ifdef ZM_HOSTAPD_SUPPORT #include "athr_common.h" @@ -113,9 +111,7 @@ extern u8_t zfLnxCreateThread(zdev_t *dev); /* Definition of Wireless Extension */ -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif //wireless extension helper functions extern int usbdrv_ioctl_setessid(struct net_device *dev, struct iw_point *erq); extern int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq); @@ -203,7 +199,6 @@ struct iw_priv_args usbdrv_private_args[] = { // { SIOCIWFIRSTPRIV + 0xC, 0, IW_PRIV_TYPE_CHAR | 12, "get_mac_mode" }, }; -#if WIRELESS_EXT > 12 static iw_handler usbdrvwext_handler[] = { (iw_handler) NULL, /* SIOCSIWCOMMIT */ (iw_handler) usbdrvwext_giwname, /* SIOCGIWNAME */ @@ -229,13 +224,8 @@ static iw_handler usbdrvwext_handler[] = { (iw_handler) usbdrvwext_giwap, /* SIOCGIWAP */ (iw_handler) NULL, /* -- hole -- */ (iw_handler) usbdrvwext_iwaplist, /* SIOCGIWAPLIST */ -#if WIRELESS_EXT > 13 (iw_handler) usbdrvwext_siwscan, /* SIOCSIWSCAN */ (iw_handler) usbdrvwext_giwscan, /* SIOCGIWSCAN */ -#else /* WIRELESS_EXT > 13 */ - (iw_handler) NULL, /* null */ /* SIOCSIWSCAN */ - (iw_handler) NULL, /* null */ /* SIOCGIWSCAN */ -#endif /* WIRELESS_EXT > 13 */ (iw_handler) usbdrvwext_siwessid, /* SIOCSIWESSID */ (iw_handler) usbdrvwext_giwessid, /* SIOCGIWESSID */ @@ -291,7 +281,6 @@ static struct iw_handler_def p80211wext_handler_def = { .private = (iw_handler *) usbdrv_private_handler, .private_args = (struct iw_priv_args *) usbdrv_private_args }; -#endif /* WDS */ //struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER]; @@ -1106,9 +1095,7 @@ u8_t zfLnxInitSetup(struct net_device *dev, struct usbdrv_private *macp) dev->dev_addr[4] = addr[4]; dev->dev_addr[5] = addr[5]; #endif -#if WIRELESS_EXT > 12 dev->wireless_handlers = (struct iw_handler_def *)&p80211wext_handler_def; -#endif dev->netdev_ops = &otus_netdev_ops; diff --git a/drivers/staging/otus/wrap_buf.c b/drivers/staging/otus/wrap_buf.c index 62496a0..5843594 100644 --- a/drivers/staging/otus/wrap_buf.c +++ b/drivers/staging/otus/wrap_buf.c @@ -29,11 +29,7 @@ #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif - /* Called to allocate buffer, must return a continue buffer space */ diff --git a/drivers/staging/otus/wrap_dbg.c b/drivers/staging/otus/wrap_dbg.c index 53763d9..d47e9ab 100644 --- a/drivers/staging/otus/wrap_dbg.c +++ b/drivers/staging/otus/wrap_dbg.c @@ -27,10 +27,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif void zfwDumpBuf(zdev_t* dev, zbuf_t* buf) { diff --git a/drivers/staging/otus/wrap_ev.c b/drivers/staging/otus/wrap_ev.c index 966b787..bcda0b9 100644 --- a/drivers/staging/otus/wrap_ev.c +++ b/drivers/staging/otus/wrap_ev.c @@ -28,10 +28,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif /***** Management *****/ @@ -75,7 +72,6 @@ u16_t zfLnxAsocNotify(zdev_t* dev, u16_t* macAddr, u8_t* body, u16_t bodySize, u // //wireless_send_event(macp->device, SIOCGIWSCAN, &wreq, NULL); // wireless_send_event(macp->device, SIOCGIWAP, &wreq, NULL); //} -#if WIRELESS_EXT >= 15 //else if(macp->cardSetting.BssType == AP_BSS) { // if (port == 0) // { @@ -94,7 +90,6 @@ u16_t zfLnxAsocNotify(zdev_t* dev, u16_t* macAddr, u8_t* body, u16_t bodySize, u // } // } //} -#endif //#endif return 0; @@ -185,7 +180,6 @@ void zfLnxConnectNotify(zdev_t* dev, u16_t status, u16_t* bssid) // //wireless_send_event(dev, SIOCGIWSCAN, &wreq, NULL); wireless_send_event(dev, SIOCGIWAP, &wreq, NULL); } -#if WIRELESS_EXT >= 15 else if(zfiWlanQueryWlanMode(dev) == ZM_MODE_AP) { //if (port == 0) //{ @@ -204,7 +198,6 @@ void zfLnxConnectNotify(zdev_t* dev, u16_t status, u16_t* bssid) // } //} } -#endif } //return 0; } diff --git a/drivers/staging/otus/wrap_mem.c b/drivers/staging/otus/wrap_mem.c index 8081bb2..32416d7 100644 --- a/drivers/staging/otus/wrap_mem.c +++ b/drivers/staging/otus/wrap_mem.c @@ -27,10 +27,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif /* Memory management */ /* Called to allocate uncached memory, allocated memory must */ diff --git a/drivers/staging/otus/wrap_mis.c b/drivers/staging/otus/wrap_mis.c index 337918b..ea2199f 100644 --- a/drivers/staging/otus/wrap_mis.c +++ b/drivers/staging/otus/wrap_mis.c @@ -28,10 +28,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif //extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER]; extern struct zsVapStruct vap[ZM_VAP_PORT_NUMBER]; diff --git a/drivers/staging/otus/wrap_pkt.c b/drivers/staging/otus/wrap_pkt.c index 5db0004..8ad10c1 100644 --- a/drivers/staging/otus/wrap_pkt.c +++ b/drivers/staging/otus/wrap_pkt.c @@ -28,11 +28,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif - //extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER]; diff --git a/drivers/staging/otus/wrap_sec.c b/drivers/staging/otus/wrap_sec.c index f688d06..0f780ba 100644 --- a/drivers/staging/otus/wrap_sec.c +++ b/drivers/staging/otus/wrap_sec.c @@ -28,10 +28,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif #ifdef ZM_ENABLE_CENC extern int zfLnxCencSendMsg(struct sock *netlink_sk, u_int8_t *msg, int len); diff --git a/drivers/staging/otus/wrap_usb.c b/drivers/staging/otus/wrap_usb.c index c076e56..70fd410 100644 --- a/drivers/staging/otus/wrap_usb.c +++ b/drivers/staging/otus/wrap_usb.c @@ -28,10 +28,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif extern void zfLnxInitUsbTxQ(zdev_t* dev); extern void zfLnxInitUsbRxQ(zdev_t* dev); diff --git a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c index 4db8f6e..4084ad0 100644 --- a/drivers/staging/otus/wwrap.c +++ b/drivers/staging/otus/wwrap.c @@ -26,10 +26,7 @@ #include "usbdrv.h" #include <linux/netlink.h> - -#if WIRELESS_EXT > 12 #include <net/iw_handler.h> -#endif extern void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo); extern void zfCoreRecv(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo); diff --git a/drivers/staging/otus/zdcompat.h b/drivers/staging/otus/zdcompat.h index d9a3b2d..84ac433 100644 --- a/drivers/staging/otus/zdcompat.h +++ b/drivers/staging/otus/zdcompat.h @@ -35,16 +35,6 @@ #undef netdevice_t typedef struct net_device netdevice_t; -#ifdef WIRELESS_EXT -#if (WIRELESS_EXT < 13) -struct iw_request_info -{ - __u16 cmd; /* Wireless Extension command */ - __u16 flags; /* More to come ;-) */ -}; -#endif -#endif - #ifndef in_atomic #define in_atomic() 0 #endif -- 1.6.3.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/3] Staging: rt2860: remove dependency on WIRELESS_EXT version 2009-06-21 16:52 [PATCH 1/3] Staging: otus: remove dependency on WIRELESS_EXT version Alexander Beregalov @ 2009-06-21 16:52 ` Alexander Beregalov 2009-06-21 16:52 ` [PATCH 3/3] Staging: rtl8187se: " Alexander Beregalov 0 siblings, 1 reply; 3+ messages in thread From: Alexander Beregalov @ 2009-06-21 16:52 UTC (permalink / raw) To: gregkh, linux-kernel; +Cc: Alexander Beregalov As the driver is in mainline now we can remove such dependencies. WIRELESS_EXT is 22 now. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> --- drivers/staging/rt2860/oid.h | 7 -- drivers/staging/rt2860/rt_linux.c | 4 - drivers/staging/rt2860/rt_main_dev.c | 9 --- drivers/staging/rt2860/rt_profile.c | 4 - drivers/staging/rt2860/rtmp.h | 4 - drivers/staging/rt2860/sta/assoc.c | 14 ----- drivers/staging/rt2860/sta_ioctl.c | 104 ++++----------------------------- 7 files changed, 13 insertions(+), 133 deletions(-) diff --git a/drivers/staging/rt2860/oid.h b/drivers/staging/rt2860/oid.h index 8519afc..98e21ef 100644 --- a/drivers/staging/rt2860/oid.h +++ b/drivers/staging/rt2860/oid.h @@ -626,13 +626,6 @@ typedef struct _NDIS_802_11_CAPABILITY NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1]; } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; -#if WIRELESS_EXT <= 11 -#ifndef SIOCDEVPRIVATE -#define SIOCDEVPRIVATE 0x8BE0 -#endif -#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE -#endif - #ifdef RT30xx #define RT_PRIV_IOCTL_EXT (SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon #endif diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index 80176b2..452e5fb 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -728,7 +728,6 @@ VOID RTMPSendWirelessEvent( IN UCHAR BssIdx, IN CHAR Rssi) { -#if WIRELESS_EXT >= 15 union iwreq_data wrqu; PUCHAR pBuf = NULL, pBufPtr = NULL; @@ -805,9 +804,6 @@ VOID RTMPSendWirelessEvent( } else DBGPRINT(RT_DEBUG_ERROR, ("%s : Can't allocate memory for wireless event.\n", __func__)); -#else - DBGPRINT(RT_DEBUG_ERROR, ("%s : The Wireless Extension MUST be v15 or newer.\n", __func__)); -#endif /* WIRELESS_EXT >= 15 */ } void send_monitor_packets( diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index f298b9b..e4dc183 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -74,11 +74,9 @@ static void CfgInitHook(PRTMP_ADAPTER pAd); extern const struct iw_handler_def rt28xx_iw_handler_def; -#if WIRELESS_EXT >= 12 // This function will be called when query /proc struct iw_statistics *rt28xx_get_wireless_stats( IN struct net_device *net_dev); -#endif struct net_device_stats *RT28xx_get_ether_stats( IN struct net_device *net_dev); @@ -695,16 +693,11 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p CHAR slot_name[IFNAMSIZ]; struct net_device *device; -#if WIRELESS_EXT >= 12 if (pAd->OpMode == OPMODE_STA) { dev->wireless_handlers = &rt28xx_iw_handler_def; } -#endif //WIRELESS_EXT >= 12 -#if WIRELESS_EXT < 21 - dev->get_wireless_stats = rt28xx_get_wireless_stats; -#endif dev->priv_flags = INT_MAIN; dev->netdev_ops = &rt2860_netdev_ops; // find available device name @@ -942,7 +935,6 @@ void CfgInitHook(PRTMP_ADAPTER pAd) } /* End of CfgInitHook */ -#if WIRELESS_EXT >= 12 // This function will be called when query /proc struct iw_statistics *rt28xx_get_wireless_stats( IN struct net_device *net_dev) @@ -976,7 +968,6 @@ struct iw_statistics *rt28xx_get_wireless_stats( DBGPRINT(RT_DEBUG_TRACE, ("<--- rt28xx_get_wireless_stats\n")); return &pAd->iw_stats; } /* End of rt28xx_get_wireless_stats */ -#endif // WIRELESS_EXT // diff --git a/drivers/staging/rt2860/rt_profile.c b/drivers/staging/rt2860/rt_profile.c index d92b143..be6b18b 100644 --- a/drivers/staging/rt2860/rt_profile.c +++ b/drivers/staging/rt2860/rt_profile.c @@ -1230,14 +1230,10 @@ NDIS_STATUS RTMPReadParametersHook( //WirelessEvent if(RTMPGetKeyParameter("WirelessEvent", tmpbuf, 10, buffer)) { -#if WIRELESS_EXT >= 15 if(simple_strtol(tmpbuf, 0, 10) != 0) pAd->CommonCfg.bWirelessEvent = simple_strtol(tmpbuf, 0, 10); else pAd->CommonCfg.bWirelessEvent = 0; // disable -#else - pAd->CommonCfg.bWirelessEvent = 0; // disable -#endif DBGPRINT(RT_DEBUG_TRACE, ("WirelessEvent=%d\n", pAd->CommonCfg.bWirelessEvent)); } if(RTMPGetKeyParameter("WiFiTest", tmpbuf, 10, buffer)) diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index 25c3199..aaf06e9 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h @@ -2972,9 +2972,7 @@ typedef struct _RTMP_ADAPTER ULONG OneSecondnonBEpackets; // record non BE packets per second -#if WIRELESS_EXT >= 12 struct iw_statistics iw_stats; -#endif struct net_device_stats stats; @@ -6323,11 +6321,9 @@ void send_monitor_packets( IN PRTMP_ADAPTER pAd, IN RX_BLK *pRxBlk); -#if WIRELESS_EXT >= 12 // This function will be called when query /proc struct iw_statistics *rt28xx_get_wireless_stats( IN struct net_device *net_dev); -#endif VOID RTMPSetDesiredRates( IN PRTMP_ADAPTER pAdapter, diff --git a/drivers/staging/rt2860/sta/assoc.c b/drivers/staging/rt2860/sta/assoc.c index a0734c6..4873159 100644 --- a/drivers/staging/rt2860/sta/assoc.c +++ b/drivers/staging/rt2860/sta/assoc.c @@ -1503,7 +1503,6 @@ int wext_notify_event_assoc( union iwreq_data wrqu; char custom[IW_CUSTOM_MAX] = {0}; -#if WIRELESS_EXT > 17 if (pAd->StaCfg.ReqVarIELen <= IW_CUSTOM_MAX) { wrqu.data.length = pAd->StaCfg.ReqVarIELen; @@ -1512,19 +1511,6 @@ int wext_notify_event_assoc( } else DBGPRINT(RT_DEBUG_TRACE, ("pAd->StaCfg.ReqVarIELen > MAX_CUSTOM_LEN\n")); -#else - if (((pAd->StaCfg.ReqVarIELen*2) + 17) <= IW_CUSTOM_MAX) - { - UCHAR idx; - wrqu.data.length = (pAd->StaCfg.ReqVarIELen*2) + 17; - sprintf(custom, "ASSOCINFO(ReqIEs="); - for (idx=0; idx<pAd->StaCfg.ReqVarIELen; idx++) - sprintf(custom + strlen(custom), "%02x", pAd->StaCfg.ReqVarIEs[idx]); - wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, custom); - } - else - DBGPRINT(RT_DEBUG_TRACE, ("(pAd->StaCfg.ReqVarIELen*2) + 17 > MAX_CUSTOM_LEN\n")); -#endif return 0; diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index eb0109a..dfbba23 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -820,11 +820,9 @@ int rt_ioctl_giwrange(struct net_device *dev, range->min_frag = 256; range->max_frag = 2346; -#if WIRELESS_EXT > 17 /* IW_ENC_CAPA_* bit field */ range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 | IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP; -#endif return 0; } @@ -1115,25 +1113,15 @@ int rt_ioctl_giwscan(struct net_device *dev, return 0; } -#if WIRELESS_EXT >= 17 if (data->length > 0) end_buf = extra + data->length; else end_buf = extra + IW_SCAN_MAX_DATA; -#else - end_buf = extra + IW_SCAN_MAX_DATA; -#endif for (i = 0; i < pAdapter->ScanTab.BssNr; i++) { if (current_ev >= end_buf) - { -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif - } + return -E2BIG; //MAC address //================================ @@ -1146,11 +1134,7 @@ int rt_ioctl_giwscan(struct net_device *dev, current_ev = iwe_stream_add_event(info, current_ev,end_buf, &iwe, IW_EV_ADDR_LEN); #ifdef RT30xx if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; /* Protocol: @@ -1226,11 +1210,7 @@ int rt_ioctl_giwscan(struct net_device *dev, current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN); #endif /* RT30xx */ if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; //ESSID //================================ @@ -1242,11 +1222,7 @@ int rt_ioctl_giwscan(struct net_device *dev, previous_ev = current_ev; current_ev = iwe_stream_add_point(info, current_ev,end_buf, &iwe, pAdapter->ScanTab.BssEntry[i].Ssid); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; //Network Type //================================ @@ -1269,11 +1245,7 @@ int rt_ioctl_giwscan(struct net_device *dev, previous_ev = current_ev; current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_UINT_LEN); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; //Channel and Frequency //================================ @@ -1289,11 +1261,7 @@ int rt_ioctl_giwscan(struct net_device *dev, previous_ev = current_ev; current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; //Add quality statistics //================================ @@ -1304,11 +1272,7 @@ int rt_ioctl_giwscan(struct net_device *dev, set_quality(pAdapter, &iwe.u.qual, pAdapter->ScanTab.BssEntry[i].Rssi); current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_QUAL_LEN); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; //Encyption key //================================ @@ -1322,11 +1286,7 @@ int rt_ioctl_giwscan(struct net_device *dev, previous_ev = current_ev; current_ev = iwe_stream_add_point(info, current_ev, end_buf,&iwe, (char *)pAdapter->SharedKey[BSS0][(iwe.u.data.flags & IW_ENCODE_INDEX)-1].Key); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; //Bit Rate //================================ @@ -1355,11 +1315,7 @@ int rt_ioctl_giwscan(struct net_device *dev, if((current_val-current_ev)>IW_EV_LCP_LEN) current_ev = current_val; else -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; } #ifdef IWEVGENIE @@ -1374,11 +1330,7 @@ int rt_ioctl_giwscan(struct net_device *dev, iwe.u.data.length = pAdapter->ScanTab.BssEntry[i].WpaIE.IELen; current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; } //WPA2 IE @@ -1392,11 +1344,7 @@ int rt_ioctl_giwscan(struct net_device *dev, iwe.u.data.length = pAdapter->ScanTab.BssEntry[i].RsnIE.IELen; current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; } #else //WPA IE @@ -1413,11 +1361,7 @@ int rt_ioctl_giwscan(struct net_device *dev, previous_ev = current_ev; current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; } //WPA2 IE @@ -1433,11 +1377,7 @@ int rt_ioctl_giwscan(struct net_device *dev, previous_ev = current_ev; current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom); if (current_ev == previous_ev) -#if WIRELESS_EXT >= 17 - return -E2BIG; -#else - break; -#endif + return -E2BIG; } #endif // IWEVGENIE // } @@ -2337,7 +2277,6 @@ int rt_ioctl_siwmlme(struct net_device *dev, } #endif // SIOCSIWMLME // -#if WIRELESS_EXT > 17 int rt_ioctl_siwauth(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) @@ -2916,7 +2855,6 @@ int rt_ioctl_siwpmksa(struct net_device *dev, return 0; } -#endif // #if WIRELESS_EXT > 17 #ifdef DBG static int @@ -3219,7 +3157,6 @@ static const iw_handler rt_handler[] = (iw_handler) NULL, /* SIOCGIWPOWER */ (iw_handler) NULL, /* -- hole -- */ (iw_handler) NULL, /* -- hole -- */ -#if WIRELESS_EXT > 17 (iw_handler) rt_ioctl_siwgenie, /* SIOCSIWGENIE */ (iw_handler) rt_ioctl_giwgenie, /* SIOCGIWGENIE */ (iw_handler) rt_ioctl_siwauth, /* SIOCSIWAUTH */ @@ -3227,7 +3164,6 @@ static const iw_handler rt_handler[] = (iw_handler) rt_ioctl_siwencodeext, /* SIOCSIWENCODEEXT */ (iw_handler) rt_ioctl_giwencodeext, /* SIOCGIWENCODEEXT */ (iw_handler) rt_ioctl_siwpmksa, /* SIOCSIWPMKSA */ -#endif }; static const iw_handler rt_priv_handlers[] = { @@ -4589,22 +4525,9 @@ INT RTMPQueryInformation( } pBss->Length = (ULONG)(sizeof(NDIS_WLAN_BSSID_EX) - 1 + sizeof(NDIS_802_11_FIXED_IEs) + pAdapter->ScanTab.BssEntry[i].VarIELen + Padding); -#if WIRELESS_EXT < 17 - if ((BssLen + pBss->Length) < wrq->u.data.length) - BssLen += pBss->Length; - else - { - pBssidList->NumberOfItems = i; - break; - } -#else BssLen += pBss->Length; -#endif } -#if WIRELESS_EXT < 17 - wrq->u.data.length = BssLen; -#else if (BssLen > wrq->u.data.length) { kfree(pBssidList); @@ -4612,7 +4535,6 @@ INT RTMPQueryInformation( } else wrq->u.data.length = BssLen; -#endif Status = copy_to_user(wrq->u.data.pointer, pBssidList, BssLen); kfree(pBssidList); break; -- 1.6.3.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] Staging: rtl8187se: remove dependency on WIRELESS_EXT version 2009-06-21 16:52 ` [PATCH 2/3] Staging: rt2860: " Alexander Beregalov @ 2009-06-21 16:52 ` Alexander Beregalov 0 siblings, 0 replies; 3+ messages in thread From: Alexander Beregalov @ 2009-06-21 16:52 UTC (permalink / raw) To: gregkh, linux-kernel; +Cc: Alexander Beregalov As the driver is in mainline now we can remove such dependencies. WIRELESS_EXT is 22 now. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> --- drivers/staging/rtl8187se/ieee80211.h | 9 ------- drivers/staging/rtl8187se/ieee80211/ieee80211.h | 9 ------- .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c | 24 -------------------- drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 4 --- drivers/staging/rtl8187se/r8180_core.c | 13 ---------- drivers/staging/rtl8187se/r8180_wx.c | 4 --- 6 files changed, 0 insertions(+), 63 deletions(-) diff --git a/drivers/staging/rtl8187se/ieee80211.h b/drivers/staging/rtl8187se/ieee80211.h index 5833608..f5b8de6 100644 --- a/drivers/staging/rtl8187se/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211.h @@ -196,15 +196,6 @@ typedef struct ieee_param { }ieee_param; -#if WIRELESS_EXT < 17 -#define IW_QUAL_QUAL_INVALID 0x10 -#define IW_QUAL_LEVEL_INVALID 0x20 -#define IW_QUAL_NOISE_INVALID 0x40 -#define IW_QUAL_QUAL_UPDATED 0x1 -#define IW_QUAL_LEVEL_UPDATED 0x2 -#define IW_QUAL_NOISE_UPDATED 0x4 -#endif - // linux under 2.6.9 release may not support it, so modify it for common use #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)) #define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ) diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h index 5833608..f5b8de6 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h @@ -196,15 +196,6 @@ typedef struct ieee_param { }ieee_param; -#if WIRELESS_EXT < 17 -#define IW_QUAL_QUAL_INVALID 0x10 -#define IW_QUAL_LEVEL_INVALID 0x20 -#define IW_QUAL_NOISE_INVALID 0x40 -#define IW_QUAL_QUAL_UPDATED 0x1 -#define IW_QUAL_LEVEL_UPDATED 0x2 -#define IW_QUAL_NOISE_UPDATED 0x4 -#endif - // linux under 2.6.9 release may not support it, so modify it for common use #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)) #define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ) diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c index de97bbe..5266253 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c @@ -753,7 +753,6 @@ static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *pri } -#if WIRELESS_EXT >= 18 static void ieee80211_michael_mic_failure(struct net_device *dev, struct ieee80211_hdr *hdr, int keyidx) @@ -774,29 +773,6 @@ static void ieee80211_michael_mic_failure(struct net_device *dev, wrqu.data.length = sizeof(ev); wireless_send_event(dev, IWEVMICHAELMICFAILURE, &wrqu, (char *) &ev); } -#elif WIRELESS_EXT >= 15 -static void ieee80211_michael_mic_failure(struct net_device *dev, - struct ieee80211_hdr *hdr, - int keyidx) -{ - union iwreq_data wrqu; - char buf[128]; - - /* TODO: needed parameters: count, keyid, key type, TSC */ - sprintf(buf, "MLME-MICHAELMICFAILURE.indication(keyid=%d %scast addr=" - MAC_FMT ")", keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni", - MAC_ARG(hdr->addr2)); - memset(&wrqu, 0, sizeof(wrqu)); - wrqu.data.length = strlen(buf); - wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); -} -#else /* WIRELESS_EXT >= 15 */ -static inline void ieee80211_michael_mic_failure(struct net_device *dev, - struct ieee80211_hdr *hdr, - int keyidx) -{ -} -#endif /* WIRELESS_EXT >= 15 */ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx, diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c index 4d4ee56..8de1289 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c @@ -644,7 +644,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, hdrlen = ieee80211_get_hdrlen(fc); #ifdef NOT_YET -#if WIRELESS_EXT > 15 /* Put this code here so that we avoid duplicating it in all * Rx paths. - Jean II */ #ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */ @@ -658,18 +657,15 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, wireless_spy_update(dev, hdr->addr2, &wstats); } #endif /* IW_WIRELESS_SPY */ -#endif /* WIRELESS_EXT > 15 */ hostap_update_rx_stats(local->ap, hdr, rx_stats); #endif -#if WIRELESS_EXT > 15 if (ieee->iw_mode == IW_MODE_MONITOR) { ieee80211_monitor_rx(ieee, skb, rx_stats); stats->rx_packets++; stats->rx_bytes += skb->len; return 1; } -#endif if (ieee->host_decrypt) { int idx = 0; if (skb->len >= hdrlen + 3) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 7e2feca..3a00e42 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -592,14 +592,6 @@ static int proc_get_stats_tx(char *page, char **start, } -#if WIRELESS_EXT < 17 -static struct iw_statistics *r8180_get_wireless_stats(struct net_device *dev) -{ - struct r8180_priv *priv = ieee80211_priv(dev); - - return &priv->wstats; -} -#endif void rtl8180_proc_module_init(void) { DMESG("Initializing proc filesystem"); @@ -5950,12 +5942,7 @@ static int __devinit rtl8180_pci_probe(struct pci_dev *pdev, dev->netdev_ops = &rtl8180_netdev_ops; dev->wireless_handlers = &r8180_wx_handlers_def; -#if WIRELESS_EXT >= 12 -#if WIRELESS_EXT < 17 - dev->get_wireless_stats = r8180_get_wireless_stats; -#endif dev->wireless_handlers = (struct iw_handler_def *) &r8180_wx_handlers_def; -#endif dev->type=ARPHRD_ETHER; dev->watchdog_timeo = HZ*3; //added by david woo, 2007.12.13 diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c index 979ba0b..ad0ed8d 100644 --- a/drivers/staging/rtl8187se/r8180_wx.c +++ b/drivers/staging/rtl8187se/r8180_wx.c @@ -1543,7 +1543,6 @@ static iw_handler r8180_private_handler[] = { r8180_wx_set_forcerate, }; -#if WIRELESS_EXT >= 17 static inline int is_same_network(struct ieee80211_network *src, struct ieee80211_network *dst, struct ieee80211_device *ieee) @@ -1626,7 +1625,6 @@ static struct iw_statistics *r8180_get_wireless_stats(struct net_device *dev) wstats->qual.updated = IW_QUAL_ALL_UPDATED| IW_QUAL_DBM; return wstats; } -#endif struct iw_handler_def r8180_wx_handlers_def={ @@ -1635,9 +1633,7 @@ struct iw_handler_def r8180_wx_handlers_def={ .private = r8180_private_handler, .num_private = sizeof(r8180_private_handler) / sizeof(iw_handler), .num_private_args = sizeof(r8180_private_args) / sizeof(struct iw_priv_args), -#if WIRELESS_EXT >= 17 .get_wireless_stats = r8180_get_wireless_stats, -#endif .private_args = (struct iw_priv_args *)r8180_private_args, }; -- 1.6.3.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-21 16:53 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-06-21 16:52 [PATCH 1/3] Staging: otus: remove dependency on WIRELESS_EXT version Alexander Beregalov 2009-06-21 16:52 ` [PATCH 2/3] Staging: rt2860: " Alexander Beregalov 2009-06-21 16:52 ` [PATCH 3/3] Staging: rtl8187se: " Alexander Beregalov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®