rpms/kernel/devel linux-2.6-cfg80211-fixup.patch, NONE, 1.1 kernel.spec, 1.546, 1.547

John W. Linville (linville) fedora-extras-commits at redhat.com
Thu Mar 27 13:20:53 UTC 2008


Author: linville

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21557

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-cfg80211-fixup.patch 
Log Message:
cfg80211: don't export ieee80211_get_channel

linux-2.6-cfg80211-fixup.patch:

--- NEW FILE linux-2.6-cfg80211-fixup.patch ---
[PATCH] cfg80211: don't export ieee80211_get_channel

This patch makes ieee80211_get_channel a static inline defined in
cfg80211's header file which simply calls __ieee80211_get_channel
to avoid symbol clashes with the ieee80211 code.

The problem was pointed out by David Miller, thanks!

Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
Cc: David Miller <davem at davemloft.net>
---
 include/net/wireless.h |   18 +++++++++++++++---
 net/wireless/util.c    |    6 +++---
 2 files changed, 18 insertions(+), 6 deletions(-)

diff -up linux-2.6.24.noarch/include/net/wireless.h.orig linux-2.6.24.noarch/include/net/wireless.h
--- linux-2.6.24.noarch/include/net/wireless.h.orig	2008-03-27 09:10:23.000000000 -0400
+++ linux-2.6.24.noarch/include/net/wireless.h	2008-03-27 09:12:43.000000000 -0400
@@ -304,10 +304,22 @@ extern int ieee80211_channel_to_frequenc
  */
 extern int ieee80211_frequency_to_channel(int freq);
 
+/*
+ * Name indirection necessary because the ieee80211 code also has
+ * a function named "ieee80211_get_channel", so if you include
+ * cfg80211's header file you get cfg80211's version, if you try
+ * to include both header files you'll (rightfully!) get a symbol
+ * clash.
+ */
+extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
+							 int freq);
+
 /**
  * ieee80211_get_channel - get channel struct from wiphy for specified frequency
  */
-extern struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy,
-						       int freq);
-
+static inline struct ieee80211_channel *
+ieee80211_get_channel(struct wiphy *wiphy, int freq)
+{
+	return __ieee80211_get_channel(wiphy, freq);
+}
 #endif /* __NET_WIRELESS_H */
diff -up linux-2.6.24.noarch/net/wireless/util.c.orig linux-2.6.24.noarch/net/wireless/util.c
--- linux-2.6.24.noarch/net/wireless/util.c.orig	2008-03-27 09:10:23.000000000 -0400
+++ linux-2.6.24.noarch/net/wireless/util.c	2008-03-27 09:12:43.000000000 -0400
@@ -33,8 +33,8 @@ int ieee80211_frequency_to_channel(int f
 }
 EXPORT_SYMBOL(ieee80211_frequency_to_channel);
 
-struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy,
-						int freq)
+struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
+						  int freq)
 {
 	enum ieee80211_band band;
 	struct ieee80211_supported_band *sband;
@@ -54,7 +54,7 @@ struct ieee80211_channel *ieee80211_get_
 
 	return NULL;
 }
-EXPORT_SYMBOL(ieee80211_get_channel);
+EXPORT_SYMBOL(__ieee80211_get_channel);
 
 static void set_mandatory_flags_band(struct ieee80211_supported_band *sband,
 				     enum ieee80211_band band)


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.546
retrieving revision 1.547
diff -u -r1.546 -r1.547
--- kernel.spec	27 Mar 2008 04:08:19 -0000	1.546
+++ kernel.spec	27 Mar 2008 13:20:03 -0000	1.547
@@ -611,6 +611,7 @@
 Patch682: linux-2.6-iwlwifi-sband-registration.patch
 Patch683: linux-2.6-mac80211-enc-off.patch
 Patch684: linux-2.6-prism54-mutex-thinko.patch
+Patch685: linux-2.6-cfg80211-fixup.patch
 Patch690: linux-2.6-at76.patch
 
 Patch1101: linux-2.6-default-mmf_dump_elf_headers.patch
@@ -1110,6 +1111,7 @@
 ApplyPatch linux-2.6-iwlwifi-sband-registration.patch
 ApplyPatch linux-2.6-mac80211-enc-off.patch
 ApplyPatch linux-2.6-prism54-mutex-thinko.patch
+ApplyPatch linux-2.6-cfg80211-fixup.patch
 
 # Add misc wireless bits from upstream wireless tree
 ApplyPatch linux-2.6-at76.patch
@@ -1739,6 +1741,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Thu Mar 27 2008 John W. Linville <linville at redhat.com>
+- cfg80211: don't export ieee80211_get_channel
+
 * Wed Mar 26 2008 Dave Jones <davej at redhat.com>
 - 2.6.25-rc7-git1
 




More information about the fedora-extras-commits mailing list