rpms/kernel/F-8 linux-2.6-cfg80211-fixup.patch, NONE, 1.1 kernel.spec, 1.404, 1.405

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


Author: linville

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21906

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/F-8/kernel.spec,v
retrieving revision 1.404
retrieving revision 1.405
diff -u -r1.404 -r1.405
--- kernel.spec	26 Mar 2008 21:07:46 -0000	1.404
+++ kernel.spec	27 Mar 2008 13:31:13 -0000	1.405
@@ -668,6 +668,7 @@
 Patch683: linux-2.6-iwlwifi-sband-registration.patch
 Patch684: linux-2.6-mac80211-enc-off.patch
 Patch685: linux-2.6-prism54-mutex-thinko.patch
+Patch686: linux-2.6-cfg80211-fixup.patch
 Patch690: linux-2.6-at76.patch
 Patch691: linux-2.6-rndis_wlan.patch
 Patch692: linux-2.6-ps3_gelic_wireless.patch
@@ -1240,6 +1241,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
@@ -1933,6 +1935,9 @@
 
 
 %changelog
+* Thu Mar 27 2008 John W. Linville <linville at redhat.com> 2.6.24.4-59
+- cfg80211: don't export ieee80211_get_channel
+
 * Wed Mar 26 2008 John W. Linville <linville at redhat.com> 2.6.24.4-58
 - ipw2200 annotations and fixes
 - iwlwifi: Re-ordering probe flow (4965)




More information about the fedora-extras-commits mailing list