Added compat-bluetooth to compat-wireless-2.6
Subsystems (2)
PATCH 1/1 Added compat-bluetooth to compat-wireless-2.6
Added compat-bluetooth to compat-wireless-2.6
Added new scripts to load and unload wireless
and bluetooth modules seperately.
Compat is compiled as separate kernel module as
both wireless and bluetooth modules require it.
Compat Bluetooth has support to compile latest bluetooth code for kernel versions 2.6.27 to 2.6.31.
--- Makefile | 46 ++- compat/patches/16-compat.patch | 340 ++++++++++++++++ compat/patches/17-bluetooth.patch | 528 +++++++++++++++++++++++++++ compat/patches/98-add-compat-wireless.patch | 20 - config.mk | 12 + scripts/admin-clean.sh | 2 +- scripts/admin-update.sh | 82 ++++- scripts/btload.sh | 10 + scripts/btunload.sh | 13 + scripts/load.sh | 4 + scripts/unload.sh | 4 + scripts/wlload.sh | 22 ++ scripts/wlunload.sh | 54 +++ 13 files changed, 1081 insertions(+), 31 deletions(-) create mode 100644 compat/patches/16-compat.patch create mode 100644 compat/patches/17-bluetooth.patch create mode 100755 scripts/btload.sh create mode 100755 scripts/btunload.sh create mode 100755 scripts/wlload.sh create mode 100755 scripts/wlunload.sh
Makefile +41 -5
@@ -19,14 +19,15 @@ include $(M)/$(COMPAT_CONFIG) NOSTDINC_FLAGS := -I$(M)/include/ -include $(M)/include/net/compat.h $(CFLAGS) -obj-y := net/wireless/ net/mac80211/ net/rfkill/ +obj-y := net/bluetooth/ net/compat/ net/wireless/ net/mac80211/ net/rfkill/ ifeq ($(ONLY_CORE),) obj-m += \ drivers/ssb/ \ drivers/misc/eeprom/ \ drivers/net/ \ drivers/net/usb/ \ - drivers/net/wireless/ + drivers/net/wireless/ \ + drivers/bluetooth/ endif else
@@ -163,12 +164,25 @@ install-scripts: @$(MODPROBE) -l usb8xxx @$(MODPROBE) -l usbnet @$(MODPROBE) -l zd1211rw + @echo + @echo "Currently detected bluetooth subsystem modules:" + @echo + @$(MODPROBE) -l sco + @$(MODPROBE) -l l2cap + @$(MODPROBE) -l hidp + @$(MODPROBE) -l rfcomm + @$(MODPROBE) -l bnep + @$(MODPROBE) -l btusb + @$(MODPROBE) -l bluetooth @echo @echo Now run: @echo - @echo make unload + @echo sudo make unload to unload both wireless and bluetooth modules + @echo sudo make wlunload to unload wireless modules + @echo sudo make btunload to unload bluetooth modules @echo - @echo And then load the wireless module you need. If unsure reboot. + @echo And then load the wireless or bluetooth module you need. If unsure reboot. + @echo Alternatively use "sudo make load/wlload/btload" to load modules @echo uninstall:
@@ -239,6 +253,16 @@ uninstall: @$(MODPROBE) -l usb8xxx @$(MODPROBE) -l usbnet @$(MODPROBE) -l zd1211rw + @echo + @echo "Your old bluetooth subsystem modules were left intact:" + @echo + @$(MODPROBE) -l sco + @$(MODPROBE) -l l2cap + @$(MODPROBE) -l hidp + @$(MODPROBE) -l rfcomm + @$(MODPROBE) -l bnep + @$(MODPROBE) -l btusb + @$(MODPROBE) -l bluetooth @ @echo
@@ -253,7 +277,19 @@ unload: load: unload @./scripts/load.sh -.PHONY: all clean install uninstall unload load +btunload: + @./scripts/btunload.sh + +btload: btunload + @./scripts/btload.sh + +wlunload: + @./scripts/wlunload.sh + +wlload: wlunload + @./scripts/wlload.sh + +.PHONY: all clean install uninstall unload load btunload btload wlunload wlload endif
compat/patches/16-compat.patch new file +340 -0
340 lines not on this page · raw message
compat/patches/17-bluetooth.patch new file +528 -0
528 lines not on this page · raw message
compat/patches/98-add-compat-wireless.patch +0 -20
@@ -18,26 +18,6 @@ If your driver is not a cfg80211 driver you must ensure you include compat.h then. I think we added compat.h also for ssb, I forget. ---- a/net/wireless/Makefile 2009-08-07 12:27:50.836497001 -0700 -+++ b/net/wireless/Makefile 2009-08-07 12:27:51.952497240 -0700 -@@ -15,3 +15,17 @@ - cfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o - - ccflags-y += -D__CHECK_ENDIAN__ -+# Compat-wireless kernel compatibility code -+cfg80211-$(CONFIG_COMPAT_WIRELESS_22) += compat-2.6.22.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_23) += compat-2.6.23.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_24) += compat-2.6.24.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_25) += compat-2.6.25.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_26) += compat-2.6.26.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_27) += compat-2.6.27.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_28) += compat-2.6.28.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_29) += compat-2.6.29.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_30) += compat-2.6.30.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_31) += compat-2.6.31.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_32) += compat-2.6.32.o -+cfg80211-$(CONFIG_COMPAT_WIRELESS_33) += compat-2.6.33.o -+ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -23,6 +23,7 @@
config.mk +12 -0
@@ -19,6 +19,9 @@ ifeq ($(CONFIG_MAC80211),y) $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular") endif +ifeq ($(CONFIG_BT),y) +$(error "ERROR: your kernel has CONFIG_BT=y, you should have it CONFIG_BT=m if you want to use compat bluetooth.") +endif # We will warn when you don't have MQ support or NET_SCHED enabled. #
@@ -30,6 +33,7 @@ COMPAT_LATEST_VERSION = 32 KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p') COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done) $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_WIRELESS_$(ver)=y)) +$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_BLUETOOTH_$(ver)=y)) ifdef CONFIG_COMPAT_WIRELESS_25 $(error "ERROR: You should use compat-wireless-2.6-old for older kernels, this one is for kernels >= 2.6.25")
@@ -124,6 +128,14 @@ CONFIG_LIB80211_CRYPT_TKIP=m CONFIG_WIRELESS_OLD_REGULATORY=n +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_BNEP=m +CONFIG_BT_CMTP=m +CONFIG_BT_HIDP=m + ifdef CONFIG_COMPAT_WIRELESS_32 # Old kernels stil do depend on CONFIG_WIRELESS_EXT # as we add the wireless handler back to the struct
scripts/admin-clean.sh +1 -1
@@ -10,4 +10,4 @@ rm -f git-describe rm -f master-tag rm -f compat-git-release rm -f compat-release -echo "Cleaned wireless-compat-2.6" +echo "Cleaned wireless-bt-compat-2.6"
scripts/admin-update.sh +77 -5
137 lines not on this page · raw message
scripts/btload.sh new file +10 -0
@@ -0,0 +1,10 @@ +#!/bin/bash +MODULES="bluetooth btusb l2cap sco hidp rfcomm bnep" +for i in $MODULES; do + echo Loading $i... + modprobe $i +done +echo Starting bluetooth service.. +sudo service bluetooth start +sudo service bluetooth status +
scripts/btunload.sh new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/bash +MODULES="hidp rfcomm bnep l2cap sco btusb bluetooth" +echo Stoping bluetooth service.. +sudo service bluetooth stop +sudo service bluetooth status + +for i in $MODULES; do + grep ^$i /proc/modules 2>&1 > /dev/null + if [ $? -eq 0 ]; then + echo Unloading $i... + modprobe -r --ignore-remove $i + fi +done
scripts/load.sh +4 -0
@@ -12,6 +12,7 @@ MODULES="$MODULES rt2500usb rt73usb" MODULES="$MODULES rndis_wlan at76_usb" MODULES="$MODULES mwl8k mac80211_hwsim" MODULES="$MODULES at76c50x_usb" +MODULES="$MODULES bluetooth btusb l2cap sco hidp rfcomm bnep" for i in $MODULES; do echo Loading $i... modprobe $i
@@ -20,3 +21,6 @@ done athload ath5k # For b43 we must make sure to unload bcm43xx first b43load b43 +echo Starting bluetooth service.. +sudo service bluetooth start +sudo service bluetooth status
scripts/unload.sh +4 -0
@@ -27,6 +27,10 @@ MODULES="$MODULES rndis_wlan rndis_host cdc_ether usbnet" MODULES="$MODULES eeprom_93cx6" MODULES="$MODULES lib80211_crypt_ccmp lib80211_crypt_tkip lib80211_crypt_wep" MODULES="$MODULES mac80211 cfg80211 lib80211" +MODULES="$MODULES hidp rfcomm bnep l2cap sco btusb bluetooth" +echo Stoping bluetooth service.. +sudo service bluetooth stop +sudo service bluetooth status MADWIFI_MODULES="ath_pci ath_rate_sample wlan_scan_sta wlan ath_hal" IPW3945D="/sbin/ipw3945d-`uname -r`"
scripts/wlload.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash +MODULES="ipw2100 ipw2200 libertas_cs usb8xxx" +MODULES="$MODULES p54pci p54usb" +MODULES="$MODULES adm8211 zd1211rw" +MODULES="$MODULES rtl8180 rtl8187" +MODULES="$MODULES p54pci p54usb" +MODULES="$MODULES iwl3945 iwlagn" +MODULES="$MODULES ath ar9170usb" +MODULES="$MODULES rtl8180 rtl8187" +MODULES="$MODULES rt2400pci rt2500pci rt61pci" +MODULES="$MODULES rt2500usb rt73usb" +MODULES="$MODULES rndis_wlan at76_usb" +MODULES="$MODULES mwl8k mac80211_hwsim" +MODULES="$MODULES at76c50x_usb" +for i in $MODULES; do + echo Loading $i... + modprobe $i +done +# For ath5k we must be sure to unload MadWifi first +athload ath5k +# For b43 we must make sure to unload bcm43xx first +b43load b43
scripts/wlunload.sh new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.6.0.4
Quoted 11 lines · Bala Shanmugam
Added compat-bluetooth to compat-wireless-2.6
Added new scripts to load and unload wireless
and bluetooth modules seperately.Compat is compiled as separate kernel module as
both wireless and bluetooth modules require it.Compat Bluetooth has support to compile latest bluetooth code for kernel versions 2.6.27 to 2.6.31.
Should all this new functionality be documented in the README document?
Thanks,
Signature · 4 lines
Julian Calaby Email: [email protected] .Plan: http://sites.google.com/site/juliancalaby/
Yes Julian. REAME has to be updated.
Will do that shortly.
Regards,
Bala.
Quoted 27 lines · Julian Calaby
Quoted 11 lines · Bala Shanmugam
Added compat-bluetooth to compat-wireless-2.6
Added new scripts to load and unload wireless
and bluetooth modules seperately.Compat is compiled as separate kernel module as
both wireless and bluetooth modules require it.Compat Bluetooth has support to compile latest bluetooth code for kernel versions 2.6.27 to 2.6.31.
Should all this new functionality be documented in the README document?
Thanks,
--
Julian Calaby
Email: [email protected]
.Plan: http://sites.google.com/site/juliancalaby/
.
Quoted 6 lines · Bala Shanmugam
Added compat-bluetooth to compat-wireless-2.6
Added new scripts to load and unload wireless
and bluetooth modules seperately.
Quoted 6 lines
Compat is compiled as separate kernel module as
both wireless and bluetooth modules require it.Compat Bluetooth has support to compile latest bluetooth code for kernel versions 2.6.27 to 2.6.31.
Signed-off-by Bala Shanmugam <[email protected]>
Thanks a lot Bala, applied. I made a few changes now like move some of the compat hunks that are specific to an actual kernel change to their respective patches/*.patch file. I nuked the old compat files and updated compat.git to add all the missing items. Additionally changed the build process and selection for components but I'll elaborate on that on another e-mail.
Luis