From a23a266a05c18ed3886a3b88d6c348c12f849a35 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Tue, 14 Aug 2012 15:58:07 -0700 Subject: [PATCH] compat-drivers: complete compat-wirelss --> compat-drivers rename The name change is now completed, including the git tree. Signed-off-by: Luis R. Rodriguez --- README | 407 +------------------ enable-older-kernels/enable-2.6.21.patch | 4 +- enable-older-kernels/enable-2.6.22.patch | 4 +- enable-older-kernels/enable-2.6.23.patch | 4 +- patches/09-cfg80211-wext-padding.patch | 6 +- patches/10-add-wext-handlers-to-netdev.patch | 2 +- patches/30-bridge-port.patch | 2 +- scripts/refresh-compat | 2 +- scripts/refresh-compat-local | 2 +- 9 files changed, 27 insertions(+), 406 deletions(-) diff --git a/README b/README index 6878dab58cfe..550de09ba20d 100644 --- a/README +++ b/README @@ -1,270 +1,25 @@ +Linux compat drivers compatibility package +========================================== -Linux Wireless compatibility package -===================================== +This package provides backport support for drivers from newer kernels +down to older kernels. It currently backports 3 subsystems: -This is a Linux wireless compatibility package which provides the latest -Linux wireless subsystem enhancements for kernels 2.6.24 and above. -It is technically possible to support kernels < 2.6.24 but more -work is required for that. -It also provides Linux bluetooth subsystem enhancements for kernels 2.6.27 and above. + * Ethernet + * Wireless + * Bluetooth -With a local git repository you can update the compatibility package yourself. -For more information on how to do this please refer the Developers section below. +This package provides the latest Linux kernel subsystem enhancements +for kernels 2.6.24 and above. It is technically possible to support +kernels < 2.6.24 but more work is required for that. Documentation ------------ -This package is also documented online and has more-up-to date -information online than on this README file. You should read the wiki page -and not rely on this README: +This package is documented online and has more-up-to date information +online than on this README file. You should read the wiki page +and not rely on this README! -http://wireless.kernel.org/en/users/Download - -Subscribe to the wiki page to get updates on the documentation. - -Where to get the latest ------------------------ - -This package lets you build your own 'latest', all you need is a local git -repository. The process is documented in the Developers section of this document. -However since not many users are expected to keep a local git repository we -provide daily snapshots of this package + the wireless and bluetooth subsystem -code. You can find the latest snapshot at: - -linux-next.git version: -http://wireless.kernel.org/en/users/Download - -stable version: -http://wireless.kernel.org/en/users/Download/stable/ - -Versions --------- - -There are two different versions of this package available. - * Version based on latest linux-next.git tree named compat-drivers-YYYY-MM-DD.tar.bz2 - * Version based on linux-stable.git tree named compat-drivers-{2.6.x, 3.x}.CC.DD.tar.bz2 - -Both versions should work for every kernel > 2.6.24. The differences are the -code they are containing. The version based on linux-next.git contains the -wireless and bluetooth subsystem out of linux-next.git and the stable version -the wireless subsystem out of the corresponding linux stable version. - -Selecting your driver ---------------------- - -If you know the driver you want you can select it with our -helper script: - -./scripts/driver-select - -Run that script to see more information. -Not all drivers are currently enabled via driver-select. - -Building, and installing ------------------------- - -Build: compile the latest linux wireless subsystem - - make - -Install: - -We use the updates/ directory so your distribution's drivers are left intact. - - sudo make install - -Uninstall: - -This nukes our changes to updates/ so you can go back to using your -distribution's supported drivers. - - sudo make uninstall - -Load: - -Reboot unless you know what you are doing. -(Usually modprobe 'driver-name' is the way to go) - - -Bluetooth modules can be separately compiled and installed using below commands -Bluetooth drivers are also available via ./scripts/driver-select - -Build: - make bt - -Install: - sudo make btinstall - -Uninstall: - sudo make btuninstall - -Unload: - sudo make btunload - -Load: - modprobe driver-name. If unsure, reboot. - -Drivers -------- - -This is the list of drivers the package currently provides. It adds -all new drivers or drivers which keep being updated which you might -be interested in. - -Drivers list: - -adm8211 -ar9170usb -at76c50x-usb -ath5k -ath6kl -ath9k -ath9k_htc -b43 -b43legacy -b44 -carl9170 -brcm80211 -ipw2100 -ipw2200 -iwl3945 -iwlagn -iwlcore -libertas -libertas_cs -libertas_sdio -libertas_spi -libertas_tf -libertas_tf_usb -libipw -mwl8k -orinoco_cs -orinoco_nortel -orinoco_pci -orinoco_plx -orinoco_tld -orinoco_usb -orinoco -p54common -p54pci -p54spi -p54usb -rt2400pci -rt2500pci -rt2500usb -rt2800pci -rt2800usb -rt61pci -rt73usb -rtl8180 -rtl8187 -rtlwifi -rtl8192ce -spectrum_cs -ssb -wl1251 -wl12xx -zd1211rw - -This package also provides more drivers which may be documented here - -For a complete list see: - -http://wireless.kernel.org/en/users/Download - -Non-wireless drivers --------------------- - -Atheros Ethernet drivers: - -atl1 -atl1c -atl1e -atl2 - -To support b43 ssb is also provided, and since ssb is also provided -we provide b44 (the ethernet driver). - -The new rfkill drivers also provided and backported. - -Bluetooth drivers: - -ath3k -bcm203x -bluecard_cs -bluetooth -bnep -bpa10x -bt3c_cs -btmrvl -btmrvl_sdio -btsdio -btusb -btuart_cs -cmtp -dtl1_cs -hidp -hci_vhci -hci_uart -l2cap -rfcomm -sco - -Firmware: ---------- - -If your driver needs firmware please be sure to check the driver page -for that driver here: - -http://wireless.kernel.org/en/users/Drivers - -Why? ----- - -For users or developers stuck on older kernels that want to help test or -patch wireless work. Additionally if you're on a recent kernel this lets -you get the latest and greatest linux-next git work without much effort. -This may mean new drivers for some users. Last but not least we hope this -will encourage vendors and developers to post patches upstream first -rather than forking or maintaining their own mac80211 releases with -their own patches for their own drivers. - -Building for external kernels ----------------------------------- - -If you have a kernel you do not have installed but yet want to build the -compat-drivers for it you can use this syntax: - -make KLIB=/home/mcgrof/kernels/linux-2.6.23.9 KLIB_BUILD=/home/mcgrof/kernels/linux-2.6.23.9 - -If you have a kernel installed, which is not your currently running kernel (e.g. via -distro updates; plus its corresponding kernel-dev package), you can use this syntax: - -make KLIB=/lib/modules/2.6.30.6-53.fc11.x86_64 - - and to install to your system's root path for the non-running kernel: - -make KLIB=/lib/modules/2.6.30.6-53.fc11.x86_64 KMODPATH_ARG='INSTALL_MOD_PATH=' install - -Bugs ------ - -If you've found a bug please report it to our linux-wireless mailing list: - -linux-wireless@vger.kernel.org - -Report the bug if you are working with the latest and greatest. -If your bug is compatibility-related then we should still try to fix -it within the compat.[ch] work. - -ChangeLog ---------- - -Here you see the list of changes to all wireless drivers, the wireless core and mac80211. - -http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=log; - -This views all the changes on wireless-testing.git. +https://backports.wiki.kernel.org License ------- @@ -273,137 +28,3 @@ This work is a subset of the Linux kernel as such we keep the kernel's Copyright practice. Some files have their own copyright and in those cases the license is mentioned in the file. All additional work made to building this package is licensed under the GPLv2. - -Developers ----------- - -Compatibility work goes into compat/compat.[ch]. If using those files do -not suffice additional actual code changes can go into patches/*.patch. - -An extended and more up to date version can be found at: - -http://wireless.kernel.org/en/users/Download/hacking - -This section deals with development details of compat-drivers and the other -trees it uses. If you want to make your own compat-drivers tarballs, or if you -see something busted with compat-drivers or just want to add something new or -an enhancement this is the guide for you. - -Git trees you will need ------------------------ - -compat-drivers backports bluetooth, 802.11 and DRM subsystems down to older -kernels. To be able to synchronize backporting the latest and greatest, the -linux-next.git tree is used as its main source for kernel updates. General Linux -kernel compatibility is addressed through a general kernel compatibility tree, -compat.git. compat-drivers then has its own tree for specific subsystem -compatibility. You will then need to checkout three trees to start hacking on -compat-drivers: - -git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git -git://github.com/mcgrof/compat.git -git://github.com/mcgrof/compat-wireless.git - -linux-next ----------- - -The linux-next.git tree brings all subsystems being worked on for the next -kernel release into one tree. So if the current rc kernel is 3.5-rc1, this -means linux-next will have what people today are working on for the 3.6 -kernel release. - -compat.git ----------- - -The compat git tree is a general kernel compatibility layer which can be shared -amongst different compatibility projects, or drivers. compat-drivers is just -one of the kernel compatibility projects using compat.git. compat.git builds a -general compatibility module, compat, and any additional modules to let you get -new general kernel updates from future kernels on your old kernels. - -compat.git modules ------------------- - -compat.git provides a few modules and headers to help with general kernel -compatibility. - -compat ------- - -Provides all exported symbols implemented in each respective kernel -compat-2.6.xy.c files. Upon module load it just initializes the Linux kernel's -''power management Quality Of Service'' (aka '''pm-qos''') Interface interface -added as of the 2.6.24 kernel. No other things are initialized, the rest of the -compat module just acts as a library of exported symbols. - -compat_firmware_class ---------------------- - -Another module which compat.git provides is a backport of the firmware_class -module which got updated recently newer with a new request_firmware_nowait() -to allow better asynchronous firmware uploading. This was added as of the 2.6.33 -kernel. The firmware_class module has been backported into a new module called -compat_firmware_class. A separate module has been defined instead of a direct -replacement for firmware_class since your system may have old drivers which use -the old request_firmware_nowait() and would bust if they used the new -request_firmware_nowait(). The compat_firmware_class module registers its own -sysfs subsystem and as such also gets udev events sent through a separate -subsystem. Because of this a new udev rules file is required and provided. - -compat-drivers.git -------------------- - -Anything that is not general kernel compatibility but instead specific to -subsystems like 802.11, bluetooth, or DRM goes into compat-drivers.git. -After you've cloned all three trees linux-next.git, compat.git and compat-drivers.git -you need to change into the compat-drivers directory and tell compat-drivers -where your linux-next and compat.git trees are. You do this with environment -variables GIT_TREE and GIT_COMPAT_TREE. You can do for example: - -export GIT_TREE=/home/mcgrof/linux-next -export GIT_COMPAT_TREE=/home/mcgrof/compat - -Then you can update your local sources based on these linux-next.git and -compat.git trees: - -scripts/admin-clean.sh - Cleans the compat-drivers tree -scripts/admin-update.sh - Updates compat-drivers with your git trees -scripts/admin-refresh.sh - Does the above two - -Adding new drivers ------------------- - -Most new drivers are enabled for compilation. If see a driver you would like -enabled try it into the mix, test them and if they work enable them and send -the respective patches. - -Sending patches ---------------- - -Remember there are three trees. linux-next itself is a conglomeration of kernel -git trees itself, so patches for linux-next.git should be sent to each -respective subsystem for which the patches are targeted for. So for example for -802.11 you will want to send them to John Linville and cc linux-wireless, for -further guidelines on this see the Submitting Patches guidelines for 802.11. -http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches -As another example, for bluetooth you will want to send them to Marcel -Holtmann and cc the linux-bluetooth mailing list. If your patch touches on -others areas of the kernel refer to the MAINTAINERS file on the kernel. - -For compat.git and compat-drivers.git please send patches against to: - -To: Luis R. Rodriguez -CC: linux-wireless@vger.kernel.org, linux-bluetooth@vger.kernel.org -Subject: [PATCH] compat-2.6: fix foo - -For patches for compat.git please use a subject like the following: - -Subject: [PATCH] compat: fix foo - -For 802.11 and bluetooth specific stuff please use a subject like the following: - -Subject: [PATCH] compat-wireless: fix foo - -Patches are preferred sent with a clear commit log entry, if unfamiliar with -how to send patches please refer to -http://wireless.kernel.org/en/developers/Documentation/git-guide. diff --git a/enable-older-kernels/enable-2.6.21.patch b/enable-older-kernels/enable-2.6.21.patch index 593d9ddd790f..83e1daf2ca50 100644 --- a/enable-older-kernels/enable-2.6.21.patch +++ b/enable-older-kernels/enable-2.6.21.patch @@ -5,10 +5,10 @@ $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_3_$(ver)=y)) -ifdef CONFIG_COMPAT_KERNEL_2_6_24 --$(error "ERROR: compat-wireless by default supports kernels >= 2.6.24, try enabling only one driver though") +-$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though") -endif #CONFIG_COMPAT_KERNEL_2_6_24 +ifdef CONFIG_COMPAT_KERNEL_2_6_21 -+$(error "ERROR: compat-wireless by default supports kernels >= 2.6.21, try enabling only one driver though") ++$(error "ERROR: compat-drivers by default supports kernels >= 2.6.21, try enabling only one driver though") +endif #CONFIG_COMPAT_KERNEL_2_6_21 ifeq ($(CONFIG_CFG80211),y) diff --git a/enable-older-kernels/enable-2.6.22.patch b/enable-older-kernels/enable-2.6.22.patch index 86b35d60a621..9caebbac40ba 100644 --- a/enable-older-kernels/enable-2.6.22.patch +++ b/enable-older-kernels/enable-2.6.22.patch @@ -5,10 +5,10 @@ $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_3_$(ver)=y)) -ifdef CONFIG_COMPAT_KERNEL_2_6_24 --$(error "ERROR: compat-wireless by default supports kernels >= 2.6.24, try enabling only one driver though") +-$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though") -endif #CONFIG_COMPAT_KERNEL_2_6_24 +ifdef CONFIG_COMPAT_KERNEL_2_6_22 -+$(error "ERROR: compat-wireless by default supports kernels >= 2.6.22, try enabling only one driver though") ++$(error "ERROR: compat-drivers by default supports kernels >= 2.6.22, try enabling only one driver though") +endif #CONFIG_COMPAT_KERNEL_2_6_22 ifeq ($(CONFIG_CFG80211),y) diff --git a/enable-older-kernels/enable-2.6.23.patch b/enable-older-kernels/enable-2.6.23.patch index 82ba243f09b3..f36bba7f6986 100644 --- a/enable-older-kernels/enable-2.6.23.patch +++ b/enable-older-kernels/enable-2.6.23.patch @@ -5,10 +5,10 @@ $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_3_$(ver)=y)) -ifdef CONFIG_COMPAT_KERNEL_2_6_24 --$(error "ERROR: compat-wireless by default supports kernels >= 2.6.24, try enabling only one driver though") +-$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though") -endif #CONFIG_COMPAT_KERNEL_2_6_24 +ifdef CONFIG_COMPAT_KERNEL_2_6_23 -+$(error "ERROR: compat-wireless by default supports kernels >= 2.6.23, try enabling only one driver though") ++$(error "ERROR: compat-drivers by default supports kernels >= 2.6.23, try enabling only one driver though") +endif #CONFIG_COMPAT_KERNEL_2_6_23 ifeq ($(CONFIG_CFG80211),y) diff --git a/patches/09-cfg80211-wext-padding.patch b/patches/09-cfg80211-wext-padding.patch index 6b1425f9b0af..de4e8e4873bc 100644 --- a/patches/09-cfg80211-wext-padding.patch +++ b/patches/09-cfg80211-wext-padding.patch @@ -12,14 +12,14 @@ Consider a kernel that has this code in net/wireless/wext-core.c: #endif If a kernel is compiled without CONFIG_WIRELESS_EXT then -compat-wireless can't do wireless extensions against it. +compat-drivers can't do wireless extensions against it. However, if the kernel is compiled with CONFIG_CFG80211_WEXT then it will try to get the wext handlers from struct wiphy. Now, struct wiphy in the base kernel and struct wiphy in -compat-wireless don't match, so the kernel crashes!! +compat-drivers don't match, so the kernel crashes!! -To fix this, add lots of padding to compat-wireless's +To fix this, add lots of padding to compat-drivers's struct wiphy so that the "wext" pointer is guaranteed to be NULL. diff --git a/patches/10-add-wext-handlers-to-netdev.patch b/patches/10-add-wext-handlers-to-netdev.patch index ce2290ed1023..20d196cbe140 100644 --- a/patches/10-add-wext-handlers-to-netdev.patch +++ b/patches/10-add-wext-handlers-to-netdev.patch @@ -14,7 +14,7 @@ struct from kernel 2.6.33 and 2.6.34 are incompatible and the kernel would dereference some wrong type in the struct and oops. The old interface is not affected by this. This will cause that CONFIG_CFG80211_WEXT still depends on -CONFIG_WIRELESS_EXT in compat-wireless. +CONFIG_WIRELESS_EXT in compat-drivers. --- a/net/wireless/core.c +++ b/net/wireless/core.c diff --git a/patches/30-bridge-port.patch b/patches/30-bridge-port.patch index 521284ce7f71..376678852556 100644 --- a/patches/30-bridge-port.patch +++ b/patches/30-bridge-port.patch @@ -19,7 +19,7 @@ accepted. This patch can be removed once we get br_port_exists() accessible to drivers and not just private bridge code. If that patch doesn't get accepted upstream we'l have to carry this patch around for -compat-wireless. +compat-drivers. --- a/net/wireless/util.c +++ b/net/wireless/util.c diff --git a/scripts/refresh-compat b/scripts/refresh-compat index 3321e6dadee6..6070448140c8 100755 --- a/scripts/refresh-compat +++ b/scripts/refresh-compat @@ -47,7 +47,7 @@ PURPLE="\033[35m" CYAN="\033[36m" UNDERLINE="\033[02m" -COMPAT_SRC="$HOME/devel/compat-wireless/" +COMPAT_SRC="$HOME/devel/compat-drivers/" EXTRA_COPY="" if [[ -f .compat_copy ]]; then diff --git a/scripts/refresh-compat-local b/scripts/refresh-compat-local index 7cad3288c7df..e8c949e7c6f1 100755 --- a/scripts/refresh-compat-local +++ b/scripts/refresh-compat-local @@ -22,7 +22,7 @@ UPDATE_SCRIPT="$COMPAT_SRC/scripts/refresh-compat" if [[ ! -d $COMPAT_SRC ]]; then echo -e "You should have compat-drivers.git cloned and checked out under $COMPAT_SRC" - echo -e "The git tree: git://github.com/mcgrof/compat-wireless.git" + echo -e "The git tree: git://github.com/mcgrof/compat-drivers" exit 1 fi -- 2.30.2