All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] [compat-2.6] Update compat.diff
@ 2009-06-16 18:31 Hauke Mehrtens
  2009-06-16 18:31 ` [PATCH 2/2] [compat-2.6] Do not build backported rfkill module on new kernels Hauke Mehrtens
  0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2009-06-16 18:31 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/compat.diff |  130 +++-------------------------------------------------
 1 files changed, 7 insertions(+), 123 deletions(-)

diff --git a/compat/compat.diff b/compat/compat.diff
index cbf0b9e..c309732 100644
--- a/compat/compat.diff
+++ b/compat/compat.diff
@@ -195,133 +195,17 @@
  
  #include "ath5k.h"
  #include "debug.h"
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -21,7 +21,11 @@
- #include <linux/device.h>
- #include <net/mac80211.h>
- #include <linux/leds.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- #include <linux/rfkill.h>
-+#else
-+#include <linux/rfkill_backport.h>
-+#endif
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -3385,7 +3385,7 @@ void ath9k_hw_fill_cap_info(struct ath_hw *ah)
  
- #include "hw.h"
- #include "rc.h"
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1178,7 +1178,7 @@ void ath_radio_disable(struct ath_softc *sc)
- 	ath9k_ps_restore(sc);
- }
+ 	pCap->hw_caps |= ATH9K_HW_CAP_ENHANCEDPM;
  
 -#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
 +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)) || ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL_BACKPORT) || defined(CONFIG_RFKILL_BACKPORT_MODULE))
- 
- /*******************/
- /*	Rfkill	   */
-@@ -1210,7 +1210,11 @@ static void ath_rfkill_poll_state(struct rfkill *rfkill, void *data)
- 	struct ath_softc *sc = data;
- 	bool blocked = !!ath_is_rfkill_set(sc);
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- 	if (rfkill_set_hw_state(rfkill, blocked))
-+#else
-+	if (backport_rfkill_set_hw_state(rfkill, blocked))
-+#endif
- 		ath_radio_disable(sc);
- 	else
- 		ath_radio_enable(sc);
-@@ -1226,10 +1230,17 @@ static int ath_init_sw_rfkill(struct ath_softc *sc)
- 	snprintf(sc->rf_kill.rfkill_name, sizeof(sc->rf_kill.rfkill_name),
- 		"ath9k-%s::rfkill", wiphy_name(sc->hw->wiphy));
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- 	sc->rf_kill.rfkill = rfkill_alloc(sc->rf_kill.rfkill_name,
- 					  wiphy_dev(sc->hw->wiphy),
- 					  RFKILL_TYPE_WLAN,
- 					  &sc->rf_kill.ops, sc);
-+#else
-+	sc->rf_kill.rfkill = backport_rfkill_alloc(sc->rf_kill.rfkill_name,
-+					  wiphy_dev(sc->hw->wiphy),
-+					  RFKILL_TYPE_WLAN,
-+					  &sc->rf_kill.ops, sc);
-+#endif
- 	if (!sc->rf_kill.rfkill) {
- 		DPRINTF(sc, ATH_DBG_FATAL, "Failed to allocate rfkill\n");
- 		return -ENOMEM;
-@@ -1242,8 +1253,13 @@ static int ath_init_sw_rfkill(struct ath_softc *sc)
- static void ath_deinit_rfkill(struct ath_softc *sc)
- {
- 	if (sc->sc_flags & SC_OP_RFKILL_REGISTERED) {
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- 		rfkill_unregister(sc->rf_kill.rfkill);
- 		rfkill_destroy(sc->rf_kill.rfkill);
-+#else
-+		backport_rfkill_unregister(sc->rf_kill.rfkill);
-+		backport_rfkill_destroy(sc->rf_kill.rfkill);
-+#endif
- 		sc->sc_flags &= ~SC_OP_RFKILL_REGISTERED;
- 	}
- }
-@@ -1251,10 +1267,18 @@ static void ath_deinit_rfkill(struct ath_softc *sc)
- static int ath_start_rfkill_poll(struct ath_softc *sc)
- {
- 	if (!(sc->sc_flags & SC_OP_RFKILL_REGISTERED)) {
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- 		if (rfkill_register(sc->rf_kill.rfkill)) {
-+#else
-+		if (backport_rfkill_register(sc->rf_kill.rfkill)) {
-+#endif
- 			DPRINTF(sc, ATH_DBG_FATAL,
- 				"Unable to register rfkill\n");
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- 			rfkill_destroy(sc->rf_kill.rfkill);
-+#else
-+			backport_rfkill_destroy(sc->rf_kill.rfkill);
-+#endif
- 
- 			/* Deinitialize the device */
- 			ath_cleanup(sc);
-@@ -1286,7 +1310,7 @@ void ath_detach(struct ath_softc *sc)
- 
- 	DPRINTF(sc, ATH_DBG_CONFIG, "Detach ATH hw\n");
- 
--#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
-+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)) || ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL_BACKPORT) || defined(CONFIG_RFKILL_BACKPORT_MODULE))
- 	ath_deinit_rfkill(sc);
- #endif
- 	ath_deinit_leds(sc);
-@@ -1626,7 +1650,7 @@ int ath_attach(u16 devid, struct ath_softc *sc)
- 	if (error != 0)
- 		goto error_attach;
- 
--#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
-+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)) || ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL_BACKPORT) || defined(CONFIG_RFKILL_BACKPORT_MODULE))
- 	/* Initialize s/w rfkill */
- 	error = ath_init_sw_rfkill(sc);
- 	if (error)
-@@ -2018,7 +2042,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
- 
- 	ieee80211_wake_queues(hw);
- 
--#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
-+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)) || ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) && defined(CONFIG_RFKILL_BACKPORT) || defined(CONFIG_RFKILL_BACKPORT_MODULE))
- 	r = ath_start_rfkill_poll(sc);
- #endif
- 
-@@ -2159,7 +2183,11 @@ static void ath9k_stop(struct ieee80211_hw *hw)
- 	} else
- 		sc->rx.rxlink = NULL;
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
- 	rfkill_pause_polling(sc->rf_kill.rfkill);
-+#else
-+	backport_rfkill_pause_polling(sc->rf_kill.rfkill);
-+#endif
- 
- 	/* disable HAL and put h/w to sleep */
- 	ath9k_hw_disable(sc->sc_ah);
+ 	ah->rfsilent = ah->eep_ops->get_eeprom(ah, EEP_RF_SILENT);
+ 	if (ah->rfsilent & EEP_RFSILENT_ENABLED) {
+ 		ah->rfkill_gpio =
 --- a/drivers/net/wireless/b43/pcmcia.c
 +++ b/drivers/net/wireless/b43/pcmcia.c
 @@ -87,7 +87,11 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
-- 
1.6.2.1


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

* [PATCH 2/2] [compat-2.6] Do not build backported rfkill module on new kernels.
  2009-06-16 18:31 [PATCH 1/2] [compat-2.6] Update compat.diff Hauke Mehrtens
@ 2009-06-16 18:31 ` Hauke Mehrtens
  2009-06-16 22:17   ` Luis R. Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2009-06-16 18:31 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 config.mk |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index c06c9c2..55d5627 100644
--- a/config.mk
+++ b/config.mk
@@ -353,7 +353,11 @@ CONFIG_LIBERTAS=m
 # CONFIG_LIBERTAS_DEBUG=y
 endif
 
+# We need the backported rfkill module on kernel < 2.6.31.
+# In more recent kernel versions use the in kernel rfkill module.
+ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 30 && echo yes),yes)
 CONFIG_RFKILL_BACKPORT=m
 CONFIG_RFKILL_BACKPORT_LEDS=y
 CONFIG_RFKILL_BACKPORT_INPUT=y
+endif
 
-- 
1.6.2.1


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

* Re: [PATCH 2/2] [compat-2.6] Do not build backported rfkill module on new kernels.
  2009-06-16 18:31 ` [PATCH 2/2] [compat-2.6] Do not build backported rfkill module on new kernels Hauke Mehrtens
@ 2009-06-16 22:17   ` Luis R. Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2009-06-16 22:17 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless

On Tue, Jun 16, 2009 at 11:31 AM, Hauke Mehrtens<hauke@hauke-m.de> wrote:
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---

Thanks! New tarball pushed out.

v2.6.30-26761-gd1a6d5c
wireless-testing latest tag:
master-2009-06-15
This is compat-release:
master-2009-06-15

  Luis

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

end of thread, other threads:[~2009-06-16 22:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-16 18:31 [PATCH 1/2] [compat-2.6] Update compat.diff Hauke Mehrtens
2009-06-16 18:31 ` [PATCH 2/2] [compat-2.6] Do not build backported rfkill module on new kernels Hauke Mehrtens
2009-06-16 22:17   ` 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.