rpms/rt3070-kmod/F-11 rt3070-2.6.31-compile.patch, NONE, 1.1 rt3070-suppress-flood.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 rt3070-kmod.spec, 1.20, 1.21 sources, 1.3, 1.4 rt3070-2.6.29-compile.patch, 1.3, NONE

Orcan Ogetbil oget at rpmfusion.org
Sat Aug 22 21:51:53 CEST 2009


Author: oget

Update of /cvs/free/rpms/rt3070-kmod/F-11
In directory se02.es.rpmfusion.net:/tmp/cvs-serv17912

Modified Files:
	.cvsignore rt3070-kmod.spec sources 
Added Files:
	rt3070-2.6.31-compile.patch rt3070-suppress-flood.patch 
Removed Files:
	rt3070-2.6.29-compile.patch 
Log Message:
* Sat Aug 22 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 2.1.1.0-2
- Suppress a flood of system log messages
- Fix for kernels >= 2.6.31


rt3070-2.6.31-compile.patch:

--- NEW FILE rt3070-2.6.31-compile.patch ---
diff -rupN 2009_0525_RT3070_Linux_STA_v2.1.1.0.old/include/rtmp_os.h 2009_0525_RT3070_Linux_STA_v2.1.1.0/include/rtmp_os.h
--- 2009_0525_RT3070_Linux_STA_v2.1.1.0.old/include/rtmp_os.h	2009-05-20 23:33:56.000000000 -0400
+++ 2009_0525_RT3070_Linux_STA_v2.1.1.0/include/rtmp_os.h	2009-08-04 00:00:46.000000000 -0400
@@ -53,6 +53,7 @@
 */
 typedef struct _RTMP_OS_NETDEV_OP_HOOK_
 {
+  /*
 	void			*open;
 	void			*stop;
 	void			*xmit;
@@ -63,6 +64,8 @@ typedef struct _RTMP_OS_NETDEV_OP_HOOK_
 	unsigned char devAddr[6];
 	unsigned char	devName[16];
 	unsigned char	needProtcted;
+  */
+  struct net_device_ops *netdev_ops;
 }RTMP_OS_NETDEV_OP_HOOK, *PRTMP_OS_NETDEV_OP_HOOK;
 
 
