aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rt2870/rt_main_dev.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-01-05 18:33:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:52:35 -0500
commit1242c70df56978e8abbf715a02fb1c55313f8471 (patch)
treee637dbef6b5cc3dac45b9e5e28737c2cae7ee0c8 /drivers/staging/rt2870/rt_main_dev.c
parent5a501b3011095c9afb396cdade5be8db359df977 (diff)
Staging: rt2870: fix up netdev->priv usage
Now that netdev->priv is removed, fix the driver to use netdev->ml_priv like it always should have been doing. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2870/rt_main_dev.c')
-rw-r--r--drivers/staging/rt2870/rt_main_dev.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/staging/rt2870/rt_main_dev.c b/drivers/staging/rt2870/rt_main_dev.c
index 16cace7b4c1..b990f8a6164 100644
--- a/drivers/staging/rt2870/rt_main_dev.c
+++ b/drivers/staging/rt2870/rt_main_dev.c
@@ -125,7 +125,7 @@ Note:
125*/ 125*/
126int MainVirtualIF_close(IN struct net_device *net_dev) 126int MainVirtualIF_close(IN struct net_device *net_dev)
127{ 127{
128 RTMP_ADAPTER *pAd = net_dev->priv; 128 RTMP_ADAPTER *pAd = net_dev->ml_priv;
129 129
130 // Sanity check for pAd 130 // Sanity check for pAd
131 if (pAd == NULL) 131 if (pAd == NULL)
@@ -165,7 +165,7 @@ Note:
165*/ 165*/
166int MainVirtualIF_open(IN struct net_device *net_dev) 166int MainVirtualIF_open(IN struct net_device *net_dev)
167{ 167{
168 RTMP_ADAPTER *pAd = net_dev->priv; 168 RTMP_ADAPTER *pAd = net_dev->ml_priv;
169 169
170 // Sanity check for pAd 170 // Sanity check for pAd
171 if (pAd == NULL) 171 if (pAd == NULL)
@@ -207,7 +207,7 @@ Note:
207int rt28xx_close(IN PNET_DEV dev) 207int rt28xx_close(IN PNET_DEV dev)
208{ 208{
209 struct net_device * net_dev = (struct net_device *)dev; 209 struct net_device * net_dev = (struct net_device *)dev;
210 RTMP_ADAPTER *pAd = net_dev->priv; 210 RTMP_ADAPTER *pAd = net_dev->ml_priv;
211 BOOLEAN Cancelled = FALSE; 211 BOOLEAN Cancelled = FALSE;
212 UINT32 i = 0; 212 UINT32 i = 0;
213#ifdef RT2870 213#ifdef RT2870
@@ -416,7 +416,7 @@ int rt28xx_close(IN PNET_DEV dev)
416 416
417static int rt28xx_init(IN struct net_device *net_dev) 417static int rt28xx_init(IN struct net_device *net_dev)
418{ 418{
419 PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->priv; 419 PRTMP_ADAPTER pAd = net_dev->ml_priv;
420 UINT index; 420 UINT index;
421 UCHAR TmpPhy; 421 UCHAR TmpPhy;
422 NDIS_STATUS Status; 422 NDIS_STATUS Status;
@@ -688,8 +688,8 @@ err1:
688#endif // DOT11_N_SUPPORT // 688#endif // DOT11_N_SUPPORT //
689 RT28XX_IRQ_RELEASE(net_dev); 689 RT28XX_IRQ_RELEASE(net_dev);
690 690
691 // shall not set priv to NULL here because the priv didn't been free yet. 691 // shall not set ml_priv to NULL here because the ml_priv didn't been free yet.
692 //net_dev->priv = 0; 692 //net_dev->ml_priv = 0;
693#ifdef INF_AMAZON_SE 693#ifdef INF_AMAZON_SE
694err0: 694err0:
695#endif // INF_AMAZON_SE // 695#endif // INF_AMAZON_SE //
@@ -716,7 +716,7 @@ Note:
716int rt28xx_open(IN PNET_DEV dev) 716int rt28xx_open(IN PNET_DEV dev)
717{ 717{
718 struct net_device * net_dev = (struct net_device *)dev; 718 struct net_device * net_dev = (struct net_device *)dev;
719 PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->priv; 719 PRTMP_ADAPTER pAd = net_dev->ml_priv;
720 int retval = 0; 720 int retval = 0;
721 POS_COOKIE pObj; 721 POS_COOKIE pObj;
722 722
@@ -725,7 +725,7 @@ int rt28xx_open(IN PNET_DEV dev)
725 if (pAd == NULL) 725 if (pAd == NULL)
726 { 726 {
727 /* if 1st open fail, pAd will be free; 727 /* if 1st open fail, pAd will be free;
728 So the net_dev->priv will be NULL in 2rd open */ 728 So the net_dev->ml_priv will be NULL in 2rd open */
729 return -1; 729 return -1;
730 } 730 }
731 731
@@ -1416,7 +1416,7 @@ INT __devinit rt28xx_probe(
1416 if (status != NDIS_STATUS_SUCCESS) 1416 if (status != NDIS_STATUS_SUCCESS)
1417 goto err_out_free_netdev; 1417 goto err_out_free_netdev;
1418 1418
1419 net_dev->priv = (PVOID)pAd; 1419 net_dev->ml_priv = (PVOID)pAd;
1420 pAd->net_dev = net_dev; // must be before RT28XXNetDevInit() 1420 pAd->net_dev = net_dev; // must be before RT28XXNetDevInit()
1421 1421
1422 RT28XXNetDevInit(_dev_p, net_dev, pAd); 1422 RT28XXNetDevInit(_dev_p, net_dev, pAd);
@@ -1517,7 +1517,7 @@ Note:
1517int rt28xx_packet_xmit(struct sk_buff *skb) 1517int rt28xx_packet_xmit(struct sk_buff *skb)
1518{ 1518{
1519 struct net_device *net_dev = skb->dev; 1519 struct net_device *net_dev = skb->dev;
1520 PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv; 1520 PRTMP_ADAPTER pAd = net_dev->ml_priv;
1521 int status = 0; 1521 int status = 0;
1522 PNDIS_PACKET pPacket = (PNDIS_PACKET) skb; 1522 PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
1523 1523
@@ -1605,7 +1605,7 @@ INT rt28xx_send_packets(
1605 IN struct sk_buff *skb_p, 1605 IN struct sk_buff *skb_p,
1606 IN struct net_device *net_dev) 1606 IN struct net_device *net_dev)
1607{ 1607{
1608 RTMP_ADAPTER *pAd = net_dev->priv; 1608 RTMP_ADAPTER *pAd = net_dev->ml_priv;
1609 1609
1610 if (!(net_dev->flags & IFF_UP)) 1610 if (!(net_dev->flags & IFF_UP))
1611 { 1611 {
@@ -1717,7 +1717,7 @@ static BOOLEAN RT28XXAvailRANameAssign(
1717struct iw_statistics *rt28xx_get_wireless_stats( 1717struct iw_statistics *rt28xx_get_wireless_stats(
1718 IN struct net_device *net_dev) 1718 IN struct net_device *net_dev)
1719{ 1719{
1720 PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv; 1720 PRTMP_ADAPTER pAd = net_dev->ml_priv;
1721 1721
1722 1722
1723 DBGPRINT(RT_DEBUG_TRACE, ("rt28xx_get_wireless_stats --->\n")); 1723 DBGPRINT(RT_DEBUG_TRACE, ("rt28xx_get_wireless_stats --->\n"));
@@ -1769,18 +1769,18 @@ INT rt28xx_ioctl(
1769 1769
1770 if (net_dev->priv_flags == INT_MAIN) 1770 if (net_dev->priv_flags == INT_MAIN)
1771 { 1771 {
1772 pAd = net_dev->priv; 1772 pAd = net_dev->ml_priv;
1773 } 1773 }
1774 else 1774 else
1775 { 1775 {
1776 pVirtualAd = net_dev->priv; 1776 pVirtualAd = net_dev->ml_priv;
1777 pAd = pVirtualAd->RtmpDev->priv; 1777 pAd = pVirtualAd->RtmpDev->ml_priv;
1778 } 1778 }
1779 1779
1780 if (pAd == NULL) 1780 if (pAd == NULL)
1781 { 1781 {
1782 /* if 1st open fail, pAd will be free; 1782 /* if 1st open fail, pAd will be free;
1783 So the net_dev->priv will be NULL in 2rd open */ 1783 So the net_dev->ml_priv will be NULL in 2rd open */
1784 return -ENETDOWN; 1784 return -ENETDOWN;
1785 } 1785 }
1786 1786
@@ -1817,7 +1817,7 @@ struct net_device_stats *RT28xx_get_ether_stats(
1817 RTMP_ADAPTER *pAd = NULL; 1817 RTMP_ADAPTER *pAd = NULL;
1818 1818
1819 if (net_dev) 1819 if (net_dev)
1820 pAd = net_dev->priv; 1820 pAd = net_dev->ml_priv;
1821 1821
1822 if (pAd) 1822 if (pAd)
1823 { 1823 {