* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Kahn, Gery @ 2010-12-22 15:39 UTC (permalink / raw)
To: Elvis Dowson; +Cc: Linux Wireless Mailing List
In-Reply-To: <F4DFEC94-D5AC-4C12-890D-8F242E757071@mac.com>
On Wed, Dec 22, 2010 at 13:30, Elvis Dowson <elvis.dowson@mac.com> wrote:
Hi,
I have a quick question.
I downloaded the
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.37/compat-wireless-2.6.37-rc6-3.tar.bz2
The information contained in this link mentions:
http://linuxwireless.org/en/users/Download/stable/
"You need kernel headers to compile compat-wireless. Ensure
/lib/modules/$(uname -r)/build/ exists and points to the location
where the kernel headers are installed. If you do not have them, read
your distribution's documentation on getting help."
I have Ubuntu 10.04 as host, but I'm using a cross compiler for
the OMAP3530 ARM target, and the kernel directory exists in a separate
folder.
How do I tell the build system to use my cross compiled kernel
libraries and headers, and not pick up the host /lib/modules kernel
headers?
export CROSS_COMPILE=arm-none-linux-gnueabi-
May be also
export ARCH=arm
i.e. how can I cross compile and build compat-wireless for the ARM
target on the host machine?
cd /path/to/compat-wireless-2.6.32-rc5
copy appropriate configuration file to /path/to/compat-wireless-2.6.
32-rc5/.config
May also need to add configuration
./scripts/driver-select <driver-name>
make
sudo make install
It may be works without `sudo '. If you want all modules also
make modules_install INSTALL_MOD_PATH=${NFSROOT}
where NFSROOT is your directory to prepare filesystem for target
Best regards,
Elvis Dowson
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Gery
^ permalink raw reply
* [PATCH v3 1/2] ath9k_hw: Fix incorrect macversion and macrev checks
From: Senthil Balasubramanian @ 2010-12-22 15:44 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Senthil Balasubramanian, Stable Kernel
There are few places where we are checking for macversion and revsions
before RTC is powered ON. However we are reading the macversion and
revisions only after RTC is powered ON and so both macversion and
revisions are actully zero and this leads to incorrect srev checks
Incorrect srev checks can cause registers to be configured wrongly and can
cause unexpected behavior. Fixing this seems to address the ASPM issue that
we have observed. The laptop becomes very slow and hangs mostly with ASPM L1
enabled without this fix.
fix this by reading the macversion and revisisons even before we start
using them. There is no reason why should we delay reading this info
until RTC is powered on as this is just a register information.
Cc: Stable Kernel <stable@kernel.org>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
v2 -- fixed reading revisions unnecessarily during every reset.
v3 -- added more information to the commit log.
drivers/net/wireless/ath/ath9k/hw.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 4b51ed4..0a0ba80 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -491,6 +491,8 @@ static int __ath9k_hw_init(struct ath_hw *ah)
if (ah->hw_version.devid == AR5416_AR9100_DEVID)
ah->hw_version.macVersion = AR_SREV_VERSION_9100;
+ ath9k_hw_read_revisions(ah);
+
if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
ath_err(common, "Couldn't reset chip\n");
return -EIO;
@@ -1078,8 +1080,6 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah)
return false;
}
- ath9k_hw_read_revisions(ah);
-
return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM);
}
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH v3 1/2] ath9k_hw: Fix incorrect macversion and macrev checks
From: Luis R. Rodriguez @ 2010-12-22 15:52 UTC (permalink / raw)
To: Senthil Balasubramanian; +Cc: linville, linux-wireless, Stable Kernel
In-Reply-To: <1293032660-3627-1-git-send-email-senthilkumar@atheros.com>
On Wed, Dec 22, 2010 at 10:44 AM, Senthil Balasubramanian
<senthilkumar@atheros.com> wrote:
> There are few places where we are checking for macversion and revsions
> before RTC is powered ON. However we are reading the macversion and
> revisions only after RTC is powered ON and so both macversion and
> revisions are actully zero and this leads to incorrect srev checks
>
> Incorrect srev checks can cause registers to be configured wrongly and can
> cause unexpected behavior. Fixing this seems to address the ASPM issue that
> we have observed. The laptop becomes very slow and hangs mostly with ASPM L1
> enabled without this fix.
On what chipset? Or did we see this on one chipset and suspect it can
affect others?
Luis
^ permalink raw reply
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Elvis Dowson @ 2010-12-22 16:09 UTC (permalink / raw)
To: Kahn, Gery, Oz Krakowski; +Cc: Linux Wireless Mailing List
In-Reply-To: <AANLkTi=owvDyO3qfahUwRv4MxJrvMK9hjh5NOwRHQuO+@mail.gmail.com>
Hi,
I set the following values in my .bashrc file
#
# Environment setup for u-boot and linux kernel
#
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
export CROSSCOMPILER=armv7a
export CROSSTOOLCHAIN=${OVEROTOP}/tmp/sysroots/x86_64-linux/usr/${CROSSCOMPILER}
export KERNEL_DIR="/tool/patches/android-rowboat-2.6.32-kernel-patchwork"
export UIMAGE_DIR="${KERNEL_DIR}/arch/arm/boot"
export KLIB="${KERNEL_DIR}"
export KLIB_BUILD="${KERNEL_DIR}"
I selected the wl12xx driver
$ cd /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork
$ ./scripts/driver-select wl12xx
then I try to build it, but it gives me the following error:
$ make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /tool/patches/android-rowboat-2.6.32-kernel-patchwork M=/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork modules
make[1]: Entering directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/main.o
In file included from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.h:28,
from <command-line>:0:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.33.h:56:1: warning: "NETDEV_POST_INIT" redefined
In file included from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:653,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from include/linux/textsearch.h:7,
from include/linux/skbuff.h:27,
from include/linux/if_ether.h:124,
from include/linux/netdevice.h:29,
from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.29.h:5,
from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.h:24,
from <command-line>:0:
include/linux/notifier.h:204:1: warning: this is the location of the previous definition
In file included from /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.h:28,
from <command-line>:0:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/include/linux/compat-2.6.33.h:58: error: redefinition of ‘netdev_alloc_skb_ip_align’
include/linux/skbuff.h:1487: error: previous definition of ‘netdev_alloc_skb_ip_align’ was here
make[3]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat/main.o] Error 1
make[2]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/compat] Error 2
make[1]: *** [_module_/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork] Error 2
make[1]: Leaving directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'
make: *** [modules] Error 2
Best regards,
Elvis
^ permalink raw reply
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Luis R. Rodriguez @ 2010-12-22 16:13 UTC (permalink / raw)
To: Elvis Dowson; +Cc: Kahn, Gery, Oz Krakowski, Linux Wireless Mailing List
In-Reply-To: <7F14B85B-566C-45A9-BF8B-FE9DED7944D0@mac.com>
On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
> netdev_alloc_skb_ip_align
I notice you have an android kernel, is that kernel a vanilla kernel
or did it get netdev_alloc_skb_ip_align() cherry picked into it?
Luis
^ permalink raw reply
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Hauke Mehrtens @ 2010-12-22 16:47 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Elvis Dowson, Kahn, Gery, Oz Krakowski,
Linux Wireless Mailing List
In-Reply-To: <AANLkTik7jvW9pA3deanBRXxJh6tLeO7WQgqrkN3xa9LG@mail.gmail.com>
On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
>> netdev_alloc_skb_ip_align
>
> I notice you have an android kernel, is that kernel a vanilla kernel
> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>
> Luis
netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
kernel. Someone else (google or ti) must have backported it to this
kernel and added it to your kernel.
I do not want to add some special handling into compat-wireless just for
some android kernel. Just remove netdev_alloc_skb_ip_align() and
NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
problems you posted should be fixed.
Hauke
^ permalink raw reply
* [PATCH] rtlwifi: Fix large packet issue
From: Larry Finger @ 2010-12-22 16:56 UTC (permalink / raw)
To: John W Linville; +Cc: chaoming_li, linux-wireless
From: Chaoming Li <chaoming_li@realsil.com.cn>
An RX buffer is set to 9100 bytes to receive 8K AMSDU; however, an skb
of this size fails in the kernel.
Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
John,
This fix should be in 2.6.38.
Larry
---
Index: wireless-testing/drivers/net/wireless/rtlwifi/pci.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtlwifi/pci.c
+++ wireless-testing/drivers/net/wireless/rtlwifi/pci.c
@@ -612,10 +612,22 @@ static void _rtl_pci_rx_interrupt(struct
num_rx_inperiod++;
}
- if (unlikely(!rtl_action_proc(hw, skb, false)))
+ if (unlikely(!rtl_action_proc(hw, skb,
+ false))) {
dev_kfree_skb_any(skb);
- else
- ieee80211_rx_irqsafe(hw, skb);
+ } else {
+ struct sk_buff *uskb = NULL;
+ u8 *pdata;
+ uskb = dev_alloc_skb(skb->len + 128);
+ memcpy(IEEE80211_SKB_RXCB(uskb),
+ &rx_status,
+ sizeof(rx_status));
+ pdata = (u8 *)skb_put(uskb, skb->len);
+ memcpy(pdata, skb->data, skb->len);
+ dev_kfree_skb_any(skb);
+
+ ieee80211_rx_irqsafe(hw, uskb);
+ }
} else {
dev_kfree_skb_any(skb);
}
^ permalink raw reply
* Re: [PATCH] iwlagn: fix scan tx antenna setting on 5Ghz band
From: Guy, Wey-Yi @ 2010-12-22 16:57 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Intel Linux Wireless, Johannes Berg,
linux-wireless@vger.kernel.org
In-Reply-To: <20101222131515.GA2242@redhat.com>
Stanislaw,
On Wed, 2010-12-22 at 05:15 -0800, Stanislaw Gruszka wrote:
> Hi Wey
>
> > > > If its is 2.4, we need to use the correct tx antenna, I think we can
> > > > remove this block of code all together since check already done above.
> > > >
> > > > if (priv->cfg->scan_tx_antennas[band])
> > > > scan_tx_antennas = priv->cfg->scan_tx_antennas[band];
> > >
> > > Is correct to use all antennas on 5GHz when blutooth is enabled?
> > > For me, more logical would be limiting to one antenna no matter of band,
> > > since antennas are used anyway, only frequencies differ.
> > >
> > > For rx_ant, we do not check the band, only limit to first one
> > > when bluetooth is used.
> >
> > there is no BT coex if 5GHz is used because there is not interference
> > between 2.4 and 5GHz, so both antenna can be used. WiFi should operated
> > in normal condition.
> >
> > For 2.4GHz, we also can use both antenna if there is not high traffic
> > load on BT side.
> >
> > but you have a good catch, driver need to check band before use it
> > (scan_tx_antenna[band])
>
> So how about this patch (rfc only):
>
> From 26d0570ed5cd85097702d0fedb2c3f831dce9714 Mon Sep 17 00:00:00 2001
> From: Stanislaw Gruszka <sgruszka@redhat.com>
> Date: Wed, 22 Dec 2010 13:03:31 +0100
> Subject: [RFC PATCH] iwlagn: fix scan tx antenna setting on 5Ghz band
>
> Looks that we do not set correctly antennas when scanning
> on 5Ghz band and when bluetooth is enabled, because
> priv->cfg->scan_tx_antennas[band] is only defined for
> IEEE80211_BAND_2GHZ.
>
> To fix we check band before limiting antennas to first one.
> This allow to remove hard coded cfg->scan_tx_antennas[band].
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-6000.c | 7 +------
> drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 9 +++------
> drivers/net/wireless/iwlwifi/iwl-core.h | 1 -
> 3 files changed, 4 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
> index f4bec32..af505bc 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-6000.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
> @@ -596,12 +596,7 @@ struct iwl_cfg iwl6005_2bg_cfg = {
> .need_dc_calib = true, \
> .need_temp_offset_calib = true, \
> .led_mode = IWL_LED_RF_STATE, \
> - .adv_pm = true, \
> - /* \
> - *Due to bluetooth, we transmit 2.4 GHz probes \
> - * only on antenna A \
> - */ \
> - .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A
> + .adv_pm = true \
>
> struct iwl_cfg iwl6030_2agn_cfg = {
> .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> index 4bc82fc..322a2bd 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
> @@ -1492,15 +1492,12 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
> if (priv->cfg->scan_rx_antennas[band])
> rx_ant = priv->cfg->scan_rx_antennas[band];
>
> - if (priv->cfg->scan_tx_antennas[band])
> - scan_tx_antennas = priv->cfg->scan_tx_antennas[band];
> -
> - if (priv->cfg->bt_params &&
> + if (band == IEEE80211_BAND_2GHZ &&
> + priv->cfg->bt_params &&
> priv->cfg->bt_params->advanced_bt_coexist &&
> priv->bt_full_concurrent) {
> /* operated as 1x1 in full concurrency mode */
> - scan_tx_antennas = first_antenna(
> - priv->cfg->scan_tx_antennas[band]);
> + scan_tx_antennas = first_antenna(scan_tx_antennas);
> }
Please remove the checking for priv->bt_full_concurrent, so the checking
will apply to all scan request if BT coex is there.
otherwise, the patch looks ok
thanks
Wey
^ permalink raw reply
* Re: [PATCH] iwlagn: only enable rfkill interrupt when device is down
From: Guy, Wey-Yi @ 2010-12-22 17:08 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Intel Linux Wireless, Helmut Schaa,
linux-wireless@vger.kernel.org, stable@kernel.org
In-Reply-To: <1293022913-4692-1-git-send-email-sgruszka@redhat.com>
On Wed, 2010-12-22 at 05:01 -0800, Stanislaw Gruszka wrote:
> Since commit 6cd0b1cb872b3bf9fc5de4536404206ab74bafdd "iwlagn: fix
> hw-rfkill while the interface is down", we enable interrupts when
> device is not ready to receive them. However hardware, when it is in
> some inconsistent state, can generate other than rfkill interrupts
> and crash the system. I can reproduce crash with "kernel BUG at
> drivers/net/wireless/iwlwifi/iwl-agn.c:1010!" message, when forcing
> firmware restarts.
>
> To fix only enable rfkill interrupt when down device and after probe.
> I checked patch on laptop with 5100 device, rfkill change is still
> passed to user space when device is down.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> Cc: stable@kernel.org
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
^ permalink raw reply
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Luis R. Rodriguez @ 2010-12-22 17:21 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: Elvis Dowson, Kahn, Gery, Oz Krakowski,
Linux Wireless Mailing List
In-Reply-To: <4D122B8F.5090302@hauke-m.de>
On Wed, Dec 22, 2010 at 11:47 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
>>> netdev_alloc_skb_ip_align
>>
>> I notice you have an android kernel, is that kernel a vanilla kernel
>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>>
>> Luis
>
> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
> kernel. Someone else (google or ti) must have backported it to this
> kernel and added it to your kernel.
>
> I do not want to add some special handling into compat-wireless just for
> some android kernel. Just remove netdev_alloc_skb_ip_align() and
> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
> problems you posted should be fixed.
Well we did something to accommodate RHEL, I wouldn't mind supporting
some fudge for Android so long as someone is willing to submit the
patch and identify the kernel properly. Android is popular enough and
I rather reduce the time it takes to use it there than to create an
extra hurdle.
Luis
^ permalink raw reply
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Luis R. Rodriguez @ 2010-12-22 17:22 UTC (permalink / raw)
To: Hauke Mehrtens, John W. Linville
Cc: Elvis Dowson, Kahn, Gery, Oz Krakowski,
Linux Wireless Mailing List
In-Reply-To: <AANLkTimRrX1HCmz2EnsA-4=ZBLUJ-86O-bpGgjEw4Lbw@mail.gmail.com>
On Wed, Dec 22, 2010 at 12:21 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Wed, Dec 22, 2010 at 11:47 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
>>>> netdev_alloc_skb_ip_align
>>>
>>> I notice you have an android kernel, is that kernel a vanilla kernel
>>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>>>
>>> Luis
>>
>> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
>> kernel. Someone else (google or ti) must have backported it to this
>> kernel and added it to your kernel.
>>
>> I do not want to add some special handling into compat-wireless just for
>> some android kernel. Just remove netdev_alloc_skb_ip_align() and
>> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
>> problems you posted should be fixed.
>
> Well we did something to accommodate RHEL, I wouldn't mind supporting
> some fudge for Android so long as someone is willing to submit the
> patch and identify the kernel properly. Android is popular enough and
> I rather reduce the time it takes to use it there than to create an
> extra hurdle.
Now that I think about it I don't think John ever respinned his
patches for compat-wireless for RHEL.
Luis
^ permalink raw reply
* Re: [PATCH] iwlagn: only enable rfkill interrupt when device is down
From: Johannes Berg @ 2010-12-22 17:27 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Wey-Yi Guy, Intel Linux Wireless, Helmut Schaa, linux-wireless,
stable
In-Reply-To: <1293022913-4692-1-git-send-email-sgruszka@redhat.com>
On Wed, 2010-12-22 at 14:01 +0100, Stanislaw Gruszka wrote:
> Since commit 6cd0b1cb872b3bf9fc5de4536404206ab74bafdd "iwlagn: fix
> hw-rfkill while the interface is down", we enable interrupts when
> device is not ready to receive them. However hardware, when it is in
> some inconsistent state, can generate other than rfkill interrupts
> and crash the system. I can reproduce crash with "kernel BUG at
> drivers/net/wireless/iwlwifi/iwl-agn.c:1010!" message, when forcing
> firmware restarts.
>
> To fix only enable rfkill interrupt when down device and after probe.
> I checked patch on laptop with 5100 device, rfkill change is still
> passed to user space when device is down.
Should the subject say "enable only rfkill interrupt when device is
down" instead? As it is, to me it reads like rfkill interrupt would be
disabled while up, which can't be right?
johannes
^ permalink raw reply
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Elvis Dowson @ 2010-12-22 17:29 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: Luis R. Rodriguez, Kahn, Gery, Oz Krakowski,
Linux Wireless Mailing List
In-Reply-To: <4D122B8F.5090302@hauke-m.de>
Hi,
On Dec 22, 2010, at 8:47 PM, Hauke Mehrtens wrote:
> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
>>> netdev_alloc_skb_ip_align
>>
>> I notice you have an android kernel, is that kernel a vanilla kernel
>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
Yes, it is an android enabled 2.6.32 kernel. It also includes the TI
OMAP35xx/AM35xx platform support package SDK v03.00.01.06/
> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
> kernel. Someone else (google or ti) must have backported it to this
> kernel and added it to your kernel.
>
> I do not want to add some special handling into compat-wireless just for
> some android kernel. Just remove netdev_alloc_skb_ip_align() and
> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
> problems you posted should be fixed.
I made the following modifications, but get another error:
diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
index c2dbc1b..468a074 100644
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -52,19 +52,6 @@ static inline void compat_release_firmware(const struct firmware *fw)
#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
/* source: include/linux/if.h */
-/* this will never happen on older kernels */
-#define NETDEV_POST_INIT 0xffff
-
-static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
- unsigned int length)
-{
- struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
-
- if (NET_IP_ALIGN && skb)
- skb_reserve(skb, NET_IP_ALIGN);
- return skb;
-}
-
#if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ‘ieee80211_led_init’:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:59: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:63: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:64: error: implicit declaration of function ‘led_trigger_register’
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:70: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:74: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:81: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:85: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:92: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:96: error: dereferencing pointer to incomplete type
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ‘ieee80211_led_exit’:
/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:107: error: implicit declaration of function ‘led_trigger_unregister’
make[3]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o] Error 1
make[2]: *** [/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211] Error 2
make[1]: *** [_module_/tool/patches/compat-wireless-2.6.37-rc6-3-patchwork] Error 2
make[1]: Leaving directory `/tool/patches/android-rowboat-2.6.32-kernel-patchwork'
make: *** [modules] Error 2
Elvis Dowson
^ permalink raw reply related
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Luis R. Rodriguez @ 2010-12-22 17:39 UTC (permalink / raw)
To: Elvis Dowson
Cc: Hauke Mehrtens, Kahn, Gery, Oz Krakowski,
Linux Wireless Mailing List
In-Reply-To: <1813D0B1-5391-48DB-9882-A6586DAB180C@mac.com>
On Wed, Dec 22, 2010 at 12:29 PM, Elvis Dowson <elvis.dowson@mac.com> wrote:
> Hi,
>
> On Dec 22, 2010, at 8:47 PM, Hauke Mehrtens wrote:
>
>> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
>>>> netdev_alloc_skb_ip_align
>>>
>>> I notice you have an android kernel, is that kernel a vanilla kernel
>>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>
>
> Yes, it is an android enabled 2.6.32 kernel. It also includes the TI
> OMAP35xx/AM35xx platform support package SDK v03.00.01.06/
>
>
>> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
>> kernel. Someone else (google or ti) must have backported it to this
>> kernel and added it to your kernel.
>>
>> I do not want to add some special handling into compat-wireless just for
>> some android kernel. Just remove netdev_alloc_skb_ip_align() and
>> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
>> problems you posted should be fixed.
>
> I made the following modifications, but get another error:
>
> diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
> index c2dbc1b..468a074 100644
> --- a/include/linux/compat-2.6.33.h
> +++ b/include/linux/compat-2.6.33.h
> @@ -52,19 +52,6 @@ static inline void compat_release_firmware(const struct firmware *fw)
> #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
> /* source: include/linux/if.h */
>
> -/* this will never happen on older kernels */
> -#define NETDEV_POST_INIT 0xffff
> -
> -static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
> - unsigned int length)
> -{
> - struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
> -
> - if (NET_IP_ALIGN && skb)
> - skb_reserve(skb, NET_IP_ALIGN);
> - return skb;
> -}
> -
> #if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
>
> #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
I'd rather you figure out a way to identify that android kernel
somehow reliably and send a patch upstream to ifdef out
netdev_alloc_skb_ip_align() for that kernel, that way other Android
hackers can benefit.
> CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o
> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ‘ieee80211_led_init’:
> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:59: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’
This is from:
void ieee80211_led_init(struct ieee80211_local *local)
{
local->rx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
...
}
Looks good to me.. Not sure what can cause this, hrm.
Luis
^ permalink raw reply
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: John W. Linville @ 2010-12-22 17:32 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Hauke Mehrtens, Elvis Dowson, Kahn, Gery, Oz Krakowski,
Linux Wireless Mailing List
In-Reply-To: <AANLkTi=dz1eS9fdyQiZ_P41sL77HQJzCuMVKgW36JcTx@mail.gmail.com>
On Wed, Dec 22, 2010 at 12:22:21PM -0500, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 12:21 PM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> > On Wed, Dec 22, 2010 at 11:47 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
> >>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
> >>>> netdev_alloc_skb_ip_align
> >>>
> >>> I notice you have an android kernel, is that kernel a vanilla kernel
> >>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
> >>>
> >>> Luis
> >>
> >> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
> >> kernel. Someone else (google or ti) must have backported it to this
> >> kernel and added it to your kernel.
> >>
> >> I do not want to add some special handling into compat-wireless just for
> >> some android kernel. Just remove netdev_alloc_skb_ip_align() and
> >> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
> >> problems you posted should be fixed.
> >
> > Well we did something to accommodate RHEL, I wouldn't mind supporting
> > some fudge for Android so long as someone is willing to submit the
> > patch and identify the kernel properly. Android is popular enough and
> > I rather reduce the time it takes to use it there than to create an
> > extra hurdle.
>
> Now that I think about it I don't think John ever respinned his
> patches for compat-wireless for RHEL.
No, I didn't. Johannes wanted some sort of API level indicator instead
of checking for RHEL kernels, but I have no idea how to implement that.
FWIW, I'd rather you just take the patches I submitted and any
similar patches for other Enterprise-y distros (including Android).
But if someone else can demonstrate a workable, better alternative
then I will try to comply.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* [PATCH] compat-wireless: build led support conditionally
From: Hauke Mehrtens @ 2010-12-22 18:10 UTC (permalink / raw)
To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
Do not build compat-wireless with LED support when the kernel does not
contain a led subsystem.
This fixes some compile problems when CONFIG_LEDS_TRIGGERS is not set.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
config.mk | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/config.mk b/config.mk
index 964c646..1f95908 100644
--- a/config.mk
+++ b/config.mk
@@ -133,7 +133,9 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
CONFIG_MAC80211_RC_PID=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
+ifdef CONFIG_LEDS_TRIGGERS
CONFIG_MAC80211_LEDS=y
+endif #CONFIG_LEDS_TRIGGERS
# enable mesh networking too
CONFIG_MAC80211_MESH=y
@@ -243,7 +245,9 @@ CONFIG_B43_PCI_AUTOSELECT=y
ifdef CONFIG_PCMCIA
CONFIG_B43_PCMCIA=y
endif #CONFIG_PCMCIA
+ifdef CONFIG_MAC80211_LEDS
CONFIG_B43_LEDS=y
+endif #CONFIG_MAC80211_LEDS
CONFIG_B43_PHY_LP=y
CONFIG_B43_PHY_N=y
# CONFIG_B43_FORCE_PIO=y
@@ -252,7 +256,9 @@ CONFIG_B43_PHY_N=y
CONFIG_B43LEGACY=m
CONFIG_B43LEGACY_HWRNG=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
+ifdef CONFIG_MAC80211_LEDS
CONFIG_B43LEGACY_LEDS=y
+endif #CONFIG_MAC80211_LEDS
# CONFIG_B43LEGACY_DEBUG=y
CONFIG_B43LEGACY_DMA=y
CONFIG_B43LEGACY_PIO=y
@@ -408,18 +414,24 @@ endif #CONFIG_COMPAT_KERNEL_29
CONFIG_P54_USB=m
CONFIG_RTL8187=m
+ifdef CONFIG_MAC80211_LEDS
CONFIG_RTL8187_LEDS=y
+endif #CONFIG_MAC80211_LEDS
CONFIG_AT76C50X_USB=m
ifndef CONFIG_COMPAT_KERNEL_28
CONFIG_AR9170_USB=m
+ifdef CONFIG_MAC80211_LEDS
CONFIG_AR9170_LEDS=y
+endif #CONFIG_MAC80211_LEDS
endif #CONFIG_COMPAT_KERNEL_28
ifndef CONFIG_COMPAT_KERNEL_29
CONFIG_CARL9170=m
+ifdef CONFIG_MAC80211_LEDS
CONFIG_CARL9170_LEDS=y
+endif #CONFIG_MAC80211_LEDS
# CONFIG_CARL9170_DEBUGFS=y
# CONFIG_CARL9170_WPC=y
endif #CONFIG_COMPAT_KERNEL_29
@@ -559,7 +571,9 @@ CONFIG_RT2X00_LIB_CRYPTO=y
ifdef CONFIG_COMPAT_KERNEL_25
CONFIG_RT2X00_LIB_LEDS=n
else #CONFIG_COMPAT_KERNEL_25
+ifdef CONFIG_LEDS_CLASS
CONFIG_RT2X00_LIB_LEDS=y
+endif #CONFIG_LEDS_CLASS
endif #CONFIG_COMPAT_KERNEL_25
# CONFIG_RT2X00_DEBUG=y
# CONFIG_RT2X00_LIB_DEBUGFS
@@ -567,7 +581,9 @@ endif
# p54
CONFIG_P54_COMMON=m
+ifdef CONFIG_MAC80211_LEDS
CONFIG_P54_LEDS=y
+endif #CONFIG_MAC80211_LEDS
# Atheros
CONFIG_ATH_COMMON=m
@@ -594,7 +610,9 @@ endif #CONFIG_COMPAT_KERNEL_27
# In more recent kernel versions use the in kernel rfkill module.
ifdef CONFIG_COMPAT_KERNEL_31
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
--
1.7.1
^ permalink raw reply related
* Re: Backporting wl1271 driver to kernel-2.6.32 using compat-wireless
From: Hauke Mehrtens @ 2010-12-22 18:13 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Elvis Dowson, Kahn, Gery, Oz Krakowski,
Linux Wireless Mailing List
In-Reply-To: <AANLkTimMWH63yG2tdu7OHemHs=6OOy_i5fpeEDhhh6O9@mail.gmail.com>
On 12/22/2010 06:39 PM, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 12:29 PM, Elvis Dowson <elvis.dowson@mac.com> wrote:
>> Hi,
>>
>> On Dec 22, 2010, at 8:47 PM, Hauke Mehrtens wrote:
>>
>>> On 12/22/2010 05:13 PM, Luis R. Rodriguez wrote:
>>>> On Wed, Dec 22, 2010 at 11:09 AM, Elvis Dowson <elvis.dowson@mac.com> wrote:
>>>>> netdev_alloc_skb_ip_align
>>>>
>>>> I notice you have an android kernel, is that kernel a vanilla kernel
>>>> or did it get netdev_alloc_skb_ip_align() cherry picked into it?
>>
>>
>> Yes, it is an android enabled 2.6.32 kernel. It also includes the TI
>> OMAP35xx/AM35xx platform support package SDK v03.00.01.06/
>>
>>
>>> netdev_alloc_skb_ip_align is not defined in the 2.6.32.27 vanilla
>>> kernel. Someone else (google or ti) must have backported it to this
>>> kernel and added it to your kernel.
>>>
>>> I do not want to add some special handling into compat-wireless just for
>>> some android kernel. Just remove netdev_alloc_skb_ip_align() and
>>> NETDEV_POST_INIT from include/linux/compat-2.6.33.h and the compile
>>> problems you posted should be fixed.
>>
>> I made the following modifications, but get another error:
>>
>> diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
>> index c2dbc1b..468a074 100644
>> --- a/include/linux/compat-2.6.33.h
>> +++ b/include/linux/compat-2.6.33.h
>> @@ -52,19 +52,6 @@ static inline void compat_release_firmware(const struct firmware *fw)
>> #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
>> /* source: include/linux/if.h */
>>
>> -/* this will never happen on older kernels */
>> -#define NETDEV_POST_INIT 0xffff
>> -
>> -static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
>> - unsigned int length)
>> -{
>> - struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
>> -
>> - if (NET_IP_ALIGN && skb)
>> - skb_reserve(skb, NET_IP_ALIGN);
>> - return skb;
>> -}
>> -
>> #if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
>>
>> #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
>
> I'd rather you figure out a way to identify that android kernel
> somehow reliably and send a patch upstream to ifdef out
> netdev_alloc_skb_ip_align() for that kernel, that way other Android
> hackers can benefit.
>
>> CC [M] /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.o
>> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c: In function ‘ieee80211_led_init’:
>> /tool/patches/compat-wireless-2.6.37-rc6-3-patchwork/net/mac80211/led.c:59: error: invalid application of ‘sizeof’ to incomplete type ‘struct led_trigger’
>
>
> This is from:
>
> void ieee80211_led_init(struct ieee80211_local *local)
> {
> local->rx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
> ...
> }
>
> Looks good to me.. Not sure what can cause this, hrm.
>
> Luis
In your kernel config CONFIG_LEDS_TRIGGERS is probably unset and then
net/mac80211/led.c should not be build at all. In the kernel
CONFIG_MAC80211_LEDS will select CONFIG_LEDS_TRIGGERS, but in
compat-wireless this should just be disabled.
I provided a patch for this problem, please apply it and try again.
Hauke
^ permalink raw reply
* Re: [PATCH 2.6.37] mac80211: fix mesh forwarding
From: Javier Cardona @ 2010-12-22 18:22 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless, Luis Carlos Cobo
In-Reply-To: <1293009307.3531.13.camel@jlt3.sipsolutions.net>
Johannes,
Had I encountered this I would have changed the "failed to clone mesh
frame" message to "I'm about to crash". Your fix is better.
Thanks!
On Wed, Dec 22, 2010 at 1:15 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Under memory pressure, the mac80211 mesh code
> may helpfully print a message that it failed
> to clone a mesh frame and then will proceed
> to crash trying to use it anyway. Fix that.
>
> Cc: stable@kernel.org [2.6.27+]
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Javier Cardona <javier@cozybit.com>
> ---
> net/mac80211/rx.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- wireless-testing.orig/net/mac80211/rx.c 2010-12-22 10:05:58.000000000 +0100
> +++ wireless-testing/net/mac80211/rx.c 2010-12-22 10:06:08.000000000 +0100
> @@ -1831,9 +1831,11 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
>
> fwd_skb = skb_copy(skb, GFP_ATOMIC);
>
> - if (!fwd_skb && net_ratelimit())
> + if (!fwd_skb && net_ratelimit()) {
> printk(KERN_DEBUG "%s: failed to clone mesh frame\n",
> sdata->name);
> + goto out;
> + }
>
> fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
> memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
> @@ -1871,6 +1873,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
> }
> }
>
> + out:
> if (is_multicast_ether_addr(hdr->addr1) ||
> sdata->dev->flags & IFF_PROMISC)
> return RX_CONTINUE;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Javier Cardona
cozybit Inc.
http://www.cozybit.com
^ permalink raw reply
* Re: [PATCH] compat-wireless: build led support conditionally
From: Luis R. Rodriguez @ 2010-12-22 18:23 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: linux-wireless, mcgrof, Luis R. Rodriguez
In-Reply-To: <1293041434-3594-1-git-send-email-hauke@hauke-m.de>
On Wed, Dec 22, 2010 at 1:10 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> diff --git a/config.mk b/config.mk
> index 964c646..1f95908 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -133,7 +133,9 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
> CONFIG_MAC80211_RC_PID=y
> CONFIG_MAC80211_RC_MINSTREL=y
> CONFIG_MAC80211_RC_MINSTREL_HT=y
> +ifdef CONFIG_LEDS_TRIGGERS
> CONFIG_MAC80211_LEDS=y
> +endif #CONFIG_LEDS_TRIGGERS
Without using a space for the ifdef'd variable the
include/linux/compat_autoconf.h will end up still defining it but you
should not get it set on the local Makefiles, in this case we want it
to not be defined in the compat_autoconf.h as well so how about
instead (handing off to my atheros address as I use mutt there, one
second)
Luis
^ permalink raw reply
* Re: [PATCH] ath9k: fix aphy / wiphy idle mismatch
From: John W. Linville @ 2010-12-22 18:28 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, stable, Paul Stewart, Amod Bodas
In-Reply-To: <1292862599-26335-1-git-send-email-lrodriguez@atheros.com>
On Mon, Dec 20, 2010 at 11:29:59AM -0500, Luis R. Rodriguez wrote:
> ath9k supports its own set of virtual wiphys, and it uses
> the mac80211 idle notifications to know when a device needs
> to be idle or not. We recently changed ath9k to force idle
> on driver stop() and on resume but forgot to take into account
> ath9k's own virtual wiphy idle states. These are used internally
> by ath9k to check if the device's radio should be powered down
> on each idle call. Without this change its possible that the
> device could have been forced off but the virtual wiphy idle
> was left on.
>
> Cc: stable@kernel.org
> Cc: Paul Stewart <pstew@google.com>
> Cc: Amod Bodas <amod.bodas@atheros.com>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
>
> I'm not yet sure if this actually fixes an issue but it
> certainly is a proper ammendment to the other idle fix
> submitted for stable for suspend/resume.
Can you refresh me on which patch that is?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH] ath9k: fix aphy / wiphy idle mismatch
From: Luis R. Rodriguez @ 2010-12-22 18:31 UTC (permalink / raw)
To: John W. Linville
Cc: Luis Rodriguez, linux-wireless@vger.kernel.org, stable@kernel.org,
Paul Stewart, Amod Bodas
In-Reply-To: <20101222182851.GC10046@tuxdriver.com>
On Wed, Dec 22, 2010 at 10:28:51AM -0800, John W. Linville wrote:
> On Mon, Dec 20, 2010 at 11:29:59AM -0500, Luis R. Rodriguez wrote:
> > ath9k supports its own set of virtual wiphys, and it uses
> > the mac80211 idle notifications to know when a device needs
> > to be idle or not. We recently changed ath9k to force idle
> > on driver stop() and on resume but forgot to take into account
> > ath9k's own virtual wiphy idle states. These are used internally
> > by ath9k to check if the device's radio should be powered down
> > on each idle call. Without this change its possible that the
> > device could have been forced off but the virtual wiphy idle
> > was left on.
> >
> > Cc: stable@kernel.org
> > Cc: Paul Stewart <pstew@google.com>
> > Cc: Amod Bodas <amod.bodas@atheros.com>
> > Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> > ---
> >
> > I'm not yet sure if this actually fixes an issue but it
> > certainly is a proper ammendment to the other idle fix
> > submitted for stable for suspend/resume.
>
> Can you refresh me on which patch that is?
Sure, its:
ath9k: fix assumptions for idle calls on suspend/resume
Luis
^ permalink raw reply
* Re: [PATCH] compat-wireless: build led support conditionally
From: Luis R. Rodriguez @ 2010-12-22 18:31 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: linux-wireless@vger.kernel.org, mcgrof@infradead.org,
Luis Rodriguez
In-Reply-To: <AANLkTik9=gSpE6sRoYZu-RZv3PjeQdtf_Y9hc=X-Z7w=@mail.gmail.com>
On Wed, Dec 22, 2010 at 10:23:48AM -0800, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 1:10 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> > diff --git a/config.mk b/config.mk
> > index 964c646..1f95908 100644
> > --- a/config.mk
> > +++ b/config.mk
> > @@ -133,7 +133,9 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
> > CONFIG_MAC80211_RC_PID=y
> > CONFIG_MAC80211_RC_MINSTREL=y
> > CONFIG_MAC80211_RC_MINSTREL_HT=y
> > +ifdef CONFIG_LEDS_TRIGGERS
> > CONFIG_MAC80211_LEDS=y
> > +endif #CONFIG_LEDS_TRIGGERS
>
> Without using a space for the ifdef'd variable the
> include/linux/compat_autoconf.h will end up still defining it but you
> should not get it set on the local Makefiles, in this case we want it
> to not be defined in the compat_autoconf.h as well so how about
> instead (handing off to my atheros address as I use mutt there, one
> second)
>From 47d9c7d253a7b2a78af69f0d8177ee55df74ea0e Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Wed, 22 Dec 2010 19:10:34 +0100
Subject: [PATCH] compat-wireless: build led support conditionally
Do not build compat-wireless with LED support when the kernel does not
contain a led subsystem.
This fixes some compile problems when CONFIG_LEDS_TRIGGERS is not set.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
config.mk | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/config.mk b/config.mk
index 964c646..3a38d34 100644
--- a/config.mk
+++ b/config.mk
@@ -133,7 +133,9 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
CONFIG_MAC80211_RC_PID=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
-CONFIG_MAC80211_LEDS=y
+ifdef CONFIG_LEDS_TRIGGERS
+ CONFIG_MAC80211_LEDS=y
+endif #CONFIG_LEDS_TRIGGERS
# enable mesh networking too
CONFIG_MAC80211_MESH=y
@@ -243,7 +245,9 @@ CONFIG_B43_PCI_AUTOSELECT=y
ifdef CONFIG_PCMCIA
CONFIG_B43_PCMCIA=y
endif #CONFIG_PCMCIA
-CONFIG_B43_LEDS=y
+ifdef CONFIG_MAC80211_LEDS
+ CONFIG_B43_LEDS=y
+endif #CONFIG_MAC80211_LEDS
CONFIG_B43_PHY_LP=y
CONFIG_B43_PHY_N=y
# CONFIG_B43_FORCE_PIO=y
@@ -252,7 +256,9 @@ CONFIG_B43_PHY_N=y
CONFIG_B43LEGACY=m
CONFIG_B43LEGACY_HWRNG=y
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
-CONFIG_B43LEGACY_LEDS=y
+ifdef CONFIG_MAC80211_LEDS
+ CONFIG_B43LEGACY_LEDS=y
+endif #CONFIG_MAC80211_LEDS
# CONFIG_B43LEGACY_DEBUG=y
CONFIG_B43LEGACY_DMA=y
CONFIG_B43LEGACY_PIO=y
@@ -408,18 +414,24 @@ endif #CONFIG_COMPAT_KERNEL_29
CONFIG_P54_USB=m
CONFIG_RTL8187=m
-CONFIG_RTL8187_LEDS=y
+ifdef CONFIG_MAC80211_LEDS
+ CONFIG_RTL8187_LEDS=y
+endif #CONFIG_MAC80211_LEDS
CONFIG_AT76C50X_USB=m
ifndef CONFIG_COMPAT_KERNEL_28
CONFIG_AR9170_USB=m
-CONFIG_AR9170_LEDS=y
+ifdef CONFIG_MAC80211_LEDS
+ CONFIG_AR9170_LEDS=y
+endif #CONFIG_MAC80211_LEDS
endif #CONFIG_COMPAT_KERNEL_28
ifndef CONFIG_COMPAT_KERNEL_29
CONFIG_CARL9170=m
-CONFIG_CARL9170_LEDS=y
+ifdef CONFIG_MAC80211_LEDS
+ CONFIG_CARL9170_LEDS=y
+endif #CONFIG_MAC80211_LEDS
# CONFIG_CARL9170_DEBUGFS=y
# CONFIG_CARL9170_WPC=y
endif #CONFIG_COMPAT_KERNEL_29
@@ -559,7 +571,9 @@ CONFIG_RT2X00_LIB_CRYPTO=y
ifdef CONFIG_COMPAT_KERNEL_25
CONFIG_RT2X00_LIB_LEDS=n
else #CONFIG_COMPAT_KERNEL_25
-CONFIG_RT2X00_LIB_LEDS=y
+ifdef CONFIG_LEDS_CLASS
+ CONFIG_RT2X00_LIB_LEDS=y
+endif #CONFIG_LEDS_CLASS
endif #CONFIG_COMPAT_KERNEL_25
# CONFIG_RT2X00_DEBUG=y
# CONFIG_RT2X00_LIB_DEBUGFS
@@ -567,7 +581,9 @@ endif
# p54
CONFIG_P54_COMMON=m
-CONFIG_P54_LEDS=y
+ifdef CONFIG_MAC80211_LEDS
+ CONFIG_P54_LEDS=y
+endif #CONFIG_MAC80211_LEDS
# Atheros
CONFIG_ATH_COMMON=m
@@ -594,7 +610,9 @@ endif #CONFIG_COMPAT_KERNEL_27
# In more recent kernel versions use the in kernel rfkill module.
ifdef CONFIG_COMPAT_KERNEL_31
CONFIG_RFKILL_BACKPORT=m
-CONFIG_RFKILL_BACKPORT_LEDS=y
+ifdef CONFIG_LEDS_TRIGGERS
+ CONFIG_RFKILL_BACKPORT_LEDS=y
+endif #CONFIG_LEDS_TRIGGERS
CONFIG_RFKILL_BACKPORT_INPUT=y
endif #CONFIG_COMPAT_KERNEL_31
--
1.7.3.2.90.gd4c43
^ permalink raw reply related
* Re: [PATCH] compat-wireless: build led support conditionally
From: Hauke Mehrtens @ 2010-12-22 18:47 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, mcgrof, Luis R. Rodriguez
In-Reply-To: <AANLkTik9=gSpE6sRoYZu-RZv3PjeQdtf_Y9hc=X-Z7w=@mail.gmail.com>
On 12/22/2010 07:23 PM, Luis R. Rodriguez wrote:
> On Wed, Dec 22, 2010 at 1:10 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> diff --git a/config.mk b/config.mk
>> index 964c646..1f95908 100644
>> --- a/config.mk
>> +++ b/config.mk
>> @@ -133,7 +133,9 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
>> CONFIG_MAC80211_RC_PID=y
>> CONFIG_MAC80211_RC_MINSTREL=y
>> CONFIG_MAC80211_RC_MINSTREL_HT=y
>> +ifdef CONFIG_LEDS_TRIGGERS
>> CONFIG_MAC80211_LEDS=y
>> +endif #CONFIG_LEDS_TRIGGERS
>
> Without using a space for the ifdef'd variable the
> include/linux/compat_autoconf.h will end up still defining it but you
> should not get it set on the local Makefiles, in this case we want it
> to not be defined in the compat_autoconf.h as well so how about
> instead (handing off to my atheros address as I use mutt there, one
> second)
The script generating include/linux/compat_autoconf.h will also add the
ifdefs into compat_autoconf.h. The generated entry looks like this:
#if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
#ifndef CONFIG_MAC80211_LEDS
#define CONFIG_MAC80211_LEDS 1
#endif /* CONFIG_MAC80211_LEDS */
#endif /* CONFIG_LEDS_TRIGGERS */
I added this feature some months ago.
Hauke
Your mail server at atheros did not accept my mail, because the IP
address I got from my local ISP ( 91.97.249.71 ) is on some blacklist.
But this is normal and the mail was sent throught my mail server which
IP address is not on that blacklist. Your mail server seams to be mis
configured.
^ permalink raw reply
* Re: [PATCH] compat-wireless: build led support conditionally
From: Luis R. Rodriguez @ 2010-12-22 18:57 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: Luis Rodriguez, linux-wireless@vger.kernel.org,
mcgrof@infradead.org, it
In-Reply-To: <4D1247C2.6090500@hauke-m.de>
On Wed, Dec 22, 2010 at 10:47:30AM -0800, Hauke Mehrtens wrote:
> On 12/22/2010 07:23 PM, Luis R. Rodriguez wrote:
> > On Wed, Dec 22, 2010 at 1:10 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >> diff --git a/config.mk b/config.mk
> >> index 964c646..1f95908 100644
> >> --- a/config.mk
> >> +++ b/config.mk
> >> @@ -133,7 +133,9 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
> >> CONFIG_MAC80211_RC_PID=y
> >> CONFIG_MAC80211_RC_MINSTREL=y
> >> CONFIG_MAC80211_RC_MINSTREL_HT=y
> >> +ifdef CONFIG_LEDS_TRIGGERS
> >> CONFIG_MAC80211_LEDS=y
> >> +endif #CONFIG_LEDS_TRIGGERS
> >
> > Without using a space for the ifdef'd variable the
> > include/linux/compat_autoconf.h will end up still defining it but you
> > should not get it set on the local Makefiles, in this case we want it
> > to not be defined in the compat_autoconf.h as well so how about
> > instead (handing off to my atheros address as I use mutt there, one
> > second)
>
> The script generating include/linux/compat_autoconf.h will also add the
> ifdefs into compat_autoconf.h. The generated entry looks like this:
>
> #if defined(CONFIG_LEDS_TRIGGERS) || defined(CONFIG_LEDS_TRIGGERS_MODULE)
> #ifndef CONFIG_MAC80211_LEDS
> #define CONFIG_MAC80211_LEDS 1
> #endif /* CONFIG_MAC80211_LEDS */
> #endif /* CONFIG_LEDS_TRIGGERS */
>
> I added this feature some months ago.
Ah neat thanks!
> Hauke
>
> Your mail server at atheros did not accept my mail, because the IP
> address I got from my local ISP ( 91.97.249.71 ) is on some blacklist.
> But this is normal and the mail was sent throught my mail server which
> IP address is not on that blacklist. Your mail server seams to be mis
> configured.
Cc'ing our IT.
Luis
^ permalink raw reply
* Re: [PATCH v2] rt2x00: Fix panic on frame padding for rt2800 usb devices
From: Ivo Van Doorn @ 2010-12-22 19:08 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Gertjan van Wingerde, Ismael Luceno
In-Reply-To: <1292899311-20768-1-git-send-email-ismael.luceno@gmail.com>
> Backtrace:
> rt2800usb_write_tx_data
> rt2x00queue_write_tx_frame
> rt2x00mac_tx
> invoke_tx_handlers
> __ieee80211_tx
> ieee80211_tx
> virt_to_head_page
> ieee80211_xmit
> ieee80211_tx_skb
> ieee80211_scan_work
> schedule
> ieee80211_scan_work
> process_one_work
> ...
>
> It tried to expand the skb past it's end using skb_put. So I replaced it
> with a call to skb_padto, which takes the issue into account.
>
> Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
> ---
> drivers/net/wireless/rt2x00/rt2800usb.c | 16 ++++++++++++----
> 1 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index 3e0205d..b97a4a5 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -369,7 +369,10 @@ static void rt2800usb_write_tx_desc(struct queue_entry *entry,
> static void rt2800usb_write_tx_data(struct queue_entry *entry,
> struct txentry_desc *txdesc)
> {
> - u8 padding_len;
> + unsigned int len;
> + int err;
> +
> + rt2800_write_tx_data(entry, txdesc);
>
> /*
> * pad(1~3 bytes) is added after each 802.11 payload.
> @@ -378,9 +381,14 @@ static void rt2800usb_write_tx_data(struct queue_entry *entry,
> * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad |
> * |<------------- tx_pkt_len ------------->|
> */
> - rt2800_write_tx_data(entry, txdesc);
> - padding_len = roundup(entry->skb->len + 4, 4) - entry->skb->len;
> - memset(skb_put(entry->skb, padding_len), 0, padding_len);
> + len = roundup(entry->skb->len, 4) + 4;
> + err = skb_padto(entry->skb, len);
> + if (unlikely(err)) {
> + WARNING(entry->queue->rt2x00dev, "TX SKB padding error, out of memory\n");
> + return;
> + }
> +
> + entry->skb->len = len;
> }
>
> /*
> --
> 1.7.3.4
>
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox