From: Luis R. Rodriguez Date: Tue, 4 Aug 2009 21:41:25 +0000 (-0700) Subject: Add README for compat/patches/ and expalain each patch X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a2777f671464d2dbb4090dc16b34c990ac26bc75;p=openwrt%2Fstaging%2Fblogic.git Add README for compat/patches/ and expalain each patch We add a README to describe why we have compat/patches/*.patch, and we also explain why each patch exists on the top of the patch file. Please read that carefully. Signed-off-by: Luis R. Rodriguez --- diff --git a/compat/patches/01-netdev.patch b/compat/patches/01-netdev.patch index 090f30862a0b..64b21341a26e 100644 --- a/compat/patches/01-netdev.patch +++ b/compat/patches/01-netdev.patch @@ -1,3 +1,11 @@ + +This patch backports the struct net_device_ops changes added +on 2.6.29. It also backports the namespace changes added +through net/wireless/wext.c. Note that there is another +patch file which also addresses netns changes, we leave +them separate as there is no easy way to split the stuff +without creating a headache on maintenance of the pathes. + --- a/drivers/net/usb/rndis_host.c 2009-08-04 10:15:14.237993105 -0700 +++ b/drivers/net/usb/rndis_host.c 2009-08-04 10:15:14.614020995 -0700 @@ -274,6 +274,7 @@ response_error: diff --git a/compat/patches/02-ksize.patch b/compat/patches/02-ksize.patch index 0f384cdbdede..42f802f1561d 100644 --- a/compat/patches/02-ksize.patch +++ b/compat/patches/02-ksize.patch @@ -1,3 +1,15 @@ +ksize() was added as of 2.6.29, it gives you the actual +size of the allocated data. Since we have no support for +this we simply do not optimize for it and deal with +large alloocations for the IEs. + +We technically could backport this as + +define ksize(bleh) SOME_LARGE_NUMBER + +but doing it this way emphasis careful review +of the situation. + --- a/net/wireless/scan.c 2009-08-04 10:39:49.110993204 -0700 +++ b/net/wireless/scan.c 2009-08-04 10:39:49.619023920 -0700 @@ -401,7 +401,11 @@ diff --git a/compat/patches/03-rfkill.patch b/compat/patches/03-rfkill.patch index 24352e8d31f8..7c2c394580fe 100644 --- a/compat/patches/03-rfkill.patch +++ b/compat/patches/03-rfkill.patch @@ -1,3 +1,13 @@ +rfkill was re-implemented on 2.6.31. We port it to +older kernels with a simple hack, just rename the +module as a new one rfkill_backport, and every +exported symbol gets redefined with a _backport +postfix through compat-2.6.31.h. The changes below +are the ones we could not do through compat-2.6.31.h + +Do older kernels have /dev/rfkill ? I not then we can +just keep /dev/rfkill and not /dev/rfkill_backport. + --- a/net/rfkill/Makefile +++ b/net/rfkill/Makefile @@ -2,6 +2,6 @@ diff --git a/compat/patches/04-netns.patch b/compat/patches/04-netns.patch index 65778d88e4b5..4df2d1f2cdb7 100644 --- a/compat/patches/04-netns.patch +++ b/compat/patches/04-netns.patch @@ -1,3 +1,5 @@ +The only other namespace change. + --- a/net/wireless/nl80211.c 2009-07-27 16:22:30.301045695 -0700 +++ b/net/wireless/nl80211.c 2009-07-27 18:17:28.445046102 -0700 @@ -29,7 +29,9 @@ diff --git a/compat/patches/05-usb.patch b/compat/patches/05-usb.patch index 3bbe439a4119..e81b41b36886 100644 --- a/compat/patches/05-usb.patch +++ b/compat/patches/05-usb.patch @@ -1,3 +1,5 @@ +USB opt soft_unbid was added as of 2.6.27. + --- a/drivers/net/wireless/p54/p54usb.c 2009-07-07 13:36:49.523678591 -0700 +++ b/drivers/net/wireless/p54/p54usb.c 2009-07-07 13:36:49.831718432 -0700 @@ -1047,7 +1047,9 @@ diff --git a/compat/patches/06-header-changes.patch b/compat/patches/06-header-changes.patch index 76e95d9b87e5..3369185112d2 100644 --- a/compat/patches/06-header-changes.patch +++ b/compat/patches/06-header-changes.patch @@ -1,3 +1,9 @@ + +Every kernel release there are a few changes to headers +made. Some code gets shifted around between headers or +new headers are defined. This patch deals with such +cases. + --- a/drivers/net/wireless/b43/phy_common.h +++ b/drivers/net/wireless/b43/phy_common.h @@ -2,6 +2,9 @@ diff --git a/compat/patches/07-change-default-rate-alg.patch b/compat/patches/07-change-default-rate-alg.patch index 96aa4e27f78c..241cdad95c96 100644 --- a/compat/patches/07-change-default-rate-alg.patch +++ b/compat/patches/07-change-default-rate-alg.patch @@ -1,3 +1,15 @@ + +Your current kernels configuration (.config and linux/autoconf.h) +are always respected when compiling external modules. Because +of this if you are using an old kernel which preferred the +PID rate control algorithm we cannot force it to use minstrel +instead. Minstrel is now the default rate control algorithm +and we want you to use it. To let you use it we redefine here +the CONFIG_MAC80211_RC_DEFAULT to CONFIG_COMPAT_MAC80211_RC_DEFAULT +and define CONFIG_COMPAT_MAC80211_RC_DEFAULT on config.mk. +Through the compat autoconf we then get it also defined there +at compilation time. + --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -22,7 +22,7 @@ struct rate_control_alg { diff --git a/compat/patches/08-zd1211rw-led.patch b/compat/patches/08-zd1211rw-led.patch index 902eb4f0692a..144e16add741 100644 --- a/compat/patches/08-zd1211rw-led.patch +++ b/compat/patches/08-zd1211rw-led.patch @@ -1,3 +1,10 @@ +These changes are present because zd1211rw does not make +use of the mac80211 LED API, which itself uses linux/leds.h. +The backport code includes leds.h so to avoid conflicts +we rename things here. + +I've sent this patch upstream, so we can soon remove this. + --- a/drivers/net/wireless/zd1211rw/zd_chip.h 2009-07-06 16:09:14.934197004 -0700 +++ b/drivers/net/wireless/zd1211rw/zd_chip.h 2009-07-06 16:10:01.570226234 -0700 @@ -897,9 +897,9 @@ diff --git a/compat/patches/98-add-compat-wireless.patch b/compat/patches/98-add-compat-wireless.patch index 7309fcf5531f..865ea0d12730 100644 --- a/compat/patches/98-add-compat-wireless.patch +++ b/compat/patches/98-add-compat-wireless.patch @@ -1,3 +1,22 @@ + +This patch file includes the changes required to add +compat-wireless support. Besides all the patches in this +directory we have our own compat-2.6.*.[ch] files which +help backport more. + +We could optimize this to not compile objects for +kernels >= your own kernel but that may mean +some nasty check here, feel free to add it if you +figure out how. + +Lastly, the cfg80211.h change is what allows us to +get all compat-2.6.*.h files included. Its our only +point of entry through compat code. + +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 +++ b/net/wireless/Makefile @@ -10,3 +10,11 @@ cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o diff --git a/compat/patches/99-change-makefiles.patch b/compat/patches/99-change-makefiles.patch index ea8467fe4a3c..19e5d1d0acf6 100644 --- a/compat/patches/99-change-makefiles.patch +++ b/compat/patches/99-change-makefiles.patch @@ -1,3 +1,8 @@ + +This patch removes all drivers we do not support +or do not want to support. This lets us build +only the wireless stuff. + --- a/drivers/misc/eeprom/Makefile +++ b/drivers/misc/eeprom/Makefile @@ -1,5 +1 @@ diff --git a/compat/patches/README b/compat/patches/README new file mode 100644 index 000000000000..e048cb4eab5b --- /dev/null +++ b/compat/patches/README @@ -0,0 +1,16 @@ + +compat-wireless patches +======================= + +You must have a really good reason to be adding files +in this directory. Your reasoning should either match the +explanation already present on the top of each patch file +or you should add your own. + +We try to avoid having patch files because: + + * Its a pain in the ass to maintain them. + + * Most backport changes can be pulled off through + some macro magic or new files which implement + the new functionality on the old kernels.