* Patch for compat-wireless-2.6
@ 2008-02-16 15:12 Hauke Mehrtens
2008-02-19 23:35 ` Luis R. Rodriguez
0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2008-02-16 15:12 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless
[-- Attachment #1.1: Type: text/plain, Size: 160 bytes --]
Hi
This patch fixes some compile errors in the newest version of
compat-wireless-2.6. I have tested it with kernel 2.6.24 and 2.6.22
--
Hauke Mehrtens
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: compat-wireless-2.6.diff --]
[-- Type: text/x-patch; name="compat-wireless-2.6.diff", Size: 3376 bytes --]
diff --git a/compat/compat.diff b/compat/compat.diff
index c857ea2..49325b5 100644
--- a/compat/compat.diff
+++ b/compat/compat.diff
@@ -633,3 +633,34 @@
obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
-obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
-obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
+--- a/drivers/net/wireless/zd1211rw/zd_chip.c 2008-02-15 16:29:43.000000000 -0500
++++ b/drivers/net/wireless/zd1211rw/zd_chip.c 2008-02-15 16:29:43.000000000 -0500
+@@ -1280,7 +1280,7 @@ int zd_chip_control_leds(struct zd_chip *chip, enum led_status status)
+ other_led = chip->link_led == LED1 ? LED2 : LED1;
+
+ switch (status) {
+- case LED_OFF:
++ case LED_OFF_ZD:
+ ioreqs[0].value = FW_LINK_OFF;
+ ioreqs[1].value = v[1] & ~(LED1|LED2);
+ break;
+--- a/drivers/net/wireless/zd1211rw/zd_chip.h 2008-02-15 16:29:43.000000000 -0500
++++ b/drivers/net/wireless/zd1211rw/zd_chip.h 2008-02-15 16:29:43.000000000 -0500
+@@ -890,7 +890,7 @@ int zd_chip_lock_phy_regs(struct zd_chip *chip);
+ int zd_chip_unlock_phy_regs(struct zd_chip *chip);
+
+ enum led_status {
+- LED_OFF = 0,
++ LED_OFF_ZD = 0,
+ LED_SCANNING = 1,
+ LED_ASSOCIATED = 2,
+ };
+--- a/drivers/net/wireless/zd1211rw/zd_mac.c 2008-02-15 16:29:43.000000000 -0500
++++ b/drivers/net/wireless/zd1211rw/zd_mac.c 2008-02-15 16:29:43.000000000 -0500
+@@ -965,5 +965,5 @@ static void housekeeping_disable(struct zd_mac *mac)
+ dev_dbg_f(zd_mac_dev(mac), "\n");
+ cancel_rearming_delayed_workqueue(zd_workqueue,
+ &mac->housekeeping.link_led_work);
+- zd_chip_control_leds(&mac->chip, LED_OFF);
++ zd_chip_control_leds(&mac->chip, LED_OFF_ZD);
+ }
diff --git a/compat/compat.h b/compat/compat.h
index b438a5a..a25192d 100644
--- a/compat/compat.h
+++ b/compat/compat.h
@@ -10,6 +10,8 @@
#include <linux/scatterlist.h>
#include <linux/usb.h>
#include <linux/compat_autoconf.h>
+#include <linux/hw_random.h>
+#include <linux/leds.h>
/* Compat work for 2.6.22 and 2.6.23 */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
@@ -17,7 +19,7 @@
/* From include/linux/mod_devicetable.h */
/* SSB core, see drivers/ssb/ */
-#ifndef CONFIG_SSB
+#ifndef SSB_DEVICE
struct ssb_device_id {
__u16 vendor;
__u16 coreid;
@@ -190,4 +192,20 @@ static inline void set_freezable(void) {}
#endif /* CONFIG_PM_SLEEP */
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) */
+
+/* Compat work for 2.6.24 */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+
+static inline void __hwrng_unregister(struct hwrng *rng, bool suspended)
+{
+ hwrng_unregister(rng);
+}
+
+static inline void led_classdev_unregister_suspended(struct led_classdev *lcd)
+{
+ led_classdev_unregister(lcd);
+}
+
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) */
#endif /* LINUX_26_COMPAT_H */
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 5f6e9e1..147a01e 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -18,7 +18,7 @@
GIT_URL="git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git"
INCLUDE_LINUX="ieee80211.h nl80211.h wireless.h"
-INCLUDE_LINUX="$INCLUDE_LINUX pci_ids.h bitops.h eeprom_93cx6.h"
+INCLUDE_LINUX="$INCLUDE_LINUX pci_ids.h bitops.h eeprom_93cx6.h pm_qos_params.h"
# For rndis_wext
INCLUDE_LINUX_USB="usbnet.h rndis_host.h"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 890 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: Patch for compat-wireless-2.6
2008-02-16 15:12 Patch for compat-wireless-2.6 Hauke Mehrtens
@ 2008-02-19 23:35 ` Luis R. Rodriguez
2008-02-20 14:01 ` Daniel Drake
0 siblings, 1 reply; 3+ messages in thread
From: Luis R. Rodriguez @ 2008-02-19 23:35 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: linux-wireless, Daniel Drake
On Feb 16, 2008 10:12 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> Hi
>
> This patch fixes some compile errors in the newest version of
> compat-wireless-2.6. I have tested it with kernel 2.6.24 and 2.6.22
Thanks for the patch! Going to paste the patch below as if sent inline
and address some things:
> diff --git a/compat/compat.diff b/compat/compat.diff
> index c857ea2..49325b5 100644
> --- a/compat/compat.diff
> +++ b/compat/compat.diff
> @@ -633,3 +633,34 @@
> obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
> -obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
> -obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
> +--- a/drivers/net/wireless/zd1211rw/zd_chip.c 2008-02-15 16:29:43.000000000 -0500
> ++++ b/drivers/net/wireless/zd1211rw/zd_chip.c 2008-02-15 16:29:43.000000000 -0500
> +@@ -1280,7 +1280,7 @@ int zd_chip_control_leds(struct zd_chip *chip, enum led_status status)
> + other_led = chip->link_led == LED1 ? LED2 : LED1;
> +
> + switch (status) {
> +- case LED_OFF:
> ++ case LED_OFF_ZD:
> + ioreqs[0].value = FW_LINK_OFF;
> + ioreqs[1].value = v[1] & ~(LED1|LED2);
> + break;
> +--- a/drivers/net/wireless/zd1211rw/zd_chip.h 2008-02-15 16:29:43.000000000 -0500
> ++++ b/drivers/net/wireless/zd1211rw/zd_chip.h 2008-02-15 16:29:43.000000000 -0500
> +@@ -890,7 +890,7 @@ int zd_chip_lock_phy_regs(struct zd_chip *chip);
> + int zd_chip_unlock_phy_regs(struct zd_chip *chip);
> +
> + enum led_status {
> +- LED_OFF = 0,
> ++ LED_OFF_ZD = 0,
> + LED_SCANNING = 1,
> + LED_ASSOCIATED = 2,
> + };
> +--- a/drivers/net/wireless/zd1211rw/zd_mac.c 2008-02-15 16:29:43.000000000 -0500
> ++++ b/drivers/net/wireless/zd1211rw/zd_mac.c 2008-02-15 16:29:43.000000000 -0500
> +@@ -965,5 +965,5 @@ static void housekeeping_disable(struct zd_mac *mac)
> + dev_dbg_f(zd_mac_dev(mac), "\n");
> + cancel_rearming_delayed_workqueue(zd_workqueue,
> + &mac->housekeeping.link_led_work);
> +- zd_chip_control_leds(&mac->chip, LED_OFF);
> ++ zd_chip_control_leds(&mac->chip, LED_OFF_ZD);
> + }
This could possibly go upstream so we don't have to keep an extra
patch around. Up to zd guys though. If not we'll have to keep updating
this hunk as the driver changes. Not a big issue. This is just so we
can keep including from compat.h leds.h which has its own definition
of LEDS_OFF.
> diff --git a/compat/compat.h b/compat/compat.h
> index b438a5a..a25192d 100644
> --- a/compat/compat.h
> +++ b/compat/compat.h
> @@ -10,6 +10,8 @@
> #include <linux/scatterlist.h>
> #include <linux/usb.h>
> #include <linux/compat_autoconf.h>
> +#include <linux/hw_random.h>
> +#include <linux/leds.h>
b43 now can get leds support, will enable that, thanks.
> /* Compat work for 2.6.22 and 2.6.23 */
> #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
> @@ -17,7 +19,7 @@
> /* From include/linux/mod_devicetable.h */
>
> /* SSB core, see drivers/ssb/ */
> -#ifndef CONFIG_SSB
> +#ifndef SSB_DEVICE
> struct ssb_device_id {
> __u16 vendor;
> __u16 coreid;
> @@ -190,4 +192,20 @@ static inline void set_freezable(void) {}
> #endif /* CONFIG_PM_SLEEP */
>
> #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) */
> +
> +/* Compat work for 2.6.24 */
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
> +
> +static inline void __hwrng_unregister(struct hwrng *rng, bool suspended)
> +{
> + hwrng_unregister(rng);
> +}
> +
> +static inline void led_classdev_unregister_suspended(struct led_classdev *lcd)
> +{
> + led_classdev_unregister(lcd);
> +}
> +
> +
> +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) */
> #endif /* LINUX_26_COMPAT_H */
> diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
> index 5f6e9e1..147a01e 100755
> --- a/scripts/admin-update.sh
> +++ b/scripts/admin-update.sh
> @@ -18,7 +18,7 @@
> GIT_URL="git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git"
>
> INCLUDE_LINUX="ieee80211.h nl80211.h wireless.h"
> -INCLUDE_LINUX="$INCLUDE_LINUX pci_ids.h bitops.h eeprom_93cx6.h"
> +INCLUDE_LINUX="$INCLUDE_LINUX pci_ids.h bitops.h eeprom_93cx6.h pm_qos_params.h"
pm_qos_params.h requires porting (work is in kernel/pm_qos_params.c)
for kernels <= 2.6.24 but I've gone ahead and added this work to
compat.c ontop of your patch.
Changes pushed, and new tarball re-generated. Also minor note, I've
enabled PID rate control algorithm as the default rate control
algorithm as 'simple' is scheduled for removal for 2.6.26. Please let
me know if you have any issues.
Luis
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Patch for compat-wireless-2.6
2008-02-19 23:35 ` Luis R. Rodriguez
@ 2008-02-20 14:01 ` Daniel Drake
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Drake @ 2008-02-20 14:01 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Hauke Mehrtens, linux-wireless
Luis R. Rodriguez wrote:
>> +--- a/drivers/net/wireless/zd1211rw/zd_chip.h 2008-02-15 16:29:43.000000000 -0500
>> ++++ b/drivers/net/wireless/zd1211rw/zd_chip.h 2008-02-15 16:29:43.000000000 -0500
>> +@@ -890,7 +890,7 @@ int zd_chip_lock_phy_regs(struct zd_chip *chip);
>> + int zd_chip_unlock_phy_regs(struct zd_chip *chip);
>> +
>> + enum led_status {
>> +- LED_OFF = 0,
>> ++ LED_OFF_ZD = 0,
>> + LED_SCANNING = 1,
>> + LED_ASSOCIATED = 2,
>> + };
>
> This could possibly go upstream so we don't have to keep an extra
> patch around. Up to zd guys though. If not we'll have to keep updating
> this hunk as the driver changes. Not a big issue. This is just so we
> can keep including from compat.h leds.h which has its own definition
> of LEDS_OFF.
Feel free to submit a patch adding a ZD_ prefix to all the enum members.
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-20 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 15:12 Patch for compat-wireless-2.6 Hauke Mehrtens
2008-02-19 23:35 ` Luis R. Rodriguez
2008-02-20 14:01 ` Daniel Drake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).