rpms/rt2860-kmod/F-11 rt2860-2.6.31-compile.patch, NONE, 1.1 rt2860-suppress-flood.patch, NONE, 1.1 rt2860-kmod.spec, 1.50, 1.51

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


Author: oget

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

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


rt2860-2.6.31-compile.patch:

--- NEW FILE rt2860-2.6.31-compile.patch ---
diff -rupN 2009_0521_RT2870_Linux_STA_V2.1.2.0.old/include/rtmp_os.h 2009_0521_RT2870_Linux_STA_V2.1.2.0/include/rtmp_os.h
--- 2009_0521_RT2870_Linux_STA_V2.1.2.0.old/include/rtmp_os.h	2009-04-23 05:40:41.000000000 -0400
+++ 2009_0521_RT2870_Linux_STA_V2.1.2.0/include/rtmp_os.h	2009-08-02 19:46:07.000000000 -0400
@@ -59,6 +59,7 @@
 */
 typedef struct _RTMP_OS_NETDEV_OP_HOOK_
 {
+  /*
 	void			*open;
 	void			*stop;
 	void			*xmit;
@@ -69,6 +70,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_0521_RT2870_Linux_STA_V2.1.2.0.old/os/linux/rt_linux.c 2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt_linux.c
--- 2009_0521_RT2870_Linux_STA_V2.1.2.0.old/os/linux/rt_linux.c	2009-04-23 05:55:24.000000000 -0400
+++ 2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt_linux.c	2009-08-02 20:32:09.000000000 -0400
@@ -1505,20 +1505,22 @@ int RtmpOSNetDevAttach(
 		PRTMP_ADAPTER pAd = NULL;
 	
 		GET_PAD_FROM_NET_DEV(pAd, 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;
 #endif
@@ -1542,15 +1544,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_0521_RT2870_Linux_STA_V2.1.2.0.old/os/linux/rt_main_dev.c 2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt_main_dev.c
--- 2009_0521_RT2870_Linux_STA_V2.1.2.0.old/os/linux/rt_main_dev.c	2009-04-23 05:40:40.000000000 -0400
+++ 2009_0521_RT2870_Linux_STA_V2.1.2.0/os/linux/rt_main_dev.c	2009-08-02 19:38:35.000000000 -0400
@@ -501,6 +501,20 @@ 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,
@@ -517,6 +531,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;
@@ -528,7 +544,7 @@ PNET_DEV RtmpPhyNetDevInit(
 	pNetDevHook->get_stats = RT28xx_get_ether_stats;
 
 	pNetDevHook->needProtcted = FALSE;
-
+	*/
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
 	net_dev->ml_priv = (PVOID)pAd;
 #else

rt2860-suppress-flood.patch:

--- NEW FILE rt2860-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: rt2860-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/rt2860-kmod/F-11/rt2860-kmod.spec,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- rt2860-kmod.spec	22 Aug 2009 17:43:37 -0000	1.50
+++ rt2860-kmod.spec	22 Aug 2009 19:22:17 -0000	1.51
@@ -3,11 +3,11 @@
 # "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:		rt2860-kmod
 Version:	2.1.2.0
-Release:	1%{?dist}.9
+Release:	2%{?dist}
 Summary:	Kernel module for RaLink 802.11 wireless devices rt2760/rt2790/rt2860/rt2890
 
 Group:		System Environment/Kernel
@@ -20,6 +20,8 @@
 Patch2:		rt2860-add-network-mgr-support.diff
 Patch3:		rt2860-remove-tftpboot-copy.patch
 Patch4:		rt2860-no2.4-in-kernelversion.patch
+Patch5:		rt2860-2.6.31-compile.patch
+Patch6:		rt2860-suppress-flood.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	%{_bindir}/kmodtool
@@ -50,6 +52,8 @@
 %patch2 -p1 -b .NetworkManager
 %patch3 -p1 -b .tftpboot
 %patch4 -p1 -b .no24
+%patch5 -p1 -b .2.6.31
+%patch6 -p1 -b .messageflood
 popd
 
 # Fix weird permissions
@@ -78,6 +82,10 @@
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Sat Aug 22 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 2.1.2.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.2.0-1.9
 - rebuild for new kernels
 



More information about the rpmfusion-commits mailing list