diff options
Diffstat (limited to 'drivers/staging/rtl8187se')
-rw-r--r-- | drivers/staging/rtl8187se/Kconfig | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8187se/ieee80211/ieee80211_module.c | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8187se/r8180_core.c | 25 | ||||
-rw-r--r-- | drivers/staging/rtl8187se/r8180_dm.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8187se/r8180_pm.c | 6 |
6 files changed, 24 insertions, 18 deletions
diff --git a/drivers/staging/rtl8187se/Kconfig b/drivers/staging/rtl8187se/Kconfig index f636296b54b..236e4272544 100644 --- a/drivers/staging/rtl8187se/Kconfig +++ b/drivers/staging/rtl8187se/Kconfig @@ -1,6 +1,6 @@ config RTL8187SE tristate "RealTek RTL8187SE Wireless LAN NIC driver" depends on PCI - depends on WIRELESS_EXT && COMPAT_NET_DEV_OPS + depends on WIRELESS_EXT default N ---help--- diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c index 0c9fef0b4e3..c2b61e648e4 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_module.c @@ -114,7 +114,6 @@ struct net_device *alloc_ieee80211(int sizeof_priv) goto failed; } ieee = netdev_priv(dev); - dev->hard_start_xmit = ieee80211_xmit; ieee->dev = dev; diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c index 23519b37538..4d4ee563275 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c @@ -1680,7 +1680,7 @@ inline void update_network(struct ieee80211_network *dst, if(src->wmm_param[0].ac_aci_acm_aifsn|| \ src->wmm_param[1].ac_aci_acm_aifsn|| \ src->wmm_param[2].ac_aci_acm_aifsn|| \ - src->wmm_param[1].ac_aci_acm_aifsn) { + src->wmm_param[3].ac_aci_acm_aifsn) { memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN); } dst->QoS_Enable = src->QoS_Enable; diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index e10413cee0d..7e2fecae813 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -198,7 +198,8 @@ static void __devexit rtl8180_pci_remove(struct pci_dev *pdev); static void rtl8180_shutdown (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - dev->stop(dev); + if (dev->netdev_ops->ndo_stop) + dev->netdev_ops->ndo_stop(dev); pci_disable_device(pdev); } @@ -4551,8 +4552,6 @@ short rtl8180_init(struct net_device *dev) //DMESG("Reported EEPROM chip is a 93c46 (1Kbit)"); } - dev->get_stats = rtl8180_stats; - dev->dev_addr[0]=eprom_read(dev,MAC_ADR) & 0xff; dev->dev_addr[1]=(eprom_read(dev,MAC_ADR) & 0xff00)>>8; dev->dev_addr[2]=eprom_read(dev,MAC_ADR+1) & 0xff; @@ -5832,6 +5831,18 @@ int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -----------------------------PCI STUFF--------------------------- *****************************************************************************/ +static const struct net_device_ops rtl8180_netdev_ops = { + .ndo_open = rtl8180_open, + .ndo_stop = rtl8180_close, + .ndo_get_stats = rtl8180_stats, + .ndo_tx_timeout = rtl8180_restart, + .ndo_do_ioctl = rtl8180_ioctl, + .ndo_set_multicast_list = r8180_set_multicast, + .ndo_set_mac_address = r8180_set_mac_adr, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_start_xmit = ieee80211_xmit, +}; static int __devinit rtl8180_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) @@ -5936,14 +5947,8 @@ static int __devinit rtl8180_pci_probe(struct pci_dev *pdev, dev->irq = pdev->irq; priv->irq = 0; - dev->open = rtl8180_open; - dev->stop = rtl8180_close; - //dev->hard_start_xmit = ieee80211_xmit; - dev->tx_timeout = rtl8180_restart; + dev->netdev_ops = &rtl8180_netdev_ops; dev->wireless_handlers = &r8180_wx_handlers_def; - dev->do_ioctl = rtl8180_ioctl; - dev->set_multicast_list = r8180_set_multicast; - dev->set_mac_address = r8180_set_mac_adr; #if WIRELESS_EXT >= 12 #if WIRELESS_EXT < 17 diff --git a/drivers/staging/rtl8187se/r8180_dm.c b/drivers/staging/rtl8187se/r8180_dm.c index 93b5a7bb255..e772f0f6b67 100644 --- a/drivers/staging/rtl8187se/r8180_dm.c +++ b/drivers/staging/rtl8187se/r8180_dm.c @@ -132,7 +132,7 @@ void rtl8180_tx_pw_wq (struct work_struct *work) // struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq); // struct ieee80211_device * ieee = (struct ieee80211_device*) // container_of(work, struct ieee80211_device, watch_dog_wq); - struct delayed_work *dwork = container_of(work,struct delayed_work,work); + struct delayed_work *dwork = to_delayed_work(work); struct ieee80211_device *ieee = container_of(dwork,struct ieee80211_device,tx_pw_wq); struct net_device *dev = ieee->dev; #else @@ -314,7 +314,7 @@ void rtl8180_hw_dig_wq (struct work_struct *work) // struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq); // struct ieee80211_device * ieee = (struct ieee80211_device*) // container_of(work, struct ieee80211_device, watch_dog_wq); - struct delayed_work *dwork = container_of(work,struct delayed_work,work); + struct delayed_work *dwork = to_delayed_work(work); struct ieee80211_device *ieee = container_of(dwork,struct ieee80211_device,hw_dig_wq); struct net_device *dev = ieee->dev; #else @@ -1250,7 +1250,7 @@ SetInitialGain: #if LINUX_VERSION_CODE >=KERNEL_VERSION(2,6,20) void rtl8180_rate_adapter(struct work_struct * work) { - struct delayed_work *dwork = container_of(work,struct delayed_work,work); + struct delayed_work *dwork = to_delayed_work(work); struct ieee80211_device *ieee = container_of(dwork,struct ieee80211_device,rate_adapter_wq); struct net_device *dev = ieee->dev; #else diff --git a/drivers/staging/rtl8187se/r8180_pm.c b/drivers/staging/rtl8187se/r8180_pm.c index 3851b936835..2b3d642db77 100644 --- a/drivers/staging/rtl8187se/r8180_pm.c +++ b/drivers/staging/rtl8187se/r8180_pm.c @@ -30,7 +30,8 @@ int rtl8180_suspend (struct pci_dev *pdev, pm_message_t state) if (!netif_running(dev)) goto out_pci_suspend; - dev->stop(dev); + if (dev->netdev_ops->ndo_stop) + dev->netdev_ops->ndo_stop(dev); netif_device_detach(dev); @@ -71,7 +72,8 @@ int rtl8180_resume (struct pci_dev *pdev) if(!netif_running(dev)) goto out; - dev->open(dev); + if (dev->netdev_ops->ndo_open) + dev->netdev_ops->ndo_open(dev); netif_device_attach(dev); out: return 0; |