Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 228553 | Differences between
and this patch

Collapse All | Expand All

(-)old/2008_0925_RT2870_Linux_STA_v1.4.0.0/common/2870_rtmp_init.c (-1 / +1 lines)
Lines 763-769 Note: Link Here
763
NDIS_STATUS	 CreateThreads( 
763
NDIS_STATUS	 CreateThreads( 
764
	IN	struct net_device *net_dev)
764
	IN	struct net_device *net_dev)
765
{
765
{
766
	PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
766
	PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->ml_priv;
767
	POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
767
	POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
768
	pid_t pid_number = -1;
768
	pid_t pid_number = -1;
769
	
769
	
(-)old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_main_dev.c (-16 / +16 lines)
Lines 125-131 Note: Link Here
125
*/
125
*/
126
int MainVirtualIF_close(IN struct net_device *net_dev)
126
int 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)
Lines 165-171 Note: Link Here
165
*/
165
*/
166
int MainVirtualIF_open(IN struct net_device *net_dev)
166
int 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)
Lines 207-213 Note: Link Here
207
int rt28xx_close(IN PNET_DEV dev)
207
int 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
Lines 416-422 int rt28xx_close(IN PNET_DEV dev) Link Here
416
416
417
static int rt28xx_init(IN struct net_device *net_dev)
417
static int rt28xx_init(IN struct net_device *net_dev)
418
{
418
{
419
	PRTMP_ADAPTER 			pAd = (PRTMP_ADAPTER)net_dev->priv;
419
	PRTMP_ADAPTER 			pAd = (PRTMP_ADAPTER)net_dev->ml_priv;
420
	UINT					index;
420
	UINT					index;
421
	UCHAR					TmpPhy;
421
	UCHAR					TmpPhy;
422
	NDIS_STATUS				Status;
422
	NDIS_STATUS				Status;
Lines 689-695 err1: Link Here
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 priv to NULL here because the 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
694
err0:
694
err0:
695
#endif // INF_AMAZON_SE //
695
#endif // INF_AMAZON_SE //
Lines 716-722 Note: Link Here
716
int rt28xx_open(IN PNET_DEV dev)
716
int 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 = (PRTMP_ADAPTER)net_dev->ml_priv;
720
	int retval = 0;
720
	int retval = 0;
721
 	POS_COOKIE pObj;
721
 	POS_COOKIE pObj;
722
722
Lines 725-731 int rt28xx_open(IN PNET_DEV dev) Link Here
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
Lines 1416-1422 INT __devinit rt28xx_probe( Link Here
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);
Lines 1517-1523 Note: Link Here
1517
int rt28xx_packet_xmit(struct sk_buff *skb)
1517
int 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 = (PRTMP_ADAPTER) 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
Lines 1605-1611 INT rt28xx_send_packets( Link Here
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
	{
Lines 1717-1723 static BOOLEAN RT28XXAvailRANameAssign( Link Here
1717
struct iw_statistics *rt28xx_get_wireless_stats(
1717
struct 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 = (PRTMP_ADAPTER) 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"));
Lines 1769-1786 INT rt28xx_ioctl( Link Here
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
Lines 1817-1823 struct net_device_stats *RT28xx_get_ethe Link Here
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
	{
(-)old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_profile.c (-4 / +5 lines)
Lines 925-933 NDIS_STATUS RTMPReadParametersHook( Link Here
925
925
926
	// Save uid and gid used for filesystem access.
926
	// Save uid and gid used for filesystem access.
927
	// Set user and group to 0 (root)	
927
	// Set user and group to 0 (root)	
928
	orgfsuid = current->fsuid;
928
	orgfsuid = current_fsuid();
929
	orgfsgid = current->fsgid;
929
	orgfsgid = current_fsgid();
930
	current->fsuid=current->fsgid = 0;
930
	/*	current->fsuid=current->fsgid = 0;*/
931
    orgfs = get_fs();
931
    orgfs = get_fs();
932
    set_fs(KERNEL_DS);
932
    set_fs(KERNEL_DS);
933
933
Lines 1590-1598 NDIS_STATUS RTMPReadParametersHook( Link Here
1590
	}
1590
	}
1591
1591
1592
	set_fs(orgfs);
1592
	set_fs(orgfs);
1593
#if 0
1593
	current->fsuid = orgfsuid;
1594
	current->fsuid = orgfsuid;
1594
	current->fsgid = orgfsgid;
1595
	current->fsgid = orgfsgid;
1595
1596
#endif
1596
	kfree(buffer);
1597
	kfree(buffer);
1597
	kfree(tmpbuf);
1598
	kfree(tmpbuf);
1598
1599
(-)old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/sta_ioctl.c (-65 / +65 lines)
Lines 580-586 rt_ioctl_giwname(struct net_device *dev, Link Here
580
		   struct iw_request_info *info,
580
		   struct iw_request_info *info,
581
		   char *name, char *extra)
581
		   char *name, char *extra)
582
{
582
{
583
//	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
583
//	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
584
584
585
#ifdef RT2870
585
#ifdef RT2870
586
	strncpy(name, "RT2870 Wireless", IFNAMSIZ);
586
	strncpy(name, "RT2870 Wireless", IFNAMSIZ);
Lines 592-598 int rt_ioctl_siwfreq(struct net_device * Link Here
592
			struct iw_request_info *info,
592
			struct iw_request_info *info,
593
			struct iw_freq *freq, char *extra)
593
			struct iw_freq *freq, char *extra)
594
{
594
{
595
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
595
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
596
	int 	chan = -1;
596
	int 	chan = -1;
597
597
598
    //check if the interface is down
598
    //check if the interface is down
Lines 632-650 int rt_ioctl_giwfreq(struct net_device * Link Here
632
632
633
	if (dev->priv_flags == INT_MAIN)
633
	if (dev->priv_flags == INT_MAIN)
634
	{
634
	{
635
		pAdapter = dev->priv;
635
		pAdapter = dev->ml_priv;
636
	}
636
	}
637
	else
637
	else
638
	{
638
	{
639
		pVirtualAd = dev->priv;
639
		pVirtualAd = dev->ml_priv;
640
		if (pVirtualAd && pVirtualAd->RtmpDev)
640
		if (pVirtualAd && pVirtualAd->RtmpDev)
641
			pAdapter = pVirtualAd->RtmpDev->priv;
641
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
642
	}
642
	}
643
643
644
	if (pAdapter == NULL)
644
	if (pAdapter == NULL)
645
	{
645
	{
646
		/* if 1st open fail, pAd will be free;
646
		/* if 1st open fail, pAd will be free;
647
		   So the net_dev->priv will be NULL in 2rd open */
647
		   So the net_dev->ml_priv will be NULL in 2rd open */
648
		return -ENETDOWN;
648
		return -ENETDOWN;
649
	}
649
	}
650
650
Lines 662-668 int rt_ioctl_siwmode(struct net_device * Link Here
662
		   struct iw_request_info *info,
662
		   struct iw_request_info *info,
663
		   __u32 *mode, char *extra)
663
		   __u32 *mode, char *extra)
664
{
664
{
665
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
665
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
666
666
667
	//check if the interface is down
667
	//check if the interface is down
668
    if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
668
    if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
Lines 704-722 int rt_ioctl_giwmode(struct net_device * Link Here
704
	
704
	
705
	if (dev->priv_flags == INT_MAIN)
705
	if (dev->priv_flags == INT_MAIN)
706
	{
706
	{
707
		pAdapter = dev->priv;
707
		pAdapter = dev->ml_priv;
708
	}
708
	}
709
	else
709
	else
710
	{
710
	{
711
		pVirtualAd = dev->priv;
711
		pVirtualAd = dev->ml_priv;
712
		if (pVirtualAd && pVirtualAd->RtmpDev)
712
		if (pVirtualAd && pVirtualAd->RtmpDev)
713
			pAdapter = pVirtualAd->RtmpDev->priv;
713
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
714
	}
714
	}
715
715
716
	if (pAdapter == NULL)
716
	if (pAdapter == NULL)
717
	{
717
	{
718
		/* if 1st open fail, pAd will be free;
718
		/* if 1st open fail, pAd will be free;
719
		   So the net_dev->priv will be NULL in 2rd open */
719
		   So the net_dev->ml_priv will be NULL in 2rd open */
720
		return -ENETDOWN;
720
		return -ENETDOWN;
721
	}
721
	}
722
722
Lines 741-747 int rt_ioctl_siwsens(struct net_device * Link Here
741
		   struct iw_request_info *info,
741
		   struct iw_request_info *info,
742
		   char *name, char *extra)
742
		   char *name, char *extra)
743
{
743
{
744
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
744
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
745
745
746
	//check if the interface is down
746
	//check if the interface is down
747
    	if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
747
    	if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
Lines 772-790 int rt_ioctl_giwrange(struct net_device Link Here
772
	
772
	
773
	if (dev->priv_flags == INT_MAIN)
773
	if (dev->priv_flags == INT_MAIN)
774
	{
774
	{
775
		pAdapter = dev->priv;
775
		pAdapter = dev->ml_priv;
776
	}
776
	}
777
	else
777
	else
778
	{
778
	{
779
		pVirtualAd = dev->priv;
779
		pVirtualAd = dev->ml_priv;
780
		if (pVirtualAd && pVirtualAd->RtmpDev)
780
		if (pVirtualAd && pVirtualAd->RtmpDev)
781
			pAdapter = pVirtualAd->RtmpDev->priv;
781
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
782
	}
782
	}
783
783
784
	if (pAdapter == NULL)
784
	if (pAdapter == NULL)
785
	{
785
	{
786
		/* if 1st open fail, pAd will be free;
786
		/* if 1st open fail, pAd will be free;
787
		   So the net_dev->priv will be NULL in 2rd open */
787
		   So the net_dev->ml_priv will be NULL in 2rd open */
788
		return -ENETDOWN;
788
		return -ENETDOWN;
789
	}
789
	}
790
790
Lines 866-872 int rt_ioctl_siwap(struct net_device *de Link Here
866
		      struct iw_request_info *info,
866
		      struct iw_request_info *info,
867
		      struct sockaddr *ap_addr, char *extra)
867
		      struct sockaddr *ap_addr, char *extra)
868
{
868
{
869
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
869
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
870
    NDIS_802_11_MAC_ADDRESS Bssid;
870
    NDIS_802_11_MAC_ADDRESS Bssid;
871
871
872
	//check if the interface is down
872
	//check if the interface is down
Lines 911-929 int rt_ioctl_giwap(struct net_device *de Link Here
911
	
911
	
912
	if (dev->priv_flags == INT_MAIN)
912
	if (dev->priv_flags == INT_MAIN)
913
	{
913
	{
914
		pAdapter = dev->priv;
914
		pAdapter = dev->ml_priv;
915
	}
915
	}
916
	else
916
	else
917
	{
917
	{
918
		pVirtualAd = dev->priv;
918
		pVirtualAd = dev->ml_priv;
919
		if (pVirtualAd && pVirtualAd->RtmpDev)
919
		if (pVirtualAd && pVirtualAd->RtmpDev)
920
			pAdapter = pVirtualAd->RtmpDev->priv;
920
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
921
	}
921
	}
922
922
923
	if (pAdapter == NULL)
923
	if (pAdapter == NULL)
924
	{
924
	{
925
		/* if 1st open fail, pAd will be free;
925
		/* if 1st open fail, pAd will be free;
926
		   So the net_dev->priv will be NULL in 2rd open */
926
		   So the net_dev->ml_priv will be NULL in 2rd open */
927
		return -ENETDOWN;
927
		return -ENETDOWN;
928
	}
928
	}
929
929
Lines 993-999 int rt_ioctl_iwaplist(struct net_device Link Here
993
			struct iw_request_info *info,
993
			struct iw_request_info *info,
994
			struct iw_point *data, char *extra)
994
			struct iw_point *data, char *extra)
995
{
995
{
996
 	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
996
 	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
997
997
998
	struct sockaddr addr[IW_MAX_AP];
998
	struct sockaddr addr[IW_MAX_AP];
999
	struct iw_quality qual[IW_MAX_AP];
999
	struct iw_quality qual[IW_MAX_AP];
Lines 1029-1035 int rt_ioctl_siwscan(struct net_device * Link Here
1029
			struct iw_request_info *info,
1029
			struct iw_request_info *info,
1030
			struct iw_point *data, char *extra)
1030
			struct iw_point *data, char *extra)
1031
{
1031
{
1032
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
1032
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
1033
1033
1034
	ULONG								Now;
1034
	ULONG								Now;
1035
	int Status = NDIS_STATUS_SUCCESS;
1035
	int Status = NDIS_STATUS_SUCCESS;
Lines 1111-1117 int rt_ioctl_giwscan(struct net_device * Link Here
1111
			struct iw_point *data, char *extra)
1111
			struct iw_point *data, char *extra)
1112
{
1112
{
1113
1113
1114
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
1114
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
1115
	int i=0;
1115
	int i=0;
1116
	char *current_ev = extra, *previous_ev = extra;
1116
	char *current_ev = extra, *previous_ev = extra;
1117
	char *end_buf;
1117
	char *end_buf;
Lines 1400-1406 int rt_ioctl_siwessid(struct net_device Link Here
1400
			 struct iw_request_info *info,
1400
			 struct iw_request_info *info,
1401
			 struct iw_point *data, char *essid)
1401
			 struct iw_point *data, char *essid)
1402
{
1402
{
1403
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
1403
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
1404
1404
1405
	//check if the interface is down
1405
	//check if the interface is down
1406
    if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
1406
    if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
Lines 1446-1458 int rt_ioctl_giwessid(struct net_device Link Here
1446
	
1446
	
1447
	if (dev->priv_flags == INT_MAIN)
1447
	if (dev->priv_flags == INT_MAIN)
1448
	{
1448
	{
1449
		pAdapter = dev->priv;
1449
		pAdapter = dev->ml_priv;
1450
	}
1450
	}
1451
	else
1451
	else
1452
	{
1452
	{
1453
		pVirtualAd = dev->priv;
1453
		pVirtualAd = dev->ml_priv;
1454
		if (pVirtualAd && pVirtualAd->RtmpDev)
1454
		if (pVirtualAd && pVirtualAd->RtmpDev)
1455
			pAdapter = pVirtualAd->RtmpDev->priv;
1455
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
1456
	}
1456
	}
1457
1457
1458
	if (pAdapter == NULL)
1458
	if (pAdapter == NULL)
Lines 1499-1505 int rt_ioctl_siwnickn(struct net_device Link Here
1499
			 struct iw_request_info *info,
1499
			 struct iw_request_info *info,
1500
			 struct iw_point *data, char *nickname)
1500
			 struct iw_point *data, char *nickname)
1501
{
1501
{
1502
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
1502
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
1503
1503
1504
    //check if the interface is down
1504
    //check if the interface is down
1505
    if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
1505
    if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
Lines 1527-1539 int rt_ioctl_giwnickn(struct net_device Link Here
1527
	
1527
	
1528
	if (dev->priv_flags == INT_MAIN)
1528
	if (dev->priv_flags == INT_MAIN)
1529
	{
1529
	{
1530
		pAdapter = dev->priv;
1530
		pAdapter = dev->ml_priv;
1531
	}
1531
	}
1532
	else
1532
	else
1533
	{
1533
	{
1534
		pVirtualAd = dev->priv;
1534
		pVirtualAd = dev->ml_priv;
1535
		if (pVirtualAd && pVirtualAd->RtmpDev)
1535
		if (pVirtualAd && pVirtualAd->RtmpDev)
1536
			pAdapter = pVirtualAd->RtmpDev->priv;
1536
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
1537
	}
1537
	}
1538
1538
1539
	if (pAdapter == NULL)
1539
	if (pAdapter == NULL)
Lines 1556-1562 int rt_ioctl_siwrts(struct net_device *d Link Here
1556
		       struct iw_request_info *info,
1556
		       struct iw_request_info *info,
1557
		       struct iw_param *rts, char *extra)
1557
		       struct iw_param *rts, char *extra)
1558
{
1558
{
1559
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
1559
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
1560
	u16 val;
1560
	u16 val;
1561
1561
1562
    //check if the interface is down
1562
    //check if the interface is down
Lines 1590-1602 int rt_ioctl_giwrts(struct net_device *d Link Here
1590
1590
1591
	if (dev->priv_flags == INT_MAIN)
1591
	if (dev->priv_flags == INT_MAIN)
1592
	{
1592
	{
1593
		pAdapter = dev->priv;
1593
		pAdapter = dev->ml_priv;
1594
	}
1594
	}
1595
	else
1595
	else
1596
	{
1596
	{
1597
		pVirtualAd = dev->priv;
1597
		pVirtualAd = dev->ml_priv;
1598
		if (pVirtualAd && pVirtualAd->RtmpDev)
1598
		if (pVirtualAd && pVirtualAd->RtmpDev)
1599
			pAdapter = pVirtualAd->RtmpDev->priv;
1599
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
1600
	}
1600
	}
1601
1601
1602
	if (pAdapter == NULL)
1602
	if (pAdapter == NULL)
Lines 1624-1630 int rt_ioctl_siwfrag(struct net_device * Link Here
1624
			struct iw_request_info *info,
1624
			struct iw_request_info *info,
1625
			struct iw_param *frag, char *extra)
1625
			struct iw_param *frag, char *extra)
1626
{
1626
{
1627
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
1627
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
1628
	u16 val;
1628
	u16 val;
1629
1629
1630
	//check if the interface is down
1630
	//check if the interface is down
Lines 1656-1668 int rt_ioctl_giwfrag(struct net_device * Link Here
1656
	
1656
	
1657
	if (dev->priv_flags == INT_MAIN)
1657
	if (dev->priv_flags == INT_MAIN)
1658
	{
1658
	{
1659
		pAdapter = dev->priv;
1659
		pAdapter = dev->ml_priv;
1660
	}
1660
	}
1661
	else
1661
	else
1662
	{
1662
	{
1663
		pVirtualAd = dev->priv;
1663
		pVirtualAd = dev->ml_priv;
1664
		if (pVirtualAd && pVirtualAd->RtmpDev)
1664
		if (pVirtualAd && pVirtualAd->RtmpDev)
1665
			pAdapter = pVirtualAd->RtmpDev->priv;
1665
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
1666
	}
1666
	}
1667
1667
1668
	if (pAdapter == NULL)
1668
	if (pAdapter == NULL)
Lines 1692-1698 int rt_ioctl_siwencode(struct net_device Link Here
1692
			  struct iw_request_info *info,
1692
			  struct iw_request_info *info,
1693
			  struct iw_point *erq, char *extra)
1693
			  struct iw_point *erq, char *extra)
1694
{
1694
{
1695
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
1695
	PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
1696
1696
1697
	//check if the interface is down
1697
	//check if the interface is down
1698
    	if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
1698
    	if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
Lines 1800-1812 rt_ioctl_giwencode(struct net_device *de Link Here
1800
	
1800
	
1801
	if (dev->priv_flags == INT_MAIN)
1801
	if (dev->priv_flags == INT_MAIN)
1802
	{
1802
	{
1803
		pAdapter = dev->priv;
1803
		pAdapter = dev->ml_priv;
1804
	}
1804
	}
1805
	else
1805
	else
1806
	{
1806
	{
1807
		pVirtualAd = dev->priv;
1807
		pVirtualAd = dev->ml_priv;
1808
		if (pVirtualAd && pVirtualAd->RtmpDev)
1808
		if (pVirtualAd && pVirtualAd->RtmpDev)
1809
			pAdapter = pVirtualAd->RtmpDev->priv;
1809
			pAdapter = pVirtualAd->RtmpDev->ml_priv;
1810
	}
1810
	}
1811
1811
1812
	if (pAdapter == NULL)
1812
	if (pAdapter == NULL)
Lines 1880-1891 rt_ioctl_setparam(struct net_device *dev Link Here
1880
	
1880
	
1881
	if (dev->priv_flags == INT_MAIN)
1881
	if (dev->priv_flags == INT_MAIN)
1882
	{
1882
	{
1883
		pAdapter = dev->priv;
1883
		pAdapter = dev->ml_priv;
1884
	}
1884
	}
1885
	else
1885
	else
1886
	{
1886
	{
1887
		pVirtualAd = dev->priv;
1887
		pVirtualAd = dev->ml_priv;
1888
		pAdapter = pVirtualAd->RtmpDev->priv;
1888
		pAdapter = pVirtualAd->RtmpDev->ml_priv;
1889
	}
1889
	}
1890
	pObj = (POS_COOKIE) pAdapter->OS_Cookie;
1890
	pObj = (POS_COOKIE) pAdapter->OS_Cookie;
1891
1891
Lines 1948-1954 rt_private_get_statistics(struct net_dev Link Here
1948
		struct iw_point *wrq, char *extra)
1948
		struct iw_point *wrq, char *extra)
1949
{
1949
{
1950
	INT				Status = 0;
1950
	INT				Status = 0;
1951
    PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->priv;
1951
    PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->ml_priv;
1952
1952
1953
    if (extra == NULL)
1953
    if (extra == NULL)
1954
    {
1954
    {
Lines 2075-2085 rt_private_show(struct net_device *dev, Link Here
2075
    u32             subcmd = wrq->flags;
2075
    u32             subcmd = wrq->flags;
2076
2076
2077
	if (dev->priv_flags == INT_MAIN)
2077
	if (dev->priv_flags == INT_MAIN)
2078
		pAd = dev->priv;
2078
		pAd = dev->ml_priv;
2079
	else
2079
	else
2080
	{
2080
	{
2081
		pVirtualAd = dev->priv;
2081
		pVirtualAd = dev->ml_priv;
2082
		pAd = pVirtualAd->RtmpDev->priv;
2082
		pAd = pVirtualAd->RtmpDev->ml_priv;
2083
	}
2083
	}
2084
	pObj = (POS_COOKIE) pAd->OS_Cookie;
2084
	pObj = (POS_COOKIE) pAd->OS_Cookie;
2085
2085
Lines 2237-2243 int rt_ioctl_siwmlme(struct net_device * Link Here
2237
			   union iwreq_data *wrqu,
2237
			   union iwreq_data *wrqu,
2238
			   char *extra)
2238
			   char *extra)
2239
{
2239
{
2240
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->priv;
2240
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->ml_priv;
2241
	struct iw_mlme *pMlme = (struct iw_mlme *)wrqu->data.pointer;
2241
	struct iw_mlme *pMlme = (struct iw_mlme *)wrqu->data.pointer;
2242
	MLME_QUEUE_ELEM				MsgElem;
2242
	MLME_QUEUE_ELEM				MsgElem;
2243
	MLME_DISASSOC_REQ_STRUCT	DisAssocReq;
2243
	MLME_DISASSOC_REQ_STRUCT	DisAssocReq;
Lines 2294-2300 int rt_ioctl_siwauth(struct net_device * Link Here
2294
			  struct iw_request_info *info,
2294
			  struct iw_request_info *info,
2295
			  union iwreq_data *wrqu, char *extra)
2295
			  union iwreq_data *wrqu, char *extra)
2296
{
2296
{
2297
	PRTMP_ADAPTER   pAdapter = (PRTMP_ADAPTER) dev->priv;
2297
	PRTMP_ADAPTER   pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
2298
	struct iw_param *param = &wrqu->param;
2298
	struct iw_param *param = &wrqu->param;
2299
2299
2300
    //check if the interface is down
2300
    //check if the interface is down
Lines 2447-2453 int rt_ioctl_giwauth(struct net_device * Link Here
2447
			       struct iw_request_info *info,
2447
			       struct iw_request_info *info,
2448
			       union iwreq_data *wrqu, char *extra)
2448
			       union iwreq_data *wrqu, char *extra)
2449
{
2449
{
2450
	PRTMP_ADAPTER   pAdapter = (PRTMP_ADAPTER) dev->priv;
2450
	PRTMP_ADAPTER   pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
2451
	struct iw_param *param = &wrqu->param;
2451
	struct iw_param *param = &wrqu->param;
2452
2452
2453
    //check if the interface is down
2453
    //check if the interface is down
Lines 2521-2527 int rt_ioctl_siwencodeext(struct net_dev Link Here
2521
			   union iwreq_data *wrqu,
2521
			   union iwreq_data *wrqu,
2522
			   char *extra)
2522
			   char *extra)
2523
			{
2523
			{
2524
    PRTMP_ADAPTER   pAdapter = (PRTMP_ADAPTER) dev->priv;
2524
    PRTMP_ADAPTER   pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
2525
	struct iw_point *encoding = &wrqu->encoding;
2525
	struct iw_point *encoding = &wrqu->encoding;
2526
	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
2526
	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
2527
    int keyIdx, alg = ext->alg;
2527
    int keyIdx, alg = ext->alg;
Lines 2649-2655 rt_ioctl_giwencodeext(struct net_device Link Here
2649
			  struct iw_request_info *info,
2649
			  struct iw_request_info *info,
2650
			  union iwreq_data *wrqu, char *extra)
2650
			  union iwreq_data *wrqu, char *extra)
2651
{
2651
{
2652
	PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
2652
	PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
2653
	PCHAR pKey = NULL;
2653
	PCHAR pKey = NULL;
2654
	struct iw_point *encoding = &wrqu->encoding;
2654
	struct iw_point *encoding = &wrqu->encoding;
2655
	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
2655
	struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
Lines 2733-2739 int rt_ioctl_siwgenie(struct net_device Link Here
2733
			  struct iw_request_info *info,
2733
			  struct iw_request_info *info,
2734
			  union iwreq_data *wrqu, char *extra)
2734
			  union iwreq_data *wrqu, char *extra)
2735
{
2735
{
2736
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->priv;
2736
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->ml_priv;
2737
	
2737
	
2738
	if (wrqu->data.length > MAX_LEN_OF_RSNIE ||
2738
	if (wrqu->data.length > MAX_LEN_OF_RSNIE ||
2739
	    (wrqu->data.length && extra == NULL))
2739
	    (wrqu->data.length && extra == NULL))
Lines 2758-2764 int rt_ioctl_giwgenie(struct net_device Link Here
2758
			       struct iw_request_info *info,
2758
			       struct iw_request_info *info,
2759
			       union iwreq_data *wrqu, char *extra)
2759
			       union iwreq_data *wrqu, char *extra)
2760
{
2760
{
2761
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->priv;
2761
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->ml_priv;
2762
	
2762
	
2763
	if ((pAd->StaCfg.RSNIE_Len == 0) ||
2763
	if ((pAd->StaCfg.RSNIE_Len == 0) ||
2764
		(pAd->StaCfg.AuthMode < Ndis802_11AuthModeWPA))
2764
		(pAd->StaCfg.AuthMode < Ndis802_11AuthModeWPA))
Lines 2804-2810 int rt_ioctl_siwpmksa(struct net_device Link Here
2804
			   union iwreq_data *wrqu,
2804
			   union iwreq_data *wrqu,
2805
			   char *extra)
2805
			   char *extra)
2806
{
2806
{
2807
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->priv;
2807
	PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->ml_priv;
2808
	struct iw_pmksa *pPmksa = (struct iw_pmksa *)wrqu->data.pointer;
2808
	struct iw_pmksa *pPmksa = (struct iw_pmksa *)wrqu->data.pointer;
2809
	INT	CachedIdx = 0, idx = 0;
2809
	INT	CachedIdx = 0, idx = 0;
2810
2810
Lines 2888-2894 rt_private_ioctl_bbp(struct net_device * Link Here
2888
	UINT32				bbpValue;
2888
	UINT32				bbpValue;
2889
	BOOLEAN				bIsPrintAllBBP = FALSE;
2889
	BOOLEAN				bIsPrintAllBBP = FALSE;
2890
	INT					Status = 0;
2890
	INT					Status = 0;
2891
    PRTMP_ADAPTER       pAdapter = (PRTMP_ADAPTER) dev->priv;
2891
    PRTMP_ADAPTER       pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
2892
2892
2893
2893
2894
	memset(extra, 0x00, IW_PRIV_SIZE_MASK);
2894
	memset(extra, 0x00, IW_PRIV_SIZE_MASK);
Lines 3015-3021 int rt_ioctl_siwrate(struct net_device * Link Here
3015
			struct iw_request_info *info,
3015
			struct iw_request_info *info,
3016
			union iwreq_data *wrqu, char *extra)
3016
			union iwreq_data *wrqu, char *extra)
3017
{
3017
{
3018
    PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->priv;
3018
    PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->ml_priv;
3019
    UINT32          rate = wrqu->bitrate.value, fixed = wrqu->bitrate.fixed;
3019
    UINT32          rate = wrqu->bitrate.value, fixed = wrqu->bitrate.fixed;
3020
3020
3021
    //check if the interface is down
3021
    //check if the interface is down
Lines 3073-3079 int rt_ioctl_giwrate(struct net_device * Link Here
3073
			       struct iw_request_info *info,
3073
			       struct iw_request_info *info,
3074
			       union iwreq_data *wrqu, char *extra)
3074
			       union iwreq_data *wrqu, char *extra)
3075
{
3075
{
3076
    PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->priv;
3076
    PRTMP_ADAPTER   pAd = (PRTMP_ADAPTER) dev->ml_priv;
3077
    int rate_index = 0, rate_count = 0;
3077
    int rate_index = 0, rate_count = 0;
3078
    HTTRANSMIT_SETTING ht_setting; 
3078
    HTTRANSMIT_SETTING ht_setting; 
3079
    __s32 ralinkrate[] =
3079
    __s32 ralinkrate[] =
Lines 5483-5494 INT rt28xx_sta_ioctl( Link Here
5483
5483
5484
	if (net_dev->priv_flags == INT_MAIN)
5484
	if (net_dev->priv_flags == INT_MAIN)
5485
	{
5485
	{
5486
		pAd = net_dev->priv;
5486
		pAd = net_dev->ml_priv;
5487
	}
5487
	}
5488
	else
5488
	else
5489
	{
5489
	{
5490
		pVirtualAd = net_dev->priv;
5490
		pVirtualAd = net_dev->ml_priv;
5491
		pAd = pVirtualAd->RtmpDev->priv;
5491
		pAd = pVirtualAd->RtmpDev->ml_priv;
5492
	}
5492
	}
5493
	pObj = (POS_COOKIE) pAd->OS_Cookie;
5493
	pObj = (POS_COOKIE) pAd->OS_Cookie;
5494
5494

Return to bug 228553