Skip to content

Commit

Permalink
Staging: rtl8187se: remove support for older wireless extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 0370453 commit 8efff17
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 60 deletions.
9 changes: 0 additions & 9 deletions drivers/staging/rtl8187se/ieee80211/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,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

#define MSECS(t) msecs_to_jiffies(t)
#define msleep_interruptible_rtl msleep_interruptible

Expand Down
26 changes: 0 additions & 26 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,6 @@ static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *pri
return 0;
}


#if WIRELESS_EXT >= 18
static void ieee80211_michael_mic_failure(struct net_device *dev,
struct ieee80211_hdr *hdr,
int keyidx)
Expand All @@ -627,30 +625,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,
int hdr_len, void *priv)
Expand Down
5 changes: 1 addition & 4 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,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 */
Expand All @@ -654,18 +653,16 @@ 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)
Expand Down
16 changes: 0 additions & 16 deletions drivers/staging/rtl8187se/r8180_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,15 +584,6 @@ static int proc_get_stats_tx(char *page, char **start,
return len;
}


#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");
Expand Down Expand Up @@ -5857,13 +5848,6 @@ 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

Expand Down
5 changes: 0 additions & 5 deletions drivers/staging/rtl8187se/r8180_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -1626,18 +1625,14 @@ 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={
.standard = r8180_wx_handlers,
.num_standard = sizeof(r8180_wx_handlers) / sizeof(iw_handler),
.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,
};

Expand Down

0 comments on commit 8efff17

Please sign in to comment.