All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying"
@ 2011-05-22 10:47 Hauke Mehrtens
  2011-05-22 10:47 ` [PATCH 2/3] compat-wireless: adapt rename of dev to sdev in b43 Hauke Mehrtens
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hauke Mehrtens @ 2011-05-22 10:47 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

The commit was removed from linux-next, so this backport patch should also be removed.

This reverts commit b8e46e19937710d2ae14731871cf8c45a0fc9d74.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 config.mk                   |    1 +
 defconfigs/atheros-debug.mk |    1 +
 patches/03-rfkill.patch     |   18 +++++++++++++++---
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/config.mk b/config.mk
index ce67176..99485a4 100644
--- a/config.mk
+++ b/config.mk
@@ -626,5 +626,6 @@ CONFIG_RFKILL_BACKPORT=m
 ifdef CONFIG_LEDS_TRIGGERS
 CONFIG_RFKILL_BACKPORT_LEDS=y
 endif #CONFIG_LEDS_TRIGGERS
+CONFIG_RFKILL_BACKPORT_INPUT=y
 endif #CONFIG_COMPAT_KERNEL_31
 
diff --git a/defconfigs/atheros-debug.mk b/defconfigs/atheros-debug.mk
index 8850df5..d9534eb 100644
--- a/defconfigs/atheros-debug.mk
+++ b/defconfigs/atheros-debug.mk
@@ -587,5 +587,6 @@ endif #CONFIG_COMPAT_KERNEL_27
 ifdef CONFIG_COMPAT_KERNEL_31
 CONFIG_RFKILL_BACKPORT=m
 CONFIG_RFKILL_BACKPORT_LEDS=y
+CONFIG_RFKILL_BACKPORT_INPUT=y
 endif #CONFIG_COMPAT_KERNEL_31
 
diff --git a/patches/03-rfkill.patch b/patches/03-rfkill.patch
index e623a35..a13dd9a 100644
--- a/patches/03-rfkill.patch
+++ b/patches/03-rfkill.patch
@@ -35,11 +35,23 @@ This would do the policing from within mac80211.
  #
  
 -rfkill-y			+= core.o
+-rfkill-$(CONFIG_RFKILL_INPUT)	+= input.o
 -obj-$(CONFIG_RFKILL)		+= rfkill.o
-+rfkill_backport-y 		+= core.o
-+obj-$(CONFIG_RFKILL_BACKPORT)	+= rfkill_backport.o
++rfkill_backport-y			+= core.o
++rfkill_backport-$(CONFIG_RFKILL_BACKPORT_INPUT)	+= input.o
++obj-$(CONFIG_RFKILL_BACKPORT)		+= rfkill_backport.o
  obj-$(CONFIG_RFKILL_REGULATOR)	+= rfkill-regulator.o
- obj-$(CONFIG_RFKILL_GPIO)	+= rfkill-gpio.o
+--- a/net/rfkill/input.c
++++ b/net/rfkill/input.c
+@@ -232,7 +232,7 @@ static int rfkill_connect(struct input_h
+ 
+ 	handle->dev = dev;
+ 	handle->handler = handler;
+-	handle->name = "rfkill";
++	handle->name = "rfkill_backport";
+ 
+ 	/* causes rfkill_start() to be called */
+ 	error = input_register_handle(handle);
 --- a/net/rfkill/core.c
 +++ b/net/rfkill/core.c
 @@ -658,7 +658,7 @@ static int rfkill_resume(struct device *
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] compat-wireless: adapt rename of dev to sdev in b43
  2011-05-22 10:47 [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying" Hauke Mehrtens
@ 2011-05-22 10:47 ` Hauke Mehrtens
  2011-05-22 10:47 ` [PATCH 3/3] compat-wireless: revert usage of kfree_rcu Hauke Mehrtens
  2011-05-23 22:57 ` [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying" Luis R. Rodriguez
  2 siblings, 0 replies; 4+ messages in thread
From: Hauke Mehrtens @ 2011-05-22 10:47 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

Adapt changes from "b43: rename b43_wldev's field with ssb_device to sdev"

This was missing in commit "compat-wireless: fix applying of 09-threaded-irq.patch"

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/09-threaded-irq.patch |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/patches/09-threaded-irq.patch b/patches/09-threaded-irq.patch
index d0f1d65..acfe043 100644
--- a/patches/09-threaded-irq.patch
+++ b/patches/09-threaded-irq.patch
@@ -26,7 +26,7 @@ thread in process context as well.
  	} else {
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
 +		err = compat_request_threaded_irq(&dev->irq_compat,
-+						  dev->dev->irq,
++						  dev->sdev->irq,
 +						  b43_interrupt_handler,
 +						  b43_interrupt_thread_handler,
 +						  IRQF_SHARED, KBUILD_MODNAME, dev);
@@ -43,7 +43,7 @@ thread in process context as well.
  static void b43_wireless_core_detach(struct b43_wldev *dev)
  {
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-+	if (dev->dev->bus->bustype != SSB_BUSTYPE_SDIO)
++	if (dev->sdev->bus->bustype != SSB_BUSTYPE_SDIO)
 +		compat_destroy_threaded_irq(&dev->irq_compat);
 +#endif
  	/* We release firmware that late to not be required to re-request
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] compat-wireless: revert usage of kfree_rcu
  2011-05-22 10:47 [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying" Hauke Mehrtens
  2011-05-22 10:47 ` [PATCH 2/3] compat-wireless: adapt rename of dev to sdev in b43 Hauke Mehrtens
@ 2011-05-22 10:47 ` Hauke Mehrtens
  2011-05-23 22:57 ` [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying" Luis R. Rodriguez
  2 siblings, 0 replies; 4+ messages in thread
From: Hauke Mehrtens @ 2011-05-22 10:47 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

Backporting kfree_rcu() in compat does not work as
struct rcu_head->func is always interpreted as a pointer in older
kernel versions, but when using kfree_rcu() it is set to an offset.
rcu_head->func is used in some functions in the kernel not backported
by compat-wireless.

This patch is based on the patch posted by Ignacy Gawedzki <i@lri.fr>
on the mailing list.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/41-no-kfree-rcu.patch |   83 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 patches/41-no-kfree-rcu.patch

diff --git a/patches/41-no-kfree-rcu.patch b/patches/41-no-kfree-rcu.patch
new file mode 100644
index 0000000..1c50d38
--- /dev/null
+++ b/patches/41-no-kfree-rcu.patch
@@ -0,0 +1,83 @@
+--- a/net/mac80211/agg-tx.c
++++ b/net/mac80211/agg-tx.c
+@@ -144,6 +144,16 @@ void ieee80211_assign_tid_tx(struct sta_
+ 	rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], tid_tx);
+ }
+ 
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
++static void kfree_tid_tx(struct rcu_head *rcu_head)
++{
++	struct tid_ampdu_tx *tid_tx =
++	    container_of(rcu_head, struct tid_ampdu_tx, rcu_head);
++
++	kfree(tid_tx);
++}
++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)) */
++
+ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
+ 				    enum ieee80211_back_parties initiator,
+ 				    bool tx)
+@@ -166,7 +176,11 @@ int ___ieee80211_stop_tx_ba_session(stru
+ 		/* not even started yet! */
+ 		ieee80211_assign_tid_tx(sta, tid, NULL);
+ 		spin_unlock_bh(&sta->lock);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+ 		kfree_rcu(tid_tx, rcu_head);
++#else
++		call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
++#endif
+ 		return 0;
+ 	}
+ 
+@@ -325,7 +339,11 @@ void ieee80211_tx_ba_session_handle_star
+ 		spin_unlock_bh(&sta->lock);
+ 
+ 		ieee80211_wake_queue_agg(local, tid);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+ 		kfree_rcu(tid_tx, rcu_head);
++#else
++		call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
++#endif
+ 		return;
+ 	}
+ 
+@@ -710,7 +728,11 @@ void ieee80211_stop_tx_ba_cb(struct ieee
+ 
+ 	ieee80211_agg_splice_finish(local, tid);
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+ 	kfree_rcu(tid_tx, rcu_head);
++#else
++	call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
++#endif
+ 
+  unlock_sta:
+ 	spin_unlock_bh(&sta->lock);
+--- a/net/mac80211/work.c
++++ b/net/mac80211/work.c
+@@ -65,10 +65,25 @@ static void run_again(struct ieee80211_l
+ 		mod_timer(&local->work_timer, timeout);
+ }
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+ void free_work(struct ieee80211_work *wk)
+ {
+ 	kfree_rcu(wk, rcu_head);
+ }
++#else
++static void work_free_rcu(struct rcu_head *head)
++{
++	struct ieee80211_work *wk =
++		container_of(head, struct ieee80211_work, rcu_head);
++
++	kfree(wk);
++}
++
++void free_work(struct ieee80211_work *wk)
++{
++	call_rcu(&wk->rcu_head, work_free_rcu);
++}
++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)) */
+ 
+ static int ieee80211_compatible_rates(const u8 *supp_rates, int supp_rates_len,
+ 				      struct ieee80211_supported_band *sband,
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying"
  2011-05-22 10:47 [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying" Hauke Mehrtens
  2011-05-22 10:47 ` [PATCH 2/3] compat-wireless: adapt rename of dev to sdev in b43 Hauke Mehrtens
  2011-05-22 10:47 ` [PATCH 3/3] compat-wireless: revert usage of kfree_rcu Hauke Mehrtens
@ 2011-05-23 22:57 ` Luis R. Rodriguez
  2 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2011-05-23 22:57 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless

On Sun, May 22, 2011 at 3:47 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> The commit was removed from linux-next, so this backport patch should also be removed.
>
> This reverts commit b8e46e19937710d2ae14731871cf8c45a0fc9d74.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Applied these and also the compat.git ones, and pushed, thanks!

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-23 22:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-22 10:47 [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying" Hauke Mehrtens
2011-05-22 10:47 ` [PATCH 2/3] compat-wireless: adapt rename of dev to sdev in b43 Hauke Mehrtens
2011-05-22 10:47 ` [PATCH 3/3] compat-wireless: revert usage of kfree_rcu Hauke Mehrtens
2011-05-23 22:57 ` [PATCH 1/3] Revert "compat-wireless: fix rfkill patches from applying" Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.