Skip to contentSkip to conversation

compat-wireless: remove patch part dealing with net/net_namespace.h

PATCH In review Pavel Roskin 2 participants 5 messages Apr 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 compat-wireless: remove patch part dealing with net/net_namespace.h

net/net_namespace.h stub is now provided by compat

---
 patches/06-header-changes.patch |   60 ---------------------------------------
 1 files changed, 0 insertions(+), 60 deletions(-)
patches/06-header-changes.patch +0 -60
index 2fcf7a5..b3c71fb 100644
@@ -64,63 +64,3 @@ cases.
  
  /**
   * DOC: Key handling basics
---- a/net/mac80211/main.c
-+++ b/net/mac80211/main.c
-@@ -20,7 +20,9 @@
- #include <linux/rtnetlink.h>
- #include <linux/bitmap.h>
- #include <linux/pm_qos_params.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- #include <net/net_namespace.h>
-+#endif
- #include <net/cfg80211.h>
- 
- #include "ieee80211_i.h"
---- a/net/mac80211/cfg.c
-+++ b/net/mac80211/cfg.c
-@@ -10,7 +10,9 @@
- #include <linux/nl80211.h>
- #include <linux/rtnetlink.h>
- #include <linux/slab.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- #include <net/net_namespace.h>
-+#endif
- #include <linux/rcupdate.h>
- #include <net/cfg80211.h>
- #include "ieee80211_i.h"
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -18,7 +18,9 @@
- #include <linux/etherdevice.h>
- #include <linux/bitmap.h>
- #include <linux/rcupdate.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- #include <net/net_namespace.h>
-+#endif
- #include <net/ieee80211_radiotap.h>
- #include <net/cfg80211.h>
- #include <net/mac80211.h>
---- a/net/mac80211/util.c
-+++ b/net/mac80211/util.c
-@@ -20,7 +20,9 @@
- #include <linux/if_arp.h>
- #include <linux/bitmap.h>
- #include <linux/crc32.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- #include <net/net_namespace.h>
-+#endif
- #include <net/cfg80211.h>
- #include <net/rtnetlink.h>
- 
---- a/net/wireless/nl80211.c
-+++ b/net/wireless/nl80211.c
-@@ -15,7 +15,9 @@
- #include <linux/rtnetlink.h>
- #include <linux/netlink.h>
- #include <linux/etherdevice.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- #include <net/net_namespace.h>
-+#endif
- #include <net/genetlink.h>
- #include <net/cfg80211.h>
- #include <net/sock.h>
#1 lore raw

PATCH 2/4 compat-wireless: remove 13-trace.patch, it's handled in compat now

---
 patches/13-trace.patch |   63 ------------------------------------------------
 1 files changed, 0 insertions(+), 63 deletions(-)
 delete mode 100644 patches/13-trace.patch
patches/13-trace.patch deleted +0 -63
deleted file mode 100644
index e3fee40..0000000
@@ -1,63 +0,0 @@
-Older kernels do not have trace/define_trace.h [1] and if there
-is something there that we can backport we will define it
-in or compat headers.
-
-[1] http://lxr.linux.no/#linux+v2.6.31/include/trace/define_trace.h
-
---- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h
-+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
-@@ -27,7 +27,9 @@
- #if !defined(__IWLWIFI_DEVICE_TRACE) || defined(TRACE_HEADER_MULTI_READ)
- #define __IWLWIFI_DEVICE_TRACE
- 
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
- #include <linux/tracepoint.h>
-+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */
- 
- #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
- #undef TRACE_EVENT
-@@ -263,4 +265,6 @@ TRACE_EVENT(iwlwifi_dev_ucode_event,
- #define TRACE_INCLUDE_PATH .
- #undef TRACE_INCLUDE_FILE
- #define TRACE_INCLUDE_FILE iwl-devtrace
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
- #include <trace/define_trace.h>
-+#endif
---- a/drivers/net/wireless/iwmc3200wifi/trace.h
-+++ b/drivers/net/wireless/iwmc3200wifi/trace.h
-@@ -1,7 +1,9 @@
- #if !defined(__IWM_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
- #define __IWM_TRACE_H__
- 
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
- #include <linux/tracepoint.h>
-+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */
- 
- #if !defined(CONFIG_IWM_TRACING)
- #undef TRACE_EVENT
-@@ -280,4 +282,6 @@ TRACE_EVENT(iwm_rx_packet,
- #define TRACE_INCLUDE_PATH .
- #undef TRACE_INCLUDE_FILE
- #define TRACE_INCLUDE_FILE trace
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
- #include <trace/define_trace.h>
-+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) */
---- a/net/mac80211/driver-trace.h
-+++ b/net/mac80211/driver-trace.h
-@@ -1,7 +1,9 @@
- #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
- #define __MAC80211_DRIVER_TRACE
- 
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
- #include <linux/tracepoint.h>
-+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */
- #include <net/mac80211.h>
- #include "ieee80211_i.h"
- 
-@@ -772,4 +774,6 @@ TRACE_EVENT(drv_flush,
- #define TRACE_INCLUDE_PATH .
- #undef TRACE_INCLUDE_FILE
- #define TRACE_INCLUDE_FILE driver-trace
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
- #include <trace/define_trace.h>
-+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) */
#2 lore raw

PATCH 3/4 compat-wireless: remove 25-device_create.patch, it's handled by compat

In reply to Pavel Roskin
---
 patches/25-device_create.patch |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)
 delete mode 100644 patches/25-device_create.patch
