From 35c59fa3a40fa89a0aa721baa4ca5f1bd3e591bd Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 19 Jun 2012 12:22:18 -0700 Subject: [PATCH] compat-wireless: move alx pending patches to crap The alx driver needs to remove the old devices that atl1c already supports. This work is being done but users can still use the alx driver. To help these users move the alx patch to crap/ and add a new patch that disables all the atl1c devices from the alx driver. This means we no longer need a script to disable atlc. Signed-off-by: Luis R. Rodriguez --- Makefile | 10 ---- ...ethernet-driver-which-supercedes-atl.patch | 0 .../0002-backport-alx.patch | 0 crap/0003-remove-atl1c-devices-from-alx.patch | 19 ++++++++ scripts/alx-enable | 47 ------------------- 5 files changed, 19 insertions(+), 57 deletions(-) rename {linux-next-pending => crap}/0001-alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch (100%) rename {linux-next-pending => crap}/0002-backport-alx.patch (100%) create mode 100644 crap/0003-remove-atl1c-devices-from-alx.patch delete mode 100755 scripts/alx-enable diff --git a/Makefile b/Makefile index 969325543ef3..58d61108311f 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,6 @@ install-scripts: @install scripts/athenable $(DESTDIR)/usr/sbin/ @install scripts/b43enable $(DESTDIR)/usr/sbin/ @install scripts/iwl-enable $(DESTDIR)/usr/sbin/ - @install scripts/alx-enable $(DESTDIR)/usr/sbin/ @install scripts/athload $(DESTDIR)/usr/sbin/ @install scripts/b43load $(DESTDIR)/usr/sbin/ @install scripts/iwl-load $(DESTDIR)/usr/sbin/ @@ -189,15 +188,6 @@ install-scripts: echo Running iwl-enable iwlwifi...;\ $(DESTDIR)/usr/sbin/iwl-enable iwlwifi ;\ fi - @if [ $(shell modinfo atl1c > /dev/null 2>&1 && echo 1) ]; then \ - echo ;\ - echo -n "Note: atl1c detected, we're going to disable it. " ;\ - echo "If you would like to enable it later you can run:" ;\ - echo " sudo alx-load atl1c" ;\ - echo ;\ - echo Running alx-enable alx...;\ - $(DESTDIR)/usr/sbin/alx-enable alx;\ - fi @# If on distributions like Mandriva which like to @# compress their modules this will find out and do @# it for you. Reason is some old version of modutils diff --git a/linux-next-pending/0001-alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch b/crap/0001-alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch similarity index 100% rename from linux-next-pending/0001-alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch rename to crap/0001-alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch diff --git a/linux-next-pending/0002-backport-alx.patch b/crap/0002-backport-alx.patch similarity index 100% rename from linux-next-pending/0002-backport-alx.patch rename to crap/0002-backport-alx.patch diff --git a/crap/0003-remove-atl1c-devices-from-alx.patch b/crap/0003-remove-atl1c-devices-from-alx.patch new file mode 100644 index 000000000000..24bc60d90ecf --- /dev/null +++ b/crap/0003-remove-atl1c-devices-from-alx.patch @@ -0,0 +1,19 @@ + +The alx driver is to only support the AR8161 and AR8162 +devices. The older devices are supported through atl1c. + +--- a/drivers/net/ethernet/atheros/alx/alx_main.c ++++ b/drivers/net/ethernet/atheros/alx/alx_main.c +@@ -33,12 +33,6 @@ static const char alx_drv_description[] + #define ALX_ETHER_DEVICE(device_id) {\ + PCI_DEVICE(ALX_VENDOR_ID, device_id)} + static DEFINE_PCI_DEVICE_TABLE(alx_pci_tbl) = { +- ALX_ETHER_DEVICE(ALX_DEV_ID_AR8131), +- ALX_ETHER_DEVICE(ALX_DEV_ID_AR8132), +- ALX_ETHER_DEVICE(ALX_DEV_ID_AR8151_V1), +- ALX_ETHER_DEVICE(ALX_DEV_ID_AR8151_V2), +- ALX_ETHER_DEVICE(ALX_DEV_ID_AR8152_V1), +- ALX_ETHER_DEVICE(ALX_DEV_ID_AR8152_V2), + ALX_ETHER_DEVICE(ALX_DEV_ID_AR8161), + ALX_ETHER_DEVICE(ALX_DEV_ID_AR8162), + {0,} diff --git a/scripts/alx-enable b/scripts/alx-enable deleted file mode 100755 index e04a7621d5cd..000000000000 --- a/scripts/alx-enable +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# -# Copyright 2012 Luis R. Rodriguez -# -# Makes sure either alx (new) or atl1c (old) -# is enabled to be used. This allows us to choose any driver without -# blacklisting each other. - -. /usr/lib/compat-wireless/modlib.sh - -if [[ $UID -ne 0 ]]; then - echo "Run with root privileges" - exit -fi - -ALX_NEW="alx" -ALX_OLD="atl1c" - -# Appended to module file at the end when we want to ignore one -USAGE="Usage: $0 [ $ALX_NEW | $ALX_OLD ]" - -function enable_alx { - module_disable $ALX_OLD - for i in $ALX_NEW; do - module_enable $i - done -} - -# Default behavior: disables the old atl1c driver and enables alx -if [ $# -eq 0 ]; then - enable_alx - exit -elif [ $# -ne 1 ]; then - echo "$USAGE" - exit -fi - -MODULE=$1 -if [ "$MODULE" == "atl1c" ]; then - module_disable $ALX_NEW - module_enable $ALX_OLD -elif [ "$MODULE" == "alx" ]; then - enable_alx -else - echo "$USAGE" - exit -fi -- 2.30.2