diff -rupN 2009_0525_RT3070_Linux_STA_v2.1.1.0.old/os/linux/rt_linux.c 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/rt_linux.c
--- 2009_0525_RT3070_Linux_STA_v2.1.1.0.old/os/linux/rt_linux.c	2009-05-20 23:33:56.000000000 -0400
+++ 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/rt_linux.c	2009-08-04 00:04:15.000000000 -0400
@@ -1506,20 +1506,21 @@ int RtmpOSNetDevAttach(
 	if (pDevOpHook)
 	{
 		PRTMP_ADAPTER pAd = RTMP_OS_NETDEV_GET_PRIV(pNetDev);
-	
+		pNetDev->netdev_ops = pDevOpHook->netdev_ops;
+		/*	
 		pNetDev->open			= pDevOpHook->open;
 		pNetDev->stop			= pDevOpHook->stop;
 		pNetDev->hard_start_xmit	= (HARD_START_XMIT_FUNC)(pDevOpHook->xmit);
 		pNetDev->do_ioctl		= pDevOpHook->ioctl;
-		
+		*/
 		/* if you don't implement get_stats, just leave the callback function as NULL, a dummy 
 		     function will make kernel panic.
 		*/
-		if (pDevOpHook->get_stats)
+		/*if (pDevOpHook->get_stats)
 			pNetDev->get_stats = pDevOpHook->get_stats;
-
+		*/
 		/* OS specific flags, here we used to indicate if we are virtual interface */
-		pNetDev->priv_flags = pDevOpHook->priv_flags; 
+		//		pNetDev->priv_flags = pDevOpHook->priv_flags; 
 
 #if (WIRELESS_EXT < 21) && (WIRELESS_EXT >= 12)
 		pNetDev->get_wireless_stats = rt28xx_get_wireless_stats;
@@ -1544,15 +1545,15 @@ int RtmpOSNetDevAttach(
 #endif // CONFIG_APSTA_MIXED_SUPPORT //
 
 		// copy the net device mac address to the net_device structure.
-		NdisMoveMemory(pNetDev->dev_addr, &pDevOpHook->devAddr[0], MAC_ADDR_LEN);
+		//		NdisMoveMemory(pNetDev->dev_addr, &pDevOpHook->devAddr[0], MAC_ADDR_LEN);
 
-		rtnl_locked = pDevOpHook->needProtcted;
+		//		rtnl_locked = pDevOpHook->needProtcted;
 	}
-
+	/*
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
 	pNetDev->validate_addr = NULL;
 #endif
-
+	*/
 	if (rtnl_locked)
 		ret = register_netdevice(pNetDev);
 	else
diff -rupN 2009_0525_RT3070_Linux_STA_v2.1.1.0.old/os/linux/rt_main_dev.c 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/rt_main_dev.c
--- 2009_0525_RT3070_Linux_STA_v2.1.1.0.old/os/linux/rt_main_dev.c	2009-05-20 23:33:56.000000000 -0400
+++ 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/rt_main_dev.c	2009-08-04 00:06:08.000000000 -0400
@@ -504,6 +504,21 @@ err:
 	return (-1);
 } /* End of rt28xx_open */
 
+static const struct net_device_ops rt2870_netdev_ops = {
+  .ndo_open               = MainVirtualIF_open,//
+  .ndo_stop               = MainVirtualIF_close,//
+  .ndo_do_ioctl           = rt28xx_ioctl,//
+  .ndo_get_stats          = RT28xx_get_ether_stats,//
+  .ndo_validate_addr      = NULL,
+  .ndo_set_mac_address    = eth_mac_addr,
+  .ndo_change_mtu         = eth_change_mtu,
+#ifdef IKANOS_VX_1X0
+  .ndo_start_xmit         = IKANOS_DataFramesTx,//
+#else
+  .ndo_start_xmit         = rt28xx_send_packets,//
+#endif
+};
+
 
 PNET_DEV RtmpPhyNetDevInit(
 	IN RTMP_ADAPTER *pAd,
@@ -520,6 +535,8 @@ PNET_DEV RtmpPhyNetDevInit(
 	}
 
 	NdisZeroMemory((unsigned char *)pNetDevHook, sizeof(RTMP_OS_NETDEV_OP_HOOK));
+	pNetDevHook->netdev_ops = &rt2870_netdev_ops;
+	/*
 	pNetDevHook->open = MainVirtualIF_open;
 	pNetDevHook->stop = MainVirtualIF_close;
 	pNetDevHook->xmit = rt28xx_send_packets;
@@ -531,7 +548,7 @@ PNET_DEV RtmpPhyNetDevInit(
 	pNetDevHook->get_stats = RT28xx_get_ether_stats;
 
 	pNetDevHook->needProtcted = FALSE;
-
+	*/
 	RTMP_OS_NETDEV_SET_PRIV(net_dev, pAd);
 	//net_dev->priv = (PVOID)pAd;
 	pAd->net_dev = net_dev;

rt3070-suppress-flood.patch:

--- NEW FILE rt3070-suppress-flood.patch ---
diff -rupN 2009_0521_RT2860_Linux_STA_V2.1.2.0.old/common/cmm_asic.c 2009_0521_RT2860_Linux_STA_V2.1.2.0/common/cmm_asic.c
--- 2009_0521_RT2860_Linux_STA_V2.1.2.0.old/common/cmm_asic.c	2009-03-25 03:20:30.000000000 -0400
+++ 2009_0521_RT2860_Linux_STA_V2.1.2.0/common/cmm_asic.c	2009-08-22 12:24:53.000000000 -0400
@@ -609,7 +609,7 @@ VOID AsicSwitchChannel(
 								TxPwer = (7+TxPwer);
 								TxPwer = (TxPwer > 0xF) ? (0xF) : (TxPwer);
 								R3 |= (TxPwer << 10);
-								DBGPRINT(RT_DEBUG_ERROR, ("AsicSwitchChannel: TxPwer=%d \n", TxPwer));
+								// comment out as it causes flood // DBGPRINT(RT_DEBUG_ERROR, ("AsicSwitchChannel: TxPwer=%d \n", TxPwer));
 							}
 							else
 							{
@@ -623,7 +623,7 @@ VOID AsicSwitchChannel(
 								TxPwer2 = (7+TxPwer2);
 								TxPwer2 = (TxPwer2 > 0xF) ? (0xF) : (TxPwer2);
 								R4 |= (TxPwer2 << 7);
-								DBGPRINT(RT_DEBUG_ERROR, ("AsicSwitchChannel: TxPwer2=%d \n", TxPwer2));
+								// comment out as it causes flood // DBGPRINT(RT_DEBUG_ERROR, ("AsicSwitchChannel: TxPwer2=%d \n", TxPwer2));
 							}
 							else
 							{
diff -rupN 2009_0521_RT2860_Linux_STA_V2.1.2.0.old/os/linux/rt_ate.c 2009_0521_RT2860_Linux_STA_V2.1.2.0/os/linux/rt_ate.c
--- 2009_0521_RT2860_Linux_STA_V2.1.2.0.old/os/linux/rt_ate.c	2009-03-25 04:06:34.000000000 -0400
+++ 2009_0521_RT2860_Linux_STA_V2.1.2.0/os/linux/rt_ate.c	2009-08-22 12:25:24.000000000 -0400
@@ -4031,7 +4031,7 @@ VOID ATEAsicSwitchChannel(
 								TxPwer = (7+TxPwer);
 								TxPwer = (TxPwer > 0xF) ? (0xF) : (TxPwer);
 								R3 |= (TxPwer << 10);
-								ATEDBGPRINT(RT_DEBUG_TRACE, ("ATEAsicSwitchChannel: TxPwer=%d \n", TxPwer));
+								// comment out as it causes flood // ATEDBGPRINT(RT_DEBUG_TRACE, ("ATEAsicSwitchChannel: TxPwer=%d \n", TxPwer));
 							}
 							else
 							{
@@ -4045,7 +4045,7 @@ VOID ATEAsicSwitchChannel(
 								TxPwer2 = (7+TxPwer2);
 								TxPwer2 = (TxPwer2 > 0xF) ? (0xF) : (TxPwer2);
 								R4 |= (TxPwer2 << 7);
-								ATEDBGPRINT(RT_DEBUG_TRACE, ("ATEAsicSwitchChannel: TxPwer2=%d \n", TxPwer2));
+								// comment out as it causes flood // ATEDBGPRINT(RT_DEBUG_TRACE, ("ATEAsicSwitchChannel: TxPwer2=%d \n", TxPwer2));
 							}
 							else
 							{
diff -rupN 2009_0521_RT2860_Linux_STA_V2.1.2.0.old/os/linux/sta_ioctl.c 2009_0521_RT2860_Linux_STA_V2.1.2.0/os/linux/sta_ioctl.c
--- 2009_0521_RT2860_Linux_STA_V2.1.2.0.old/os/linux/sta_ioctl.c	2009-04-23 06:07:18.000000000 -0400
+++ 2009_0521_RT2860_Linux_STA_V2.1.2.0/os/linux/sta_ioctl.c	2009-08-22 12:22:44.000000000 -0400
@@ -1465,7 +1465,7 @@ int rt_ioctl_giwscan(struct net_device *
 
 	data->length = current_ev - extra;
     pAdapter->StaCfg.bScanReqIsFromWebUI = FALSE;
-	DBGPRINT(RT_DEBUG_ERROR ,("===>rt_ioctl_giwscan. %d(%d) BSS returned, data->length = %d\n",i , pAdapter->ScanTab.BssNr, data->length));
+    // comment out as it causes flood in system messages. // DBGPRINT(RT_DEBUG_ERROR ,("===>rt_ioctl_giwscan. %d(%d) BSS returned, data->length = %d\n",i , pAdapter->ScanTab.BssNr, data->length));
 	return 0;
 }
 #endif


Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/rt3070-kmod/F-11/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	23 May 2009 05:18:50 -0000	1.3
+++ .cvsignore	22 Aug 2009 19:51:52 -0000	1.4
@@ -1 +1 @@
-2009_0520_RT3070_Linux_STA_v2.1.1.0.tar.gz
+2009_0525_RT3070_Linux_STA_v2.1.1.0.bz2


Index: rt3070-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/rt3070-kmod/F-11/rt3070-kmod.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- rt3070-kmod.spec	22 Aug 2009 17:44:10 -0000	1.20
+++ rt3070-kmod.spec	22 Aug 2009 19:51:52 -0000	1.21
@@ -3,24 +3,26 @@
 # "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:		rt3070-kmod
 Version:	2.1.1.0
-Release:	1%{?dist}.9
+Release:	2%{?dist}
 Summary:	Kernel module for wireless devices with Ralink's rt307x 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/2009_0520_RT3070_Linux_STA_v%{version}.tar.gz
+Source0:	http://www.ralinktech.com.tw/data/drivers/2009_0525_RT3070_Linux_STA_v%{version}.bz2
 Source11:	rt3070-kmodtool-excludekernel-filterfile
 
 Patch1:		rt3070-no2.4-in-kernelversion.patch
 Patch2:		rt3070-Makefile.x-fixes.patch
 Patch3:		rt3070-NetworkManager-support.patch
 Patch4:		rt3070-strip-tftpboot-copy.patch
-Patch5:		rt3070-2.6.29-compile.patch
+Patch5:		rt3070-2.6.31-compile.patch
+Patch6:		rt3070-suppress-flood.patch
+
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	%{_bindir}/kmodtool
@@ -46,11 +48,12 @@
 
 %setup -q -c -T -a 0
 pushd *RT3070*Linux*STA*
-find . -type d -exec chmod 755 {} \;
 %patch1 -p1 -b .no24
 %patch2 -p1 -b .rpmbuild
 %patch3 -p1 -b .NetworkManager
 %patch4 -p1 -b .tftpboot
+%patch5 -p1 -b .2.6.31
+%patch6 -p1 -b .messageflood
 popd
 
 # Fix permissions
@@ -67,12 +70,6 @@
 
 for kernel_version in %{?kernel_versions} ; do
  cp -a *RT3070*Linux*STA* _kmod_build_${kernel_version%%___*}
- pushd _kmod_build_${kernel_version%%___*}
-  if [[ $kernel_version > "2.6.29" ]]; then
-# There are still build errors that need to be corrected
-%patch5 -p1 -b .2.6.29
-  fi
- popd
 done
 
 %build
@@ -93,6 +90,10 @@
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Sat Aug 22 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 2.1.1.0-2
+- Suppress a flood of system log messages
+- Fix for kernels >= 2.6.31
+
 * Sat Aug 22 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.1.1.0-1.9
 - rebuild for new kernels
 


Index: sources
===================================================================
RCS file: /cvs/free/rpms/rt3070-kmod/F-11/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	23 May 2009 05:18:50 -0000	1.3
+++ sources	22 Aug 2009 19:51:52 -0000	1.4
@@ -1 +1 @@
-f4823d3b51034d8e655125ac5d133f6b  2009_0520_RT3070_Linux_STA_v2.1.1.0.tar.gz
+b31ab4d77b6836853e293355915cfcad  2009_0525_RT3070_Linux_STA_v2.1.1.0.bz2


--- rt3070-2.6.29-compile.patch DELETED ---



More information about the rpmfusion-commits mailing list