patches/25-device_create.patch deleted +0 -20
deleted file mode 100644
index 232816e..0000000
@@ -1,20 +0,0 @@
---- a/drivers/net/wireless/mac80211_hwsim.c
-+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -1211,8 +1211,17 @@ static int __init init_mac80211_hwsim(vo
- 		data = hw->priv;
- 		data->hw = hw;
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
- 		data->dev = device_create(hwsim_class, NULL, 0, hw,
- 					  "hwsim%d", i);
-+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))
-+		data->dev = device_create_drvdata(hwsim_class, NULL, 0, hw,
-+					  "hwsim%d", i);
-+#else
-+		data->dev = device_create(hwsim_class, NULL, 0,
-+					  "hwsim%d", i);
-+		dev_set_drvdata(data->dev, hw);
-+#endif
- 		if (IS_ERR(data->dev)) {
- 			printk(KERN_DEBUG
- 			       "mac80211_hwsim: device_create "
#3 lore raw

PATCH 4/4 compat-wireless: find the actual remote URL

In reply to Pavel Roskin

Don't assume the remote to be called "origin". Instead, find the current branch first, defaulting to "master". Then find the corresponding remote, defaulting to "origin". Then find the remote URL, defaulting to "unknown". Reuse the remote URL for TREE_NAME.

---
 scripts/admin-update.sh |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
scripts/admin-update.sh +8 -3
index af4479a..5d8068d 100755
@@ -295,15 +295,20 @@ done
 DIR="$PWD"
 cd $GIT_TREE
 GIT_DESCRIBE=$(git describe)
+GIT_BRANCH=$(git branch --no-color |sed -n 's/^\* //p')
+GIT_BRANCH=${GIT_BRANCH-master}
+GIT_REMOTE=$(git config branch.${GIT_BRANCH}.remote)
+GIT_REMOTE=${GIT_REMOTE-origin}
+GIT_REMOTE_URL=$(git config remote.${GIT_REMOTE}.url)
+GIT_REMOTE_URL=${GIT_REMOTE_URL-unknown}
 echo -e "${GREEN}Updated${NORMAL} from local tree: ${BLUE}${GIT_TREE}${NORMAL}"
-echo -e "Origin remote URL: ${CYAN}$(git config remote.origin.url)${NORMAL}"
+echo -e "Origin remote URL: ${CYAN}${GIT_REMOTE_URL}${NORMAL}"
 cd $DIR
 if [ -d ./.git ]; then
 	git describe > compat-release
 
 	cd $GIT_TREE
-	TREE_NAME=$(git config remote.origin.url)
-	TREE_NAME=${TREE_NAME##*/}
+	TREE_NAME=${GIT_REMOTE_URL##*/}
 
 	echo $TREE_NAME > $DIR/git-describe
 	echo $GIT_DESCRIBE >> $DIR/git-describe
#4 lore raw

Re: [PATCH 4/4] compat-wireless: find the actual remote URL

Quoted 6 lines · Pavel Roskin

Don't assume the remote to be called "origin".  Instead, find the current branch first, defaulting to "master".  Then find the corresponding remote, defaulting to "origin".  Then find the remote URL, defaulting to "unknown".  Reuse the remote URL for TREE_NAME.

Thanks! All 4 patches applied.

Luis