]> git.neil.brown.name Git - history.git/commitdiff
Minor Wavelan wireless net driver fixes:
authorJean Tourrilhes <jt@hpl.hp.com>
Mon, 23 Sep 2002 21:49:30 +0000 (17:49 -0400)
committerJeff Garzik <jgarzik@mandrakesoft.com>
Mon, 23 Sep 2002 21:49:30 +0000 (17:49 -0400)
o use 'time_after' (contributed by Tim Schmielau)
o fix compile warning in my previous patch (Rene Scharfe)
o use 'inline' to try to minimise ethtool bloat (me)

drivers/net/wireless/wavelan_cs.c

index 2e73753ef86f4d63857aa9cf8ec374004ba9b8a5..3717d9d2588d82a79c58e26050417cc49881f70b 100644 (file)
@@ -676,7 +676,7 @@ void wl_cell_expiry(unsigned long data)
   
   while(wavepoint!=NULL)
     {
-      if(wavepoint->last_seen < jiffies-CELL_TIMEOUT)
+      if(time_after(jiffies, wavepoint->last_seen + CELL_TIMEOUT))
        {
 #ifdef WAVELAN_ROAMING_DEBUG
          printk(KERN_DEBUG "WaveLAN: Bye bye %.4X\n",wavepoint->nwid);
@@ -1859,7 +1859,8 @@ wl_his_gather(device *    dev,
 }
 #endif /* HISTOGRAM */
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static inline int
+wl_netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
 {
        u32 ethcmd;
 
@@ -2901,7 +2902,9 @@ wavelan_ioctl(struct net_device * dev,    /* Device on wich the ioctl apply */
              struct ifreq *    rq,     /* Data passed */
              int               cmd)    /* Ioctl number */
 {
+#if WIRELESS_EXT <= 12
   struct iwreq *       wrq = (struct iwreq *) rq;
+#endif
   int                  ret = 0;
 
 #ifdef DEBUG_IOCTL_TRACE
@@ -2912,7 +2915,7 @@ wavelan_ioctl(struct net_device * dev,    /* Device on wich the ioctl apply */
   switch(cmd)
     {
     case SIOCETHTOOL:
-      ret = netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+      ret = wl_netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
       break;
 
 #if WIRELESS_EXT <= 12