Author: oget
Update of /cvs/free/rpms/rt2870-kmod/F-10
In directory se02.es.rpmfusion.net:/tmp/cvs-serv31078
Modified Files:
.cvsignore rt2870-2.6.29-compile.patch
rt2870-Makefile.x-fixes.patch
rt2870-NetworkManager-support.patch rt2870-kmod.spec
rt2870-strip-tftpboot-copy.patch sources
Removed Files:
rt2870-additional-devices-support.patch
Log Message:
* Thu Mar 26 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> -
2.1.0.0-1
- New upstream version
- Drop additional-devices patch since it is upstreamed
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/rt2870-kmod/F-10/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore 5 Oct 2008 13:33:29 -0000 1.2
+++ .cvsignore 26 Mar 2009 05:31:48 -0000 1.3
@@ -1 +1 @@
-2008_0925_RT2870_Linux_STA_v1.4.0.0.tar.bz2
+2009_0302_RT2870_Linux_STA_v2.1.0.0.tar.bz2
rt2870-2.6.29-compile.patch:
Index: rt2870-2.6.29-compile.patch
===================================================================
RCS file: /cvs/free/rpms/rt2870-kmod/F-10/rt2870-2.6.29-compile.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rt2870-2.6.29-compile.patch 11 Jan 2009 15:20:58 -0000 1.1
+++ rt2870-2.6.29-compile.patch 26 Mar 2009 05:31:48 -0000 1.2
@@ -1,630 +1,593 @@
-diff -rupN old/2008_0925_RT2870_Linux_STA_v1.4.0.0/common/2870_rtmp_init.c
new/2008_0925_RT2870_Linux_STA_v1.4.0.0/common/2870_rtmp_init.c
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/common/2870_rtmp_init.c 2008-09-18
22:59:12.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/common/2870_rtmp_init.c 2009-01-10
16:34:25.000000000 -0500
-@@ -763,7 +763,7 @@ Note:
- NDIS_STATUS CreateThreads(
- IN struct net_device *net_dev)
- {
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
-+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->ml_priv;
- POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie;
- pid_t pid_number = -1;
-
-diff -rupN old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_main_dev.c
new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_main_dev.c
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_main_dev.c 2008-09-19
01:40:02.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_main_dev.c 2009-01-10
16:34:15.000000000 -0500
-@@ -125,7 +125,7 @@ Note:
+diff -rupN 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/rt_linux.c
2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/rt_linux.c
+--- 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/rt_linux.c 2009-03-02
00:25:40.000000000 -0500
++++ 2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/rt_linux.c 2009-03-25 21:28:36.000000000
-0400
+@@ -1309,8 +1309,12 @@ int RtmpOSNetDevAddrSet(
+ RTMP_ADAPTER *pAd;
+
+ net_dev = pNetDev;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ pAd = (RTMP_ADAPTER *)net_dev->priv;
+-
++#else
++ pAd = (RTMP_ADAPTER *)net_dev->ml_priv;
++#endif
++
+ #ifdef CONFIG_STA_SUPPORT
+ // work-around for the SuSE due to it has it's own interface name management
system.
+ IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
+@@ -1502,8 +1506,12 @@ int RtmpOSNetDevAttach(
+ // If we need hook some callback function to the net device structrue, now do it.
+ if (pDevOpHook)
+ {
+- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pNetDev->priv;
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
++ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pNetDev->priv;
++#else
++ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)pNetDev->ml_priv;
++#endif
++
+ pNetDev->open = pDevOpHook->open;
+ pNetDev->stop = pDevOpHook->stop;
+ pNetDev->hard_start_xmit = (HARD_START_XMIT_FUNC)(pDevOpHook->xmit);
+diff -rupN 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/rt_main_dev.c
2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/rt_main_dev.c
+--- 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/rt_main_dev.c 2009-03-01
21:54:46.000000000 -0500
++++ 2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/rt_main_dev.c 2009-03-25
22:24:30.000000000 -0400
+@@ -93,8 +93,11 @@ Note:
*/
int MainVirtualIF_close(IN struct net_device *net_dev)
{
-- RTMP_ADAPTER *pAd = net_dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ RTMP_ADAPTER *pAd = net_dev->priv;
+-
++#else
+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
-
++#endif
// Sanity check for pAd
if (pAd == NULL)
-@@ -165,7 +165,7 @@ Note:
+ return 0; // close ok
+@@ -133,7 +136,11 @@ Note:
*/
int MainVirtualIF_open(IN struct net_device *net_dev)
{
-- RTMP_ADAPTER *pAd = net_dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ RTMP_ADAPTER *pAd = net_dev->priv;
++#else
+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
++#endif
// Sanity check for pAd
if (pAd == NULL)
-@@ -207,7 +207,7 @@ Note:
+@@ -175,7 +182,11 @@ Note:
int rt28xx_close(IN PNET_DEV dev)
{
struct net_device * net_dev = (struct net_device *)dev;
-- RTMP_ADAPTER *pAd = net_dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ RTMP_ADAPTER *pAd = net_dev->priv;
++#else
+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
- BOOLEAN Cancelled = FALSE;
++#endif
+ BOOLEAN Cancelled;
UINT32 i = 0;
- #ifdef RT2870
-@@ -416,7 +416,7 @@ int rt28xx_close(IN PNET_DEV dev)
-
- static int rt28xx_init(IN struct net_device *net_dev)
- {
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->priv;
-+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->ml_priv;
- UINT index;
- UCHAR TmpPhy;
- NDIS_STATUS Status;
-@@ -689,7 +689,7 @@ err1:
- RT28XX_IRQ_RELEASE(net_dev);
-
- // shall not set priv to NULL here because the priv didn't been free yet.
-- //net_dev->priv = 0;
-+ //net_dev->ml_priv = 0;
- #ifdef INF_AMAZON_SE
- err0:
- #endif // INF_AMAZON_SE //
-@@ -716,7 +716,7 @@ Note:
+ #ifdef RTMP_MAC_USB
+@@ -404,7 +415,11 @@ Note:
int rt28xx_open(IN PNET_DEV dev)
{
struct net_device * net_dev = (struct net_device *)dev;
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->ml_priv;
++#endif
int retval = 0;
- POS_COOKIE pObj;
+ //POS_COOKIE pObj;
-@@ -725,7 +725,7 @@ int rt28xx_open(IN PNET_DEV dev)
- if (pAd == NULL)
- {
- /* if 1st open fail, pAd will be free;
-- So the net_dev->priv will be NULL in 2rd open */
-+ So the net_dev->ml_priv will be NULL in 2rd open */
- return -1;
- }
-
-@@ -1416,7 +1416,7 @@ INT __devinit rt28xx_probe(
- if (status != NDIS_STATUS_SUCCESS)
- goto err_out_free_netdev;
+@@ -522,8 +537,11 @@ PNET_DEV RtmpPhyNetDevInit(
+ pNetDevHook->get_stats = RT28xx_get_ether_stats;
-- net_dev->priv = (PVOID)pAd;
+ pNetDevHook->needProtcted = FALSE;
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ net_dev->priv = (PVOID)pAd;
++#else
+ net_dev->ml_priv = (PVOID)pAd;
- pAd->net_dev = net_dev; // must be before RT28XXNetDevInit()
++#endif
+ pAd->net_dev = net_dev;
+
- RT28XXNetDevInit(_dev_p, net_dev, pAd);
-@@ -1517,7 +1517,7 @@ Note:
+@@ -559,7 +577,11 @@ Note:
int rt28xx_packet_xmit(struct sk_buff *skb)
{
struct net_device *net_dev = skb->dev;
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->ml_priv;
++#endif
int status = 0;
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
-@@ -1605,7 +1605,7 @@ INT rt28xx_send_packets(
+@@ -641,7 +663,11 @@ static int rt28xx_send_packets(
IN struct sk_buff *skb_p,
IN struct net_device *net_dev)
{
-- RTMP_ADAPTER *pAd = net_dev->priv;
-+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ RTMP_ADAPTER *pAd = net_dev->priv;
++#else
++ RTMP_ADAPTER *pAd = net_dev->ml_priv;
++#endif
if (!(net_dev->flags & IFF_UP))
{
-@@ -1717,7 +1717,7 @@ static BOOLEAN RT28XXAvailRANameAssign(
+@@ -661,7 +687,11 @@ static int rt28xx_send_packets(
struct iw_statistics *rt28xx_get_wireless_stats(
IN struct net_device *net_dev)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->ml_priv;
++#endif
DBGPRINT(RT_DEBUG_TRACE, ("rt28xx_get_wireless_stats --->\n"));
-@@ -1769,18 +1769,18 @@ INT rt28xx_ioctl(
-
- if (net_dev->priv_flags == INT_MAIN)
- {
-- pAd = net_dev->priv;
-+ pAd = net_dev->ml_priv;
- }
- else
- {
-- pVirtualAd = net_dev->priv;
-- pAd = pVirtualAd->RtmpDev->priv;
-+ pVirtualAd = net_dev->ml_priv;
-+ pAd = pVirtualAd->RtmpDev->ml_priv;
- }
-
+@@ -709,7 +739,11 @@ INT rt28xx_ioctl(
+ RTMP_ADAPTER *pAd = NULL;
+ INT ret = 0;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ pAd = net_dev->priv;
++#else
++ pAd = net_dev->ml_priv;
++#endif
if (pAd == NULL)
{
/* if 1st open fail, pAd will be free;
-- So the net_dev->priv will be NULL in 2rd open */
-+ So the net_dev->ml_priv will be NULL in 2rd open */
- return -ENETDOWN;
- }
-
-@@ -1817,7 +1817,7 @@ struct net_device_stats *RT28xx_get_ethe
+@@ -751,7 +785,11 @@ static struct net_device_stats *RT28xx_g
RTMP_ADAPTER *pAd = NULL;
if (net_dev)
-- pAd = net_dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ pAd = net_dev->priv;
++#else
+ pAd = net_dev->ml_priv;
++#endif
if (pAd)
{
-diff -rupN old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_profile.c
new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_profile.c
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_profile.c 2008-09-19
01:40:52.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/rt_profile.c 2009-01-10
16:34:15.000000000 -0500
-@@ -925,9 +925,9 @@ NDIS_STATUS RTMPReadParametersHook(
-
- // Save uid and gid used for filesystem access.
- // Set user and group to 0 (root)
-- orgfsuid = current->fsuid;
-- orgfsgid = current->fsgid;
-- current->fsuid=current->fsgid = 0;
-+ orgfsuid = current_fsuid();
-+ orgfsgid = current_fsgid();
-+ /* current->fsuid=current->fsgid = 0;*/
- orgfs = get_fs();
- set_fs(KERNEL_DS);
-
-@@ -1590,9 +1590,10 @@ NDIS_STATUS RTMPReadParametersHook(
- }
-
- set_fs(orgfs);
-+#if 0
- current->fsuid = orgfsuid;
- current->fsgid = orgfsgid;
--
-+#endif
- kfree(buffer);
- kfree(tmpbuf);
-
-diff -rupN old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/sta_ioctl.c
new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/sta_ioctl.c
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/sta_ioctl.c 2008-09-25
04:28:00.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/sta_ioctl.c 2009-01-10
16:34:05.000000000 -0500
-@@ -580,7 +580,7 @@ rt_ioctl_giwname(struct net_device *dev,
- struct iw_request_info *info,
- char *name, char *extra)
- {
--// PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
-+// PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
-
- #ifdef RT2870
- strncpy(name, "RT2870 Wireless", IFNAMSIZ);
-@@ -592,7 +592,7 @@ int rt_ioctl_siwfreq(struct net_device *
+diff -rupN 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/sta_ioctl.c
2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/sta_ioctl.c
+--- 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/sta_ioctl.c 2009-03-02
00:47:04.000000000 -0500
++++ 2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/sta_ioctl.c 2009-03-25
22:46:53.000000000 -0400
+@@ -612,7 +612,11 @@ int rt_ioctl_siwfreq(struct net_device *
struct iw_request_info *info,
struct iw_freq *freq, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
int chan = -1;
//check if the interface is down
-@@ -632,19 +632,19 @@ int rt_ioctl_giwfreq(struct net_device *
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
-
+@@ -651,7 +655,11 @@ int rt_ioctl_giwfreq(struct net_device *
+ UCHAR ch;
+ ULONG m = 2412000;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ pAdapter = dev->priv;
++#else
++ pAdapter = dev->ml_priv;
++#endif
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
-- So the net_dev->priv will be NULL in 2rd open */
-+ So the net_dev->ml_priv will be NULL in 2rd open */
- return -ENETDOWN;
- }
-
-@@ -662,7 +662,7 @@ int rt_ioctl_siwmode(struct net_device *
+@@ -674,7 +682,11 @@ int rt_ioctl_siwmode(struct net_device *
struct iw_request_info *info,
__u32 *mode, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
-@@ -704,19 +704,19 @@ int rt_ioctl_giwmode(struct net_device *
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
+@@ -712,7 +724,11 @@ int rt_ioctl_giwmode(struct net_device *
+ struct iw_request_info *info,
+ __u32 *mode, char *extra)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (pAdapter == NULL)
{
- /* if 1st open fail, pAd will be free;
-- So the net_dev->priv will be NULL in 2rd open */
-+ So the net_dev->ml_priv will be NULL in 2rd open */
- return -ENETDOWN;
- }
-
-@@ -741,7 +741,7 @@ int rt_ioctl_siwsens(struct net_device *
+@@ -742,7 +758,11 @@ int rt_ioctl_siwsens(struct net_device *
struct iw_request_info *info,
char *name, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
-@@ -772,19 +772,19 @@ int rt_ioctl_giwrange(struct net_device
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
-
- if (pAdapter == NULL)
- {
- /* if 1st open fail, pAd will be free;
-- So the net_dev->priv will be NULL in 2rd open */
-+ So the net_dev->ml_priv will be NULL in 2rd open */
- return -ENETDOWN;
- }
-
-@@ -866,7 +866,7 @@ int rt_ioctl_siwap(struct net_device *de
+@@ -765,7 +785,11 @@ int rt_ioctl_giwrange(struct net_device
+ struct iw_request_info *info,
+ struct iw_point *data, char *extra)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
+ struct iw_range *range = (struct iw_range *) extra;
+ u16 val;
+ int i;
+@@ -855,7 +879,11 @@ int rt_ioctl_siwap(struct net_device *de
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
NDIS_802_11_MAC_ADDRESS Bssid;
//check if the interface is down
-@@ -911,19 +911,19 @@ int rt_ioctl_giwap(struct net_device *de
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
+@@ -895,7 +923,11 @@ int rt_ioctl_giwap(struct net_device *de
+ struct iw_request_info *info,
+ struct sockaddr *ap_addr, char *extra)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (pAdapter == NULL)
{
- /* if 1st open fail, pAd will be free;
-- So the net_dev->priv will be NULL in 2rd open */
-+ So the net_dev->ml_priv will be NULL in 2rd open */
- return -ENETDOWN;
- }
-
-@@ -993,7 +993,7 @@ int rt_ioctl_iwaplist(struct net_device
+@@ -970,7 +1002,11 @@ int rt_ioctl_iwaplist(struct net_device
struct iw_request_info *info,
struct iw_point *data, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
struct sockaddr addr[IW_MAX_AP];
struct iw_quality qual[IW_MAX_AP];
-@@ -1029,7 +1029,7 @@ int rt_ioctl_siwscan(struct net_device *
+@@ -1006,7 +1042,11 @@ int rt_ioctl_siwscan(struct net_device *
struct iw_request_info *info,
struct iw_point *data, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
ULONG Now;
int Status = NDIS_STATUS_SUCCESS;
-@@ -1111,7 +1111,7 @@ int rt_ioctl_giwscan(struct net_device *
+@@ -1088,7 +1128,11 @@ int rt_ioctl_giwscan(struct net_device *
struct iw_point *data, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
int i=0;
- char *current_ev = extra, *previous_ev = extra;
- char *end_buf;
-@@ -1400,7 +1400,7 @@ int rt_ioctl_siwessid(struct net_device
+ PSTRING current_ev = extra, previous_ev = extra;
+ PSTRING end_buf;
+@@ -1457,7 +1501,11 @@ int rt_ioctl_siwessid(struct net_device
struct iw_request_info *info,
struct iw_point *data, char *essid)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
-@@ -1446,13 +1446,13 @@ int rt_ioctl_giwessid(struct net_device
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
+@@ -1498,7 +1546,11 @@ int rt_ioctl_giwessid(struct net_device
+ struct iw_request_info *info,
+ struct iw_point *data, char *essid)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (pAdapter == NULL)
-@@ -1499,7 +1499,7 @@ int rt_ioctl_siwnickn(struct net_device
+ {
+@@ -1544,7 +1596,11 @@ int rt_ioctl_siwnickn(struct net_device
struct iw_request_info *info,
struct iw_point *data, char *nickname)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
-@@ -1527,13 +1527,13 @@ int rt_ioctl_giwnickn(struct net_device
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
+@@ -1567,7 +1623,11 @@ int rt_ioctl_giwnickn(struct net_device
+ struct iw_request_info *info,
+ struct iw_point *data, char *nickname)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (pAdapter == NULL)
-@@ -1556,7 +1556,7 @@ int rt_ioctl_siwrts(struct net_device *d
+ {
+@@ -1589,7 +1649,11 @@ int rt_ioctl_siwrts(struct net_device *d
struct iw_request_info *info,
struct iw_param *rts, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
u16 val;
//check if the interface is down
-@@ -1590,13 +1590,13 @@ int rt_ioctl_giwrts(struct net_device *d
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
+@@ -1618,7 +1682,11 @@ int rt_ioctl_giwrts(struct net_device *d
+ struct iw_request_info *info,
+ struct iw_param *rts, char *extra)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (pAdapter == NULL)
-@@ -1624,7 +1624,7 @@ int rt_ioctl_siwfrag(struct net_device *
+ {
+@@ -1645,7 +1713,11 @@ int rt_ioctl_siwfrag(struct net_device *
struct iw_request_info *info,
struct iw_param *frag, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
u16 val;
//check if the interface is down
-@@ -1656,13 +1656,13 @@ int rt_ioctl_giwfrag(struct net_device *
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
+@@ -1672,7 +1744,11 @@ int rt_ioctl_giwfrag(struct net_device *
+ struct iw_request_info *info,
+ struct iw_param *frag, char *extra)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (pAdapter == NULL)
-@@ -1692,7 +1692,7 @@ int rt_ioctl_siwencode(struct net_device
+ {
+@@ -1701,7 +1777,11 @@ int rt_ioctl_siwencode(struct net_device
struct iw_request_info *info,
struct iw_point *erq, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
//check if the interface is down
- if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
-@@ -1800,13 +1800,13 @@ rt_ioctl_giwencode(struct net_device *de
-
- if (dev->priv_flags == INT_MAIN)
- {
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-+ pVirtualAd = dev->ml_priv;
- if (pVirtualAd && pVirtualAd->RtmpDev)
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
+ if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
+@@ -1807,7 +1887,11 @@ rt_ioctl_giwencode(struct net_device *de
+ struct iw_point *erq, char *key)
+ {
+ int kid;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
++ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (pAdapter == NULL)
-@@ -1880,12 +1880,12 @@ rt_ioctl_setparam(struct net_device *dev
-
- if (dev->priv_flags == INT_MAIN)
{
-- pAdapter = dev->priv;
-+ pAdapter = dev->ml_priv;
- }
- else
- {
-- pVirtualAd = dev->priv;
-- pAdapter = pVirtualAd->RtmpDev->priv;
-+ pVirtualAd = dev->ml_priv;
-+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
- }
- pObj = (POS_COOKIE) pAdapter->OS_Cookie;
-
-@@ -1948,7 +1948,7 @@ rt_private_get_statistics(struct net_dev
+@@ -1877,7 +1961,11 @@ rt_ioctl_setparam(struct net_device *dev
+ PSTRING value;
+ int Status=0;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ pAdapter = dev->priv;
++#else
++ pAdapter = dev->ml_priv;
++#endif
+ if (pAdapter == NULL)
+ {
+ /* if 1st open fail, pAd will be free;
+@@ -1941,7 +2029,11 @@ rt_private_get_statistics(struct net_dev
struct iw_point *wrq, char *extra)
{
INT Status = 0;
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if (extra == NULL)
{
-@@ -2075,11 +2075,11 @@ rt_private_show(struct net_device *dev,
- u32 subcmd = wrq->flags;
-
- if (dev->priv_flags == INT_MAIN)
-- pAd = dev->priv;
-+ pAd = dev->ml_priv;
- else
- {
-- pVirtualAd = dev->priv;
-- pAd = pVirtualAd->RtmpDev->priv;
-+ pVirtualAd = dev->ml_priv;
-+ pAd = pVirtualAd->RtmpDev->ml_priv;
- }
- pObj = (POS_COOKIE) pAd->OS_Cookie;
-
-@@ -2237,7 +2237,7 @@ int rt_ioctl_siwmlme(struct net_device *
+@@ -2068,7 +2160,11 @@ rt_private_show(struct net_device *dev,
+ POS_COOKIE pObj;
+ u32 subcmd = wrq->flags;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ pAd = dev->priv;
++#else
++ pAd = dev->ml_priv;
++#endif
+ if (pAd == NULL)
+ {
+ /* if 1st open fail, pAd will be free;
+@@ -2220,7 +2316,11 @@ int rt_ioctl_siwmlme(struct net_device *
union iwreq_data *wrqu,
char *extra)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
struct iw_mlme *pMlme = (struct iw_mlme *)wrqu->data.pointer;
MLME_QUEUE_ELEM MsgElem;
MLME_DISASSOC_REQ_STRUCT DisAssocReq;
-@@ -2294,7 +2294,7 @@ int rt_ioctl_siwauth(struct net_device *
+@@ -2277,7 +2377,11 @@ int rt_ioctl_siwauth(struct net_device *
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
struct iw_param *param = &wrqu->param;
//check if the interface is down
-@@ -2447,7 +2447,7 @@ int rt_ioctl_giwauth(struct net_device *
+@@ -2430,7 +2534,11 @@ int rt_ioctl_giwauth(struct net_device *
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
struct iw_param *param = &wrqu->param;
//check if the interface is down
-@@ -2521,7 +2521,7 @@ int rt_ioctl_siwencodeext(struct net_dev
+@@ -2504,7 +2612,11 @@ int rt_ioctl_siwencodeext(struct net_dev
union iwreq_data *wrqu,
char *extra)
{
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
struct iw_point *encoding = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int keyIdx, alg = ext->alg;
-@@ -2649,7 +2649,7 @@ rt_ioctl_giwencodeext(struct net_device
+@@ -2629,7 +2741,11 @@ rt_ioctl_giwencodeext(struct net_device
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
PCHAR pKey = NULL;
struct iw_point *encoding = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
-@@ -2733,7 +2733,7 @@ int rt_ioctl_siwgenie(struct net_device
+@@ -2713,7 +2829,11 @@ int rt_ioctl_siwgenie(struct net_device
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
- if (wrqu->data.length > MAX_LEN_OF_RSNIE ||
- (wrqu->data.length && extra == NULL))
-@@ -2758,7 +2758,7 @@ int rt_ioctl_giwgenie(struct net_device
+ DBGPRINT(RT_DEBUG_TRACE ,("===> rt_ioctl_siwgenie\n"));
+ #ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
+@@ -2745,7 +2865,11 @@ int rt_ioctl_giwgenie(struct net_device
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
if ((pAd->StaCfg.RSNIE_Len == 0) ||
(pAd->StaCfg.AuthMode < Ndis802_11AuthModeWPA))
-@@ -2804,7 +2804,7 @@ int rt_ioctl_siwpmksa(struct net_device
+@@ -2791,7 +2915,11 @@ int rt_ioctl_siwpmksa(struct net_device
union iwreq_data *wrqu,
char *extra)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
struct iw_pmksa *pPmksa = (struct iw_pmksa *)wrqu->data.pointer;
INT CachedIdx = 0, idx = 0;
-@@ -2888,7 +2888,7 @@ rt_private_ioctl_bbp(struct net_device *
+@@ -2875,7 +3003,11 @@ rt_private_ioctl_bbp(struct net_device *
UINT32 bbpValue;
BOOLEAN bIsPrintAllBBP = FALSE;
INT Status = 0;
-- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
memset(extra, 0x00, IW_PRIV_SIZE_MASK);
-@@ -3015,7 +3015,7 @@ int rt_ioctl_siwrate(struct net_device *
+@@ -3002,7 +3134,11 @@ int rt_ioctl_siwrate(struct net_device *
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
UINT32 rate = wrqu->bitrate.value, fixed = wrqu->bitrate.fixed;
//check if the interface is down
-@@ -3073,7 +3073,7 @@ int rt_ioctl_giwrate(struct net_device *
+@@ -3060,7 +3196,11 @@ int rt_ioctl_giwrate(struct net_device *
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
-- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
++#else
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->ml_priv;
++#endif
int rate_index = 0, rate_count = 0;
HTTRANSMIT_SETTING ht_setting;
__s32 ralinkrate[] =
-@@ -5483,12 +5483,12 @@ INT rt28xx_sta_ioctl(
+@@ -5512,8 +5652,11 @@ INT rt28xx_sta_ioctl(
+ INT Status = NDIS_STATUS_SUCCESS;
+ USHORT subcmd;
- if (net_dev->priv_flags == INT_MAIN)
- {
-- pAd = net_dev->priv;
-+ pAd = net_dev->ml_priv;
- }
- else
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+ pAd = net_dev->priv;
++#else
++ pAd = net_dev->ml_priv;
++#endif
+ if (pAd == NULL)
{
-- pVirtualAd = net_dev->priv;
-- pAd = pVirtualAd->RtmpDev->priv;
-+ pVirtualAd = net_dev->ml_priv;
-+ pAd = pVirtualAd->RtmpDev->ml_priv;
- }
- pObj = (POS_COOKIE) pAd->OS_Cookie;
-
+ /* if 1st open fail, pAd will be free;
rt2870-Makefile.x-fixes.patch:
Index: rt2870-Makefile.x-fixes.patch
===================================================================
RCS file: /cvs/free/rpms/rt2870-kmod/F-10/rt2870-Makefile.x-fixes.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rt2870-Makefile.x-fixes.patch 5 Oct 2008 13:33:29 -0000 1.1
+++ rt2870-Makefile.x-fixes.patch 26 Mar 2009 05:31:48 -0000 1.2
@@ -1,16 +1,7 @@
-diff -rupN old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.4
new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.4
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.4 2008-09-18
04:12:12.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.4 2008-10-04
16:51:37.000000000 -0400
-@@ -1,8 +1,6 @@
- include $(RT28xx_DIR)/os/linux/config.mk
-
- MOD_NAME = rt$(CHIPSET)sta
--DAT_PATH = /etc/Wireless/RT$(CHIPSET)STA
--DAT_FILE_NAME = RT$(CHIPSET)STA.dat
-
- OBJ := $(MOD_NAME).o
-
-@@ -78,15 +76,12 @@ clean:
+diff -rupN 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/Makefile.4
2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/Makefile.4
+--- 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/Makefile.4 2009-03-01
21:54:15.000000000 -0500
++++ 2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/Makefile.4 2009-03-25 20:37:41.000000000
-0400
+@@ -94,13 +94,15 @@ clean:
rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
install:
@@ -21,30 +12,22 @@
- install -d $(LINUX_SRC_MODULE)
- install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
- /sbin/depmod -a ${shell uname -r}
-+ #install -d $(LINUX_SRC_MODULE)
-+ #install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
++# rm -rf $(DAT_PATH)
++# $(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
++# mkdir $(DAT_PATH)
++# cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
++# install -d $(LINUX_SRC_MODULE)
++# install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
++# /sbin/depmod -a ${shell uname -r}
+ mkdir -p $(INST_DIR)
-+ install -d $(INST_DIR)
+ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(INST_DIR)
-+ #/sbin/depmod -a ${shell uname -r}
uninstall:
--# rm -rf $(DAT_PATH)
-- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
- /sbin/depmod -a ${shell uname -r}
-diff -rupN old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.6
new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.6
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.6 2008-09-18
04:12:42.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/Makefile.6 2008-10-04
16:50:54.000000000 -0400
-@@ -1,8 +1,6 @@
- include $(RT28xx_DIR)/os/linux/config.mk
-
- MOD_NAME = rt$(CHIPSET)sta
--DAT_PATH = /etc/Wireless/RT$(CHIPSET)STA
--DAT_FILE_NAME = RT$(CHIPSET)STA.dat
-
- obj-m := $(MOD_NAME).o
-
-@@ -77,15 +75,11 @@ clean:
+ # rm -rf $(DAT_PATH)
+diff -rupN 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/Makefile.6
2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/Makefile.6
+--- 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/Makefile.6 2009-03-01
21:54:24.000000000 -0500
++++ 2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/Makefile.6 2009-03-25 20:38:49.000000000
-0400
+@@ -89,13 +89,15 @@ clean:
rm -f ../../sta/.*.{cmd,flags,d}
install:
@@ -55,13 +38,15 @@
- install -d $(LINUX_SRC_MODULE)
- install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
- /sbin/depmod -a ${shell uname -r}
--
++# rm -rf $(DAT_PATH)
++# $(shell [ ! -f /etc/Wireless ] && mkdir /etc/Wireless)
++# mkdir $(DAT_PATH)
++# cp $(RT28xx_DIR)/$(DAT_FILE_NAME) $(DAT_PATH)/.
++# install -d $(LINUX_SRC_MODULE)
++# install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
++# /sbin/depmod -a ${shell uname -r}
+ mkdir -p $(INST_DIR)
-+ install -d $(INST_DIR)
-+ #install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
+ install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(INST_DIR)
-+ #/sbin/depmod -a ${shell uname -r}
+
uninstall:
--# rm -rf $(DAT_PATH)
- rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
- /sbin/depmod -a ${shell uname -r}
+ # rm -rf $(DAT_PATH)
rt2870-NetworkManager-support.patch:
Index: rt2870-NetworkManager-support.patch
===================================================================
RCS file: /cvs/free/rpms/rt2870-kmod/F-10/rt2870-NetworkManager-support.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rt2870-NetworkManager-support.patch 5 Oct 2008 13:33:29 -0000 1.1
+++ rt2870-NetworkManager-support.patch 26 Mar 2009 05:31:48 -0000 1.2
@@ -1,15 +1,17 @@
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/config.mk 2008-09-25
04:25:42.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/os/linux/config.mk 2008-10-04
16:39:05.000000000 -0400
-@@ -5,10 +5,10 @@ HAS_ATE=n
- HAS_28xx_QA=n
+--- 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/os/linux/config.mk 2009-03-10
00:47:50.000000000 -0400
++++ 2009_0302_RT2870_Linux_STA_v2.1.0.0/os/linux/config.mk 2009-03-25 20:40:49.000000000
-0400
+@@ -6,12 +6,12 @@ HAS_28xx_QA=n
+ #ifdef WPA_SUPPLICANT_SUPPORT
# Support Wpa_Supplicant
-HAS_WPA_SUPPLICANT=n
+HAS_WPA_SUPPLICANT=y
+ #endif // WPA_SUPPLICANT_SUPPORT //
+ #ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
# Support Native WpaSupplicant for Network Maganger
-HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
+HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
+ #endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
#Support Net interface block while Tx-Sw queue full
- HAS_BLOCK_NET_IF=n
Index: rt2870-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/rt2870-kmod/F-10/rt2870-kmod.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- rt2870-kmod.spec 25 Mar 2009 14:30:12 -0000 1.27
+++ rt2870-kmod.spec 26 Mar 2009 05:31:48 -0000 1.28
@@ -3,20 +3,18 @@
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
-%define buildforkernels newest
+#%%define buildforkernels newest
Name: rt2870-kmod
-Version: 1.4.0.0
-Release: 7%{?dist}.3
+Version: 2.1.0.0
+Release: 1%{?dist}
Summary: Kernel module for wireless devices with Ralink's rt2870 chipsets
Group: System Environment/Kernel
License: GPLv2+
URL:
http://www.ralinktech.com/ralink/Home/Support/Linux.html
-Source0:
http://www.ralinktech.com.tw/data/drivers/2008_0925_RT2870_Linux_STA_v1.4...
+Source0:
http://www.ralinktech.com.tw/data/drivers/2009_0302_RT2870_Linux_STA_v2.1...
Source11: rt2870-kmodtool-excludekernel-filterfile
-
-Patch1: rt2870-additional-devices-support.patch
Patch2: rt2870-Makefile.x-fixes.patch
Patch3: rt2870-NetworkManager-support.patch
Patch4: rt2870-strip-tftpboot-copy.patch
@@ -46,18 +44,18 @@
%setup -q -c -T -a 0
-%patch1 -p1 -b .additional-devices
-%patch2 -p1 -b .rpmbuild
-%patch3 -p1 -b .NetworkManager
-%patch4 -p1 -b .tftpboot
+%patch2 -p0 -b .rpmbuild
+%patch3 -p0 -b .NetworkManager
+%patch4 -p0 -b .tftpboot
+%patch5 -p0 -b .2.6.29
+
+# Fix permissions
+for ext in c h; do
+ find . -name "*.$ext" -exec chmod -x '{}' \;
+done
for kernel_version in %{?kernel_versions} ; do
cp -a *RT2870_Linux_STA* _kmod_build_${kernel_version%%___*}
- pushd _kmod_build_${kernel_version%%___*}
- if [[ $kernel_version > "2.6.29" ]]; then
-%patch5 -p2 -b .2.6.29
- fi
- popd
done
%build
@@ -78,6 +76,10 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Mar 26 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> -
2.1.0.0-1
+- New upstream version
+- Drop additional-devices patch since it is upstreamed
+
* Wed Mar 25 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> -
1.4.0.0-7.3
- rebuild for new kernels
rt2870-strip-tftpboot-copy.patch:
Index: rt2870-strip-tftpboot-copy.patch
===================================================================
RCS file: /cvs/free/rpms/rt2870-kmod/F-10/rt2870-strip-tftpboot-copy.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rt2870-strip-tftpboot-copy.patch 5 Oct 2008 13:33:29 -0000 1.1
+++ rt2870-strip-tftpboot-copy.patch 26 Mar 2009 05:31:48 -0000 1.2
@@ -1,30 +1,16 @@
---- old/2008_0925_RT2870_Linux_STA_v1.4.0.0/Makefile 2008-09-18 03:55:04.000000000 -0400
-+++ new/2008_0925_RT2870_Linux_STA_v1.4.0.0/Makefile 2008-10-04 16:47:15.000000000 -0400
-@@ -130,27 +130,9 @@ LINUX:
+--- 2009_0302_RT2870_Linux_STA_v2.1.0.0.old/Makefile 2009-02-27 06:28:45.000000000 -0500
++++ 2009_0302_RT2870_Linux_STA_v2.1.0.0/Makefile 2009-03-25 20:44:41.000000000 -0400
+@@ -137,11 +137,11 @@ LINUX:
ifneq (,$(findstring 2.4,$(LINUX_SRC)))
cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
make -C $(RT28xx_DIR)/os/linux/
--ifeq ($(RT28xx_MODE),AP)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)ap.o /tftpboot
--else
--ifeq ($(RT28xx_MODE),APSTA)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)apsta.o /tftpboot
--else
- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.o /tftpboot
--endif
--endif
++# cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.o /tftpboot
else
cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
make -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
--ifeq ($(RT28xx_MODE),AP)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)ap.ko /tftpboot
--else
--ifeq ($(RT28xx_MODE),APSTA)
-- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)apsta.ko /tftpboot
--else
- cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.ko /tftpboot
--endif
--endif
- endif
++# cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.ko /tftpboot
+ endif
- release:
+ clean:
Index: sources
===================================================================
RCS file: /cvs/free/rpms/rt2870-kmod/F-10/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 5 Oct 2008 13:33:29 -0000 1.2
+++ sources 26 Mar 2009 05:31:48 -0000 1.3
@@ -1 +1 @@
-3ad8bc242907031c49436429f28bdd60 2008_0925_RT2870_Linux_STA_v1.4.0.0.tar.bz2
+8427fdcaf3abc5f0bc4d8d34310ac62b 2009_0302_RT2870_Linux_STA_v2.1.0.0.tar.bz2
--- rt2870-additional-devices-support.patch DELETED ---