Skip to content

Commit

Permalink
Staging: rtxxx0: remove dead virtual adapter support
Browse files Browse the repository at this point in the history
* remove dead virtual adapter support
* remove needless rt28xx_ioctl() wrapper
* remove superfluous NULL checks

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 66b1bfd commit 2497322
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 328 deletions.
6 changes: 0 additions & 6 deletions drivers/staging/rt2860/rt_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,6 @@ struct os_cookie {
INT ioctl_if;
};

typedef struct _VIRTUAL_ADAPTER
{
struct net_device *RtmpDev;
struct net_device *VirtualDev;
} VIRTUAL_ADAPTER, PVIRTUAL_ADAPTER;

#undef ASSERT
#define ASSERT(x)

Expand Down
33 changes: 1 addition & 32 deletions drivers/staging/rt2860/rt_main_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ int rt28xx_open(IN PNET_DEV dev)
static const struct net_device_ops rt2860_netdev_ops = {
.ndo_open = MainVirtualIF_open,
.ndo_stop = MainVirtualIF_close,
.ndo_do_ioctl = rt28xx_ioctl,
.ndo_do_ioctl = rt28xx_sta_ioctl,
.ndo_get_stats = RT28xx_get_ether_stats,
.ndo_validate_addr = NULL,
.ndo_set_mac_address = eth_mac_addr,
Expand Down Expand Up @@ -970,37 +970,6 @@ void tbtt_tasklet(unsigned long data)

}

INT rt28xx_ioctl(
IN struct net_device *net_dev,
IN OUT struct ifreq *rq,
IN INT cmd)
{
VIRTUAL_ADAPTER *pVirtualAd = NULL;
RTMP_ADAPTER *pAd = NULL;
INT ret = 0;

if (net_dev->priv_flags == INT_MAIN)
{
pAd = net_dev->ml_priv;
}
else
{
pVirtualAd = net_dev->ml_priv;
pAd = pVirtualAd->RtmpDev->ml_priv;
}

if (pAd == NULL)
{
/* if 1st open fail, pAd will be free;
So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}

ret = rt28xx_sta_ioctl(net_dev, rq, cmd);

return ret;
}

/*
========================================================================
Expand Down
5 changes: 0 additions & 5 deletions drivers/staging/rt2860/rtmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -6337,11 +6337,6 @@ VOID RT28xx_UpdateBeaconToAsic(
IN ULONG BeaconLen,
IN ULONG UpdatePos);

INT rt28xx_ioctl(
IN struct net_device *net_dev,
IN OUT struct ifreq *rq,
IN INT cmd);

INT rt28xx_sta_ioctl(
IN struct net_device *net_dev,
IN OUT struct ifreq *rq,
Expand Down
Loading

0 comments on commit 2497322

Please sign in to comment.