diff --git a/README.md b/README.md index 2b23506..66930f5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # mt7601 +Linux driver for MT7601U with patch for stability and performance on recent kernel versions. + diff --git a/mt7601-20150731git-add_device_2001_3D04.patch b/mt7601-20150731git-add_device_2001_3D04.patch new file mode 100644 index 0000000..5cb2f71 --- /dev/null +++ b/mt7601-20150731git-add_device_2001_3D04.patch @@ -0,0 +1,10 @@ +--- mt7601-20150731git/src/common/rtusb_dev_id.c.orig 2015-07-31 23:03:17.334358446 +0200 ++++ mt7601-20150731git/src/common/rtusb_dev_id.c 2015-07-31 23:04:29.462448996 +0200 +@@ -39,6 +39,7 @@ + {USB_DEVICE(0x148f,0x6570)}, /* Ralink 6570 */ + #endif /* RT6570 */ + {USB_DEVICE(0x148f, 0x7650)}, /* MT7650 */ ++ {USB_DEVICE(0x2001, 0x3d04)}, /* D-Link */ + #ifdef MT7601U + {USB_DEVICE(0x148f,0x6370)}, /* Ralink 6370 */ + {USB_DEVICE(0x148f,0x7601)}, /* MT 6370 */ diff --git a/mt7601.spec b/mt7601.spec new file mode 100644 index 0000000..790ca15 --- /dev/null +++ b/mt7601.spec @@ -0,0 +1,80 @@ +Name: mt7601 +Version: 20150731git +Release: 1mamba +Summary: Linux driver for MT7601U with patch for stability and performance on recent kernel versions +Group: System/Kernel and Hardware +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/porjo/mt7601.git +## GITSOURCE https://github.com/porjo/mt7601.git master +Source: https://github.com/porjo/mt7601.git/master/mt7601-%{version}.tar.bz2 +Patch0: mt7601-20150731git-add_device_2001_3D04.patch +License: GPL +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +Requires(post):kernelheaders +Requires(post):dkms +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Linux driver for MT7601U with patch for stability and performance on recent kernel versions. + +%debug_package + +%prep +%setup -q +%patch0 -p1 + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +# dkms for vboxvideo +install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} +cp -a src/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ + +cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF +PACKAGE_NAME=%{name} +PACKAGE_VERSION=%{version} +MAKE="make LINUX_SRC=\"\${kernel_source_dir}\"" +CLEAN="make LINUX_SRC=\"\${kernel_source_dir}\" clean" +BUILT_MODULE_NAME=mt7601Usta +BUILT_MODULE_LOCATION=./os/linux/ +DEST_MODULE_LOCATION=/extra/drivers/net/wireless/ +REMAKE_INITRD=no +AUTOINSTALL=yes +_EOF + +install -d -m 0755 %{buildroot}%{_sysconfdir}/Wireless/RT2870STA/ +cp src/RT2870STA.dat %{buildroot}%{_sysconfdir}/Wireless/RT2870STA/ + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%preun +# erase +if [ $1 -eq 0 ]; then + dkms remove -q -m %{name} -v %{version} --all +fi +: + +%post +if [ $1 -ge 1 ]; then + dkms add -q -m %{name} -v %{version} + dkms install -q -m %{name} -v %{version} --force +fi +: + +%files +%defattr(-,root,root) +%{_sysconfdir}/Wireless/RT2870STA/RT2870STA.dat +%{_prefix}/src/%{name}-%{version}/dkms.conf +%dir %{_prefix}/src/%{name}-%{version}/ +%{_prefix}/src/%{name}-%{version}/* +%doc LICENSE + +%changelog +* Fri Jul 31 2015 Silvan Calarco 20150731git-1mamba +- package created using the webbuild interface