* Re: iwlist wlan0 scan disrupts communications
From: Johannes Berg @ 2009-10-28 14:54 UTC (permalink / raw)
To: Charles Gordon; +Cc: linux-wireless
In-Reply-To: <86201b3f0910280747q557a6153oec929e8235459c8f@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
On Wed, 2009-10-28 at 10:47 -0400, Charles Gordon wrote:
> Thanks for the information. After doing some more testing I found
> that the association to the AP is sometimes lost and that mac80211
> does not recover automatically. You have to type the command "wpa_cli
> reassociate" to trigger the stack to reassociate with the AP. Is this
> one of the things that is, or will be, fixed in later releases?
I don't know. Normally, wpa_supplicant should notice this and re-connect
by itself.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: iwlist wlan0 scan disrupts communications
From: Charles Gordon @ 2009-10-28 15:02 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <1256741651.4237.112.camel@johannes.local>
On Wed, Oct 28, 2009 at 10:54 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Wed, 2009-10-28 at 10:47 -0400, Charles Gordon wrote:
>
>> Thanks for the information. After doing some more testing I found
>> that the association to the AP is sometimes lost and that mac80211
>> does not recover automatically. You have to type the command "wpa_cli
>> reassociate" to trigger the stack to reassociate with the AP. Is this
>> one of the things that is, or will be, fixed in later releases?
>
> I don't know. Normally, wpa_supplicant should notice this and re-connect
> by itself.
>
> johannes
>
I think the way wpa_supplicant would notice this is that the AP would
send a deauthentication or dissassociation frame to the station, and
that would trigger wpa_supplicant to reassociate. However, if we are
tuned to a different channel when the frame is sent, then we won't
receive it. The AP won't send another notification unless we try to
send it another data frame, but if another station is trying to send
to us, we won't be notified.
I think that when the scan completes, mac80211 should either notify
wpa_supplicant that it should reassociate, or maybe send a null-data
frame to the AP which might cause it to send another
deauthentication/dissassociation frame (if we lost the connect).
^ permalink raw reply
* Re: iwlist wlan0 scan disrupts communications
From: Johannes Berg @ 2009-10-28 15:23 UTC (permalink / raw)
To: Charles Gordon; +Cc: linux-wireless
In-Reply-To: <86201b3f0910280802r279bf0d8q3424245ddfb1f8a8@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
On Wed, 2009-10-28 at 11:02 -0400, Charles Gordon wrote:
> I think that when the scan completes, mac80211 should either notify
> wpa_supplicant that it should reassociate, or maybe send a null-data
> frame to the AP which might cause it to send another
> deauthentication/dissassociation frame (if we lost the connect).
it does send nullfunc frames, you're probably running into an old bug
that caused those to not be sent.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: iwlist wlan0 scan disrupts communications
From: Dan Williams @ 2009-10-28 15:48 UTC (permalink / raw)
To: Johannes Berg; +Cc: Charles Gordon, linux-wireless
In-Reply-To: <1256743398.4237.114.camel@johannes.local>
On Wed, 2009-10-28 at 16:23 +0100, Johannes Berg wrote:
> On Wed, 2009-10-28 at 11:02 -0400, Charles Gordon wrote:
>
> > I think that when the scan completes, mac80211 should either notify
> > wpa_supplicant that it should reassociate, or maybe send a null-data
> > frame to the AP which might cause it to send another
> > deauthentication/dissassociation frame (if we lost the connect).
>
> it does send nullfunc frames, you're probably running into an old bug
> that caused those to not be sent.
Correct, 2.6.28 did *not* have the nullfunc TX fix, so if the scan lasts
more than a few seconds, and the AP has traffic for the STA the TX will
time out, and the AP may drop the STA during the scan. 2.6.29 was the
first kernel that had the nullfunc TX fix.
But the supplicant should still reconnect...
Dan
^ permalink raw reply
* Re: [PATCH] libertas: remove internal buffers from GSPI driver
From: Dan Williams @ 2009-10-28 17:13 UTC (permalink / raw)
To: Andrey Yurovsky; +Cc: linux-wireless, libertas-dev, sebatian
In-Reply-To: <1256687501-8636-1-git-send-email-andrey@cozybit.com>
On Tue, 2009-10-27 at 16:51 -0700, Andrey Yurovsky wrote:
> This patch removes the internal command and data buffers that the GSPI driver
> maintained and instead relies on the Libertas core to synchronize access
> to the command and data ports as with the other interface drivers. This
> cleanup reduces the GSPI driver's memory footprint and should improve
> performance by removing the need to copy to these internal buffers.
> This also simplifies the bottom half of the interrupt handler.
>
> This is an incremental cleanup: after removing the redundant buffers, we
> can further improve the driver to use a threaded IRQ handler instead of
> maintaining its own thread. However I would like a few folks to test
> the buffer removal first and make sure that I'm not introducing
> regressions.
>
> Tested on Blackfin BF527 with DMA disabled due to an issue with the SPI
> host controller driver in the current bleeding-edge Blackfin kernel. I
> would appreciate it if someone with working DMA could test this patch
> and provide feedback.
>
> Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Looks OK to me, but I don't have any of the SPI hardware so when you get
a Tested-by:, let me know and I'll ack.
Dan
> ---
> drivers/net/wireless/libertas/if_spi.c | 136 ++------------------------------
> 1 files changed, 6 insertions(+), 130 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
> index 06df2e1..9e0096d 100644
> --- a/drivers/net/wireless/libertas/if_spi.c
> +++ b/drivers/net/wireless/libertas/if_spi.c
> @@ -32,12 +32,6 @@
> #include "dev.h"
> #include "if_spi.h"
>
> -struct if_spi_packet {
> - struct list_head list;
> - u16 blen;
> - u8 buffer[0] __attribute__((aligned(4)));
> -};
> -
> struct if_spi_card {
> struct spi_device *spi;
> struct lbs_private *priv;
> @@ -66,33 +60,10 @@ struct if_spi_card {
> struct semaphore spi_thread_terminated;
>
> u8 cmd_buffer[IF_SPI_CMD_BUF_SIZE];
> -
> - /* A buffer of incoming packets from libertas core.
> - * Since we can't sleep in hw_host_to_card, we have to buffer
> - * them. */
> - struct list_head cmd_packet_list;
> - struct list_head data_packet_list;
> -
> - /* Protects cmd_packet_list and data_packet_list */
> - spinlock_t buffer_lock;
> };
>
> static void free_if_spi_card(struct if_spi_card *card)
> {
> - struct list_head *cursor, *next;
> - struct if_spi_packet *packet;
> -
> - BUG_ON(card->run_thread);
> - list_for_each_safe(cursor, next, &card->cmd_packet_list) {
> - packet = container_of(cursor, struct if_spi_packet, list);
> - list_del(&packet->list);
> - kfree(packet);
> - }
> - list_for_each_safe(cursor, next, &card->data_packet_list) {
> - packet = container_of(cursor, struct if_spi_packet, list);
> - list_del(&packet->list);
> - kfree(packet);
> - }
> spi_set_drvdata(card->spi, NULL);
> kfree(card);
> }
> @@ -774,40 +745,6 @@ out:
> return err;
> }
>
> -/* Move data or a command from the host to the card. */
> -static void if_spi_h2c(struct if_spi_card *card,
> - struct if_spi_packet *packet, int type)
> -{
> - int err = 0;
> - u16 int_type, port_reg;
> -
> - switch (type) {
> - case MVMS_DAT:
> - int_type = IF_SPI_CIC_TX_DOWNLOAD_OVER;
> - port_reg = IF_SPI_DATA_RDWRPORT_REG;
> - break;
> - case MVMS_CMD:
> - int_type = IF_SPI_CIC_CMD_DOWNLOAD_OVER;
> - port_reg = IF_SPI_CMD_RDWRPORT_REG;
> - break;
> - default:
> - lbs_pr_err("can't transfer buffer of type %d\n", type);
> - err = -EINVAL;
> - goto out;
> - }
> -
> - /* Write the data to the card */
> - err = spu_write(card, port_reg, packet->buffer, packet->blen);
> - if (err)
> - goto out;
> -
> -out:
> - kfree(packet);
> -
> - if (err)
> - lbs_pr_err("%s: error %d\n", __func__, err);
> -}
> -
> /* Inform the host about a card event */
> static void if_spi_e2h(struct if_spi_card *card)
> {
> @@ -837,8 +774,6 @@ static int lbs_spi_thread(void *data)
> int err;
> struct if_spi_card *card = data;
> u16 hiStatus;
> - unsigned long flags;
> - struct if_spi_packet *packet;
>
> while (1) {
> /* Wait to be woken up by one of two things. First, our ISR
> @@ -877,43 +812,9 @@ static int lbs_spi_thread(void *data)
> if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY ||
> (card->priv->psstate != PS_STATE_FULL_POWER &&
> (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY))) {
> - /* This means two things. First of all,
> - * if there was a previous command sent, the card has
> - * successfully received it.
> - * Secondly, it is now ready to download another
> - * command.
> - */
> lbs_host_to_card_done(card->priv);
> -
> - /* Do we have any command packets from the host to
> - * send? */
> - packet = NULL;
> - spin_lock_irqsave(&card->buffer_lock, flags);
> - if (!list_empty(&card->cmd_packet_list)) {
> - packet = (struct if_spi_packet *)(card->
> - cmd_packet_list.next);
> - list_del(&packet->list);
> - }
> - spin_unlock_irqrestore(&card->buffer_lock, flags);
> -
> - if (packet)
> - if_spi_h2c(card, packet, MVMS_CMD);
> }
> - if (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY) {
> - /* Do we have any data packets from the host to
> - * send? */
> - packet = NULL;
> - spin_lock_irqsave(&card->buffer_lock, flags);
> - if (!list_empty(&card->data_packet_list)) {
> - packet = (struct if_spi_packet *)(card->
> - data_packet_list.next);
> - list_del(&packet->list);
> - }
> - spin_unlock_irqrestore(&card->buffer_lock, flags);
>
> - if (packet)
> - if_spi_h2c(card, packet, MVMS_DAT);
> - }
> if (hiStatus & IF_SPI_HIST_CARD_EVENT)
> if_spi_e2h(card);
>
> @@ -942,40 +843,18 @@ static int if_spi_host_to_card(struct lbs_private *priv,
> u8 type, u8 *buf, u16 nb)
> {
> int err = 0;
> - unsigned long flags;
> struct if_spi_card *card = priv->card;
> - struct if_spi_packet *packet;
> - u16 blen;
>
> lbs_deb_enter_args(LBS_DEB_SPI, "type %d, bytes %d", type, nb);
>
> - if (nb == 0) {
> - lbs_pr_err("%s: invalid size requested: %d\n", __func__, nb);
> - err = -EINVAL;
> - goto out;
> - }
> - blen = ALIGN(nb, 4);
> - packet = kzalloc(sizeof(struct if_spi_packet) + blen, GFP_ATOMIC);
> - if (!packet) {
> - err = -ENOMEM;
> - goto out;
> - }
> - packet->blen = blen;
> - memcpy(packet->buffer, buf, nb);
> - memset(packet->buffer + nb, 0, blen - nb);
> + nb = ALIGN(nb, 4);
>
> switch (type) {
> case MVMS_CMD:
> - priv->dnld_sent = DNLD_CMD_SENT;
> - spin_lock_irqsave(&card->buffer_lock, flags);
> - list_add_tail(&packet->list, &card->cmd_packet_list);
> - spin_unlock_irqrestore(&card->buffer_lock, flags);
> + err = spu_write(card, IF_SPI_CMD_RDWRPORT_REG, buf, nb);
> break;
> case MVMS_DAT:
> - priv->dnld_sent = DNLD_DATA_SENT;
> - spin_lock_irqsave(&card->buffer_lock, flags);
> - list_add_tail(&packet->list, &card->data_packet_list);
> - spin_unlock_irqrestore(&card->buffer_lock, flags);
> + err = spu_write(card, IF_SPI_DATA_RDWRPORT_REG, buf, nb);
> break;
> default:
> lbs_pr_err("can't transfer buffer of type %d", type);
> @@ -983,9 +862,6 @@ static int if_spi_host_to_card(struct lbs_private *priv,
> break;
> }
>
> - /* Wake up the spi thread */
> - up(&card->spi_ready);
> -out:
> lbs_deb_leave_args(LBS_DEB_SPI, "err=%d", err);
> return err;
> }
> @@ -1062,9 +938,6 @@ static int __devinit if_spi_probe(struct spi_device *spi)
>
> sema_init(&card->spi_ready, 0);
> sema_init(&card->spi_thread_terminated, 0);
> - INIT_LIST_HEAD(&card->cmd_packet_list);
> - INIT_LIST_HEAD(&card->data_packet_list);
> - spin_lock_init(&card->buffer_lock);
>
> /* Initialize the SPI Interface Unit */
> err = spu_init(card, pdata->use_dummy_writes);
> @@ -1141,6 +1014,9 @@ static int __devinit if_spi_probe(struct spi_device *spi)
> goto terminate_thread;
> }
>
> + /* poke the IRQ handler so that we don't miss the first interrupt */
> + up(&card->spi_ready);
> +
> /* Start the card.
> * This will call register_netdev, and we'll start
> * getting interrupts... */
^ permalink raw reply
* odd state reached when AP deauths you after assoc
From: Luis R. Rodriguez @ 2009-10-28 18:37 UTC (permalink / raw)
To: linux-wireless
I ran into this when ath5k with wpa_supplicant with config file with
a wrong password against a Cisco AP. It seems the Cisco AP auths you
and lets you assoc but later it deauths you -- I guess after it
determines you are auth credentials failed. When this happens I get:
mcgrof@tux ~ $ iw dev wlan0 link
Authenticated with 00:0b:85:5b:8d:6c (on wlan0)
Not connected.
The log *after* this is below. I'll try to reproduce again, I can reproduce
all the time.
[ 171.905675] wlan0: deauthenticating from 00:0b:85:5b:a6:ec by local choice (reason=3)
[ 171.929065] ------------[ cut here ]------------
[ 171.929106] WARNING: at net/mac80211/scan.c:267 ieee80211_scan_completed+0x240/0x270 [mac80211]()
[ 171.929112] Hardware name: 7660A14
[ 171.929117] Modules linked in: i915 drm_kms_helper drm i2c_algo_bit binfmt_misc ppdev bridge stp bnep lp parport snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm arc4 snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi ath5k snd_seq_midi_event snd_seq joydev snd_timer snd_seq_device mac80211 ath snd pcmcia soundcore cfg80211 thinkpad_acpi video intel_agp psmouse snd_page_alloc nvram led_class yenta_socket rsrc_nonstatic pcmcia_core output agpgart pcspkr serio_raw btusb iTCO_wdt iTCO_vendor_support ohci1394 ieee1394 e1000e
[ 171.929226] Pid: 4022, comm: wpa_supplicant Not tainted 2.6.32-rc5-wl #27
[ 171.929231] Call Trace:
[ 171.929245] [<c05a3a23>] ? printk+0x1d/0x22
[ 171.929269] [<f8379040>] ? ieee80211_scan_completed+0x240/0x270 [mac80211]
[ 171.929281] [<c0146121>] warn_slowpath_common+0x71/0xd0
[ 171.929306] [<f8379040>] ? ieee80211_scan_completed+0x240/0x270 [mac80211]
[ 171.929316] [<c014619a>] warn_slowpath_null+0x1a/0x20
[ 171.929340] [<f8379040>] ieee80211_scan_completed+0x240/0x270 [mac80211]
[ 171.929363] [<f83790b9>] ieee80211_scan_cancel+0x49/0x80 [mac80211]
[ 171.929388] [<f83826ca>] ieee80211_stop+0x59a/0x5b0 [mac80211]
[ 171.929399] [<c04e513e>] ? dev_deactivate+0x17e/0x1a0
[ 171.929412] [<c04d34cb>] dev_close+0x6b/0xc0
[ 171.929421] [<c05a6733>] ? _spin_unlock_bh+0x13/0x20
[ 171.929430] [<c04d150f>] ? dev_set_rx_mode+0x2f/0x40
[ 171.929438] [<c04d2d44>] dev_change_flags+0x84/0x1d0
[ 171.929448] [<c05207ea>] devinet_ioctl+0x54a/0x600
[ 171.929456] [<c04d489d>] ? dev_ioctl+0x28d/0x530
[ 171.929465] [<c0521c6a>] inet_ioctl+0x9a/0xc0
[ 171.929475] [<c04c25c8>] sock_ioctl+0x68/0x270
[ 171.929483] [<c04c2560>] ? sock_ioctl+0x0/0x270
[ 171.929493] [<c021bb9d>] vfs_ioctl+0x2d/0x90
[ 171.929501] [<c021bd62>] do_vfs_ioctl+0x72/0x5f0
[ 171.929510] [<c02267bf>] ? mntput_no_expire+0x1f/0xd0
[ 171.929520] [<c020c2ca>] ? __fput+0x17a/0x1f0
[ 171.929529] [<c020c367>] ? fput+0x27/0x30
[ 171.929537] [<c0207aec>] ? filp_close+0x4c/0x80
[ 171.929545] [<c021c34b>] sys_ioctl+0x6b/0x70
[ 171.929554] [<c01030dc>] sysenter_do_call+0x12/0x28
[ 171.929560] ---[ end trace d6c0a8110c16e049 ]---
[ 171.937047] phy0: device now idle
[ 171.938704] ------------[ cut here ]------------
[ 171.938733] WARNING: at net/wireless/core.c:619 wdev_cleanup_work+0xbf/0xe0 [cfg80211]()
[ 171.938741] Hardware name: 7660A14
[ 171.938746] Modules linked in: i915 drm_kms_helper drm i2c_algo_bit binfmt_misc ppdev bridge stp bnep lp parport snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm arc4 snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi ath5k snd_seq_midi_event snd_seq joydev snd_timer snd_seq_device mac80211 ath snd pcmcia soundcore cfg80211 thinkpad_acpi video intel_agp psmouse snd_page_alloc nvram led_class yenta_socket rsrc_nonstatic pcmcia_core output agpgart pcspkr serio_raw btusb iTCO_wdt iTCO_vendor_support ohci1394 ieee1394 e1000e
[ 171.938873] Pid: 9, comm: events/0 Tainted: G W 2.6.32-rc5-wl #27
[ 171.938880] Call Trace:
[ 171.938892] [<c05a3a23>] ? printk+0x1d/0x22
[ 171.938910] [<f82cd18f>] ? wdev_cleanup_work+0xbf/0xe0 [cfg80211]
[ 171.938922] [<c0146121>] warn_slowpath_common+0x71/0xd0
[ 171.938939] [<f82cd18f>] ? wdev_cleanup_work+0xbf/0xe0 [cfg80211]
[ 171.938950] [<c014619a>] warn_slowpath_null+0x1a/0x20
[ 171.938967] [<f82cd18f>] wdev_cleanup_work+0xbf/0xe0 [cfg80211]
[ 171.938981] [<c01639b4>] worker_thread+0x134/0x200
[ 171.938998] [<f82cd0d0>] ? wdev_cleanup_work+0x0/0xe0 [cfg80211]
[ 171.939010] [<c0168600>] ? autoremove_wake_function+0x0/0x50
[ 171.939021] [<c0163880>] ? worker_thread+0x0/0x200
[ 171.939031] [<c01682b4>] kthread+0x74/0x80
[ 171.939041] [<c0168240>] ? kthread+0x0/0x80
[ 171.939051] [<c0103c47>] kernel_thread_helper+0x7/0x10
[ 171.939059] ---[ end trace d6c0a8110c16e04a ]---
[ 171.957054] CE: hpet increasing min_delta_ns to 15000 nsec
[ 173.591594] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 173.816116] phy0: device no longer idle - scanning
[ 177.440103] ------------[ cut here ]------------
[ 177.440138] WARNING: at net/wireless/scan.c:88 cfg80211_scan_done+0x4b/0x50 [cfg80211]()
[ 177.440145] Hardware name: 7660A14
[ 177.440150] Modules linked in: i915 drm_kms_helper drm i2c_algo_bit binfmt_misc ppdev bridge stp bnep lp parport snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm arc4 snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi ath5k snd_seq_midi_event snd_seq joydev snd_timer snd_seq_device mac80211 ath snd pcmcia soundcore cfg80211 thinkpad_acpi video intel_agp psmouse snd_page_alloc nvram led_class yenta_socket rsrc_nonstatic pcmcia_core output agpgart pcspkr serio_raw btusb iTCO_wdt iTCO_vendor_support ohci1394 ieee1394 e1000e
[ 177.440256] Pid: 1864, comm: phy0 Tainted: G W 2.6.32-rc5-wl #27
[ 177.440262] Call Trace:
[ 177.440275] [<c05a3a23>] ? printk+0x1d/0x22
[ 177.440293] [<f82d17fb>] ? cfg80211_scan_done+0x4b/0x50 [cfg80211]
[ 177.440306] [<c0146121>] warn_slowpath_common+0x71/0xd0
[ 177.440322] [<f82d17fb>] ? cfg80211_scan_done+0x4b/0x50 [cfg80211]
[ 177.440332] [<c014619a>] warn_slowpath_null+0x1a/0x20
[ 177.440349] [<f82d17fb>] cfg80211_scan_done+0x4b/0x50 [cfg80211]
[ 177.440374] [<f8378e54>] ieee80211_scan_completed+0x54/0x270 [mac80211]
[ 177.440397] [<f8379236>] ieee80211_scan_work+0x146/0x4b0 [mac80211]
[ 177.440408] [<c01bb51d>] ? probe_workqueue_execution+0x8d/0xb0
[ 177.440420] [<c01639b4>] worker_thread+0x134/0x200
[ 177.440444] [<f83790f0>] ? ieee80211_scan_work+0x0/0x4b0 [mac80211]
[ 177.440454] [<c0168600>] ? autoremove_wake_function+0x0/0x50
[ 177.440463] [<c0163880>] ? worker_thread+0x0/0x200
[ 177.440471] [<c01682b4>] kthread+0x74/0x80
[ 177.440479] [<c0168240>] ? kthread+0x0/0x80
[ 177.440488] [<c0103c47>] kernel_thread_helper+0x7/0x10
[ 177.440494] ---[ end trace d6c0a8110c16e04b ]---
[ 177.443939] phy0: device now idle
[ 183.714141] phy0: device no longer idle - scanning
[ 187.335604] wlan0: direct probe to AP 00:0b:85:5b:a6:ec (try 1)
[ 187.338695] wlan0: direct probe responded
[ 187.338703] wlan0: authenticate with AP 00:0b:85:5b:a6:ec (try 1)
[ 187.340329] wlan0: authenticated
[ 187.340635] wlan0: associate with AP 00:0b:85:5b:a6:ec (try 1)
[ 187.343385] wlan0: RX AssocResp from 00:0b:85:5b:a6:ec (capab=0x431 status=0 aid=52)
[ 187.343392] wlan0: associated
[ 187.343401] phy0: Allocated STA 00:0b:85:5b:a6:ec
[ 187.344165] phy0: Inserted STA 00:0b:85:5b:a6:ec
[ 187.344924] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 187.345770] cfg80211: Calling CRDA for country: US
[ 187.352927] cfg80211: Received country IE:
[ 187.352935] cfg80211: Regulatory domain: US
[ 187.352939] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 187.352947] (2402000 KHz - 2477000 KHz @ 40000 KHz), (10000 mBi, 10000 mBm)
[ 187.352952] cfg80211: CRDA thinks this should applied:
[ 187.352956] cfg80211: Regulatory domain: US
[ 187.352960] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 187.352967] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 187.352974] (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[ 187.352980] (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 187.352987] (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 187.352994] (5651000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 187.353000] (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[ 187.353005] cfg80211: We intersect both of these and get:
[ 187.353010] cfg80211: Regulatory domain: 98
[ 187.353014] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 187.353020] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 187.353033] cfg80211: Disabling channel 2467 MHz on phy0 due to Country IE
[ 187.353038] cfg80211: Disabling channel 2472 MHz on phy0 due to Country IE
[ 187.353044] cfg80211: Disabling channel 2484 MHz on phy0 due to Country IE
[ 187.353050] cfg80211: Leaving channel 5180 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353060] wlan0: dropped frame to 00:0b:85:5b:a6:ec (unauthorized port)
[ 187.353068] cfg80211: Leaving channel 5200 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353075] cfg80211: Leaving channel 5220 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353083] cfg80211: Leaving channel 5240 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353091] cfg80211: Leaving channel 5260 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353098] cfg80211: Leaving channel 5280 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353106] cfg80211: Leaving channel 5300 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353113] cfg80211: Leaving channel 5320 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353121] cfg80211: Leaving channel 5500 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353129] cfg80211: Leaving channel 5520 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353136] cfg80211: Leaving channel 5540 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353144] cfg80211: Leaving channel 5560 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353151] cfg80211: Leaving channel 5580 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353159] cfg80211: Leaving channel 5600 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353167] cfg80211: Leaving channel 5620 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353175] cfg80211: Leaving channel 5640 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353183] cfg80211: Leaving channel 5660 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353190] cfg80211: Leaving channel 5680 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353198] cfg80211: Leaving channel 5700 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353205] cfg80211: Leaving channel 5745 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353213] cfg80211: Leaving channel 5765 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353221] cfg80211: Leaving channel 5785 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353228] cfg80211: Leaving channel 5805 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353236] cfg80211: Leaving channel 5825 MHz intact on phy0 - no rule found in band on Country IE
[ 187.353253] cfg80211: Current regulatory domain updated by AP to: US
[ 187.353258] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 187.353265] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 187.805098] wlan0: dropped frame to 00:0b:85:5b:a6:ec (unauthorized port)
[ 188.804121] wlan0: dropped frame to 00:0b:85:5b:a6:ec (unauthorized port)
[ 191.290511] wlan0: deauthenticated from 00:0b:85:5b:a6:ec (Reason: 1)
[ 191.290536] phy0: device now idle
[ 191.290573] phy0: Removed STA 00:0b:85:5b:a6:ec
[ 191.321556] phy0: Destroyed STA 00:0b:85:5b:a6:ec
[ 191.421927] phy0: device no longer idle - scanning
[ 194.672155] wlan0: direct probe to AP 00:0b:85:5b:a6:e3 (try 1)
[ 194.673139] wlan0: direct probe responded
[ 194.673146] wlan0: authenticate with AP 00:0b:85:5b:a6:e3 (try 1)
[ 194.674160] wlan0: authenticated
[ 194.674494] wlan0: associate with AP 00:0b:85:5b:a6:e3 (try 1)
[ 194.677426] wlan0: RX AssocResp from 00:0b:85:5b:a6:e3 (capab=0x11 status=0 aid=70)
[ 194.677433] wlan0: associated
[ 194.677442] phy0: Allocated STA 00:0b:85:5b:a6:e3
[ 194.677931] phy0: Inserted STA 00:0b:85:5b:a6:e3
[ 196.804059] wlan0: dropped frame to 00:0b:85:5b:a6:e3 (unauthorized port)
[ 197.689989] wlan0: deauthenticated from 00:0b:85:5b:a6:e3 (Reason: 1)
[ 197.690012] phy0: device now idle
[ 197.690047] phy0: Removed STA 00:0b:85:5b:a6:e3
[ 197.717474] phy0: Destroyed STA 00:0b:85:5b:a6:e3
[ 197.805059] wlan0: no IPv6 routers present
[ 197.818000] phy0: device no longer idle - scanning
[ 201.079270] phy0: device now idle
[ 201.084747] phy0: device no longer idle - in use
[ 201.084770] wlan0: direct probe to AP 00:0b:85:5b:a6:ec (try 1)
[ 201.089664] wlan0: direct probe responded
[ 201.089668] wlan0: authenticate with AP 00:0b:85:5b:a6:ec (try 1)
[ 201.092158] wlan0: authenticated
[ 201.092452] wlan0: associate with AP 00:0b:85:5b:a6:ec (try 1)
[ 201.096074] wlan0: RX AssocResp from 00:0b:85:5b:a6:ec (capab=0x431 status=0 aid=52)
[ 201.096081] wlan0: associated
[ 201.096090] phy0: Allocated STA 00:0b:85:5b:a6:ec
[ 201.096552] phy0: Inserted STA 00:0b:85:5b:a6:ec
[ 204.093552] wlan0: deauthenticated from 00:0b:85:5b:a6:ec (Reason: 1)
[ 204.093575] phy0: device now idle
[ 204.093612] phy0: Removed STA 00:0b:85:5b:a6:ec
[ 204.113479] phy0: Destroyed STA 00:0b:85:5b:a6:ec
[ 204.214013] phy0: device no longer idle - scanning
[ 207.471524] phy0: device now idle
[ 207.476732] phy0: device no longer idle - in use
[ 207.476756] wlan0: direct probe to AP 00:0b:85:5b:a6:e3 (try 1)
[ 207.477684] wlan0: direct probe responded
[ 207.477687] wlan0: authenticate with AP 00:0b:85:5b:a6:e3 (try 1)
[ 207.479033] wlan0: authenticated
[ 207.479171] wlan0: associate with AP 00:0b:85:5b:a6:e3 (try 1)
[ 207.480744] wlan0: RX AssocResp from 00:0b:85:5b:a6:e3 (capab=0x11 status=0 aid=72)
[ 207.480748] wlan0: associated
[ 207.480752] phy0: Allocated STA 00:0b:85:5b:a6:e3
[ 207.480965] phy0: Inserted STA 00:0b:85:5b:a6:e3
[ 210.489907] wlan0: deauthenticated from 00:0b:85:5b:a6:e3 (Reason: 1)
[ 210.489930] phy0: device now idle
[ 210.489968] phy0: Removed STA 00:0b:85:5b:a6:e3
[ 210.521484] phy0: Destroyed STA 00:0b:85:5b:a6:e3
[ 210.621987] phy0: device no longer idle - scanning
[ 213.876178] phy0: device now idle
[ 213.879982] phy0: device no longer idle - in use
[ 213.880004] wlan0: direct probe to AP 00:0b:85:5b:8d:6c (try 1)
[ 214.080136] wlan0: direct probe to AP 00:0b:85:5b:8d:6c (try 2)
[ 214.089058] wlan0: direct probe responded
[ 214.089066] wlan0: authenticate with AP 00:0b:85:5b:8d:6c (try 1)
[ 214.107502] wlan0: authenticated
[ 214.107916] wlan0: associate with AP 00:0b:85:5b:8d:6c (try 1)
[ 214.122278] wlan0: RX AssocResp from 00:0b:85:5b:8d:6c (capab=0x401 status=17 aid=0)
[ 214.122285] wlan0: AP denied association (code=17)
Luis
^ permalink raw reply
* Re: odd state reached when AP deauths you after assoc
From: Luis R. Rodriguez @ 2009-10-28 18:47 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <20091028183726.GA4952@tux>
On Wed, Oct 28, 2009 at 11:37 AM, Luis R. Rodriguez
<lrodriguez@atheros.com> wrote:
> I ran into this when ath5k with wpa_supplicant with config file with
> a wrong password against a Cisco AP. It seems the Cisco AP auths you
> and lets you assoc but later it deauths you -- I guess after it
> determines you are auth credentials failed. When this happens I get:
>
> mcgrof@tux ~ $ iw dev wlan0 link
> Authenticated with 00:0b:85:5b:8d:6c (on wlan0)
> Not connected.
So here is the log when using a wrong password against a cisco AP:
[ 1858.773080] phy0: device now idle
[ 1858.776409] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1858.905642] phy0: device no longer idle - scanning
[ 1860.057062] cfg80211: Found new beacon on frequency: 5180 MHz (Ch 36) on phy0
[ 1860.233974] cfg80211: Found new beacon on frequency: 5200 MHz (Ch 40) on phy0
[ 1860.289658] cfg80211: Found new beacon on frequency: 5220 MHz (Ch 44) on phy0
[ 1860.401686] cfg80211: Found new beacon on frequency: 5240 MHz (Ch 48) on phy0
[ 1862.426385] cfg80211: Found new beacon on frequency: 5745 MHz (Ch
149) on phy0
[ 1862.667996] cfg80211: Found new beacon on frequency: 5785 MHz (Ch
157) on phy0
[ 1862.772666] cfg80211: Found new beacon on frequency: 5805 MHz (Ch
161) on phy0
[ 1863.016600] wlan0: direct probe to AP 00:0b:85:5b:a6:ec (try 1)
[ 1863.025332] wlan0: direct probe responded
[ 1863.025340] wlan0: authenticate with AP 00:0b:85:5b:a6:ec (try 1)
[ 1863.029490] wlan0: authenticated
[ 1863.029675] wlan0: associate with AP 00:0b:85:5b:a6:ec (try 1)
[ 1863.044240] wlan0: RX AssocResp from 00:0b:85:5b:a6:ec (capab=0x431
status=0 aid=59)
[ 1863.044248] wlan0: associated
[ 1863.044258] phy0: Allocated STA 00:0b:85:5b:a6:ec
[ 1863.045048] phy0: Inserted STA 00:0b:85:5b:a6:ec
[ 1863.045566] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1863.046086] cfg80211: Calling CRDA for country: US
[ 1863.053060] wlan0: dropped frame to 00:0b:85:5b:a6:ec (unauthorized port)
[ 1863.053242] cfg80211: Received country IE:
[ 1863.053247] cfg80211: Regulatory domain: US
[ 1863.053252] (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 1863.053260] (2402000 KHz - 2477000 KHz @ 40000 KHz), (10000 mBi, 10000 mBm)
[ 1863.053265] cfg80211: CRDA thinks this should applied:
[ 1863.053269] cfg80211: Regulatory domain: US
[ 1863.053273] (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 1863.053281] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 1863.053288] (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[ 1863.053294] (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1863.053301] (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1863.053307] (5651000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1863.053314] (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[ 1863.053319] cfg80211: We intersect both of these and get:
[ 1863.053323] cfg80211: Regulatory domain: 98
[ 1863.053327] (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 1863.053334] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 1863.053344] cfg80211: Disabling channel 2467 MHz on phy0 due to Country IE
[ 1863.053349] cfg80211: Disabling channel 2472 MHz on phy0 due to Country IE
[ 1863.053355] cfg80211: Disabling channel 2484 MHz on phy0 due to Country IE
[ 1863.053361] cfg80211: Leaving channel 5180 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053367] cfg80211: Leaving channel 5200 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053373] cfg80211: Leaving channel 5220 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053379] cfg80211: Leaving channel 5240 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053386] cfg80211: Leaving channel 5260 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053392] cfg80211: Leaving channel 5280 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053398] cfg80211: Leaving channel 5300 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053404] cfg80211: Leaving channel 5320 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053411] cfg80211: Leaving channel 5500 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053417] cfg80211: Leaving channel 5520 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053423] cfg80211: Leaving channel 5540 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053429] cfg80211: Leaving channel 5560 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053435] cfg80211: Leaving channel 5580 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053441] cfg80211: Leaving channel 5600 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053447] cfg80211: Leaving channel 5620 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053454] cfg80211: Leaving channel 5640 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053460] cfg80211: Leaving channel 5660 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053466] cfg80211: Leaving channel 5680 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053472] cfg80211: Leaving channel 5700 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053478] cfg80211: Leaving channel 5745 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053485] cfg80211: Leaving channel 5765 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053491] cfg80211: Leaving channel 5785 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053497] cfg80211: Leaving channel 5805 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053503] cfg80211: Leaving channel 5825 MHz intact on phy0 - no
rule found in band on Country IE
[ 1863.053519] cfg80211: Current regulatory domain updated by AP to: US
[ 1863.053524] (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 1863.053531] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 1863.296154] wlan0: dropped frame to 00:0b:85:5b:a6:ec (unauthorized port)
[ 1864.296183] wlan0: dropped frame to 00:0b:85:5b:a6:ec (unauthorized port)
[ 1866.881205] wlan0: deauthenticated from 00:0b:85:5b:a6:ec (Reason: 1)
[ 1866.881228] phy0: device now idle
[ 1866.881265] phy0: Removed STA 00:0b:85:5b:a6:ec
[ 1866.913511] phy0: Destroyed STA 00:0b:85:5b:a6:ec
[ 1867.013816] phy0: device no longer idle - scanning
[ 1870.268556] phy0: device now idle
[ 1870.272935] phy0: device no longer idle - in use
[ 1870.272957] wlan0: direct probe to AP 00:0b:85:5b:8d:6c (try 1)
[ 1870.468116] wlan0: direct probe to AP 00:0b:85:5b:8d:6c (try 2)
[ 1870.668115] wlan0: direct probe to AP 00:0b:85:5b:8d:6c (try 3)
[ 1870.672686] wlan0: direct probe responded
[ 1870.672693] wlan0: authenticate with AP 00:0b:85:5b:8d:6c (try 1)
[ 1870.674428] wlan0: authenticated
[ 1870.674602] wlan0: associate with AP 00:0b:85:5b:8d:6c (try 1)
[ 1870.677800] wlan0: RX AssocResp from 00:0b:85:5b:8d:6c (capab=0x421
status=17 aid=0)
[ 1870.677807] wlan0: AP denied association (code=17)
[ 1870.679901] wlan0: RX AssocResp from 00:0b:85:5b:8d:6c (capab=0x421
status=17 aid=0)
[ 1870.679908] wlan0: AP denied association (code=17)
[ 1873.297089] wlan0: no IPv6 routers present
This puts the device into a funky state.
This can also be reached even if the AP does not deauth you but instead just
denies association:
This puts the device into a funky state.
This can also be reached even if the AP does not deauth you but instead just
denies association:
[ 1958.579149] cfg80211: Found new beacon on frequency: 5745 MHz (Ch
149) on phy0
[ 1958.820612] cfg80211: Found new beacon on frequency: 5785 MHz (Ch
157) on phy0
[ 1958.953174] cfg80211: Found new beacon on frequency: 5805 MHz (Ch
161) on phy0
[ 1959.167831] wlan0: direct probe to AP 00:0b:85:5b:8d:6c (try 1)
[ 1959.180785] wlan0: direct probe responded
[ 1959.180793] wlan0: authenticate with AP 00:0b:85:5b:8d:6c (try 1)
[ 1959.189268] wlan0: authenticated
[ 1959.189414] wlan0: associate with AP 00:0b:85:5b:8d:6c (try 1)
[ 1959.201056] wlan0: RX AssocResp from 00:0b:85:5b:8d:6c (capab=0x401
status=17 aid=0)
[ 1959.201063] wlan0: AP denied association (code=17)
Luis
^ permalink raw reply
* Re: [RFC] rtl8180: change PCI DMA mask to DMA_BIT_MASK(32) to solve "No suitable DMA available" problems on sparc64.
From: John W. Linville @ 2009-10-28 19:11 UTC (permalink / raw)
To: Tiziano Müller; +Cc: linux-wireless
In-Reply-To: <1252575463.30576.59.camel@localhost>
Can I get a "Signed-off-by:" line from you for this?
Thanks,
John
On Thu, Sep 10, 2009 at 11:37:43AM +0200, Tiziano Müller wrote:
> Hi there
>
> I had problems to get my rtl8185 PCI card running on Sparc64: I always
> got an error about "No suitable DMA available" followed by an error
> that no device could be detected. When comparing the rtl8180 driver to
> others I noticed that others are mostly using DMA_BIT_MASK so I changed
> the custom mask to DMA_BIT_MASK(32) which fixed my issue.
>
> Cheers,
> Tiziano
>
> ---
> drivers/net/wireless/rtl818x/rtl8180_dev.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
> index 16429c4..515f562 100644
> --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
> +++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
> @@ -850,8 +850,8 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
> goto err_free_reg;
> }
>
> - if ((err = pci_set_dma_mask(pdev, 0xFFFFFF00ULL)) ||
> - (err = pci_set_consistent_dma_mask(pdev, 0xFFFFFF00ULL))) {
> + if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) ||
> + (err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))) {
> printk(KERN_ERR "%s (rtl8180): No suitable DMA available\n",
> pci_name(pdev));
> goto err_free_reg;
> --
> 1.6.4
>
>
--
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: 2.6.32-rc5-git3: Reported regressions from 2.6.31
From: John W. Linville @ 2009-10-28 19:05 UTC (permalink / raw)
To: Michael Buesch; +Cc: linux-wireless, Christian Casteyde, Johannes Berg
In-Reply-To: <200910262138.30396.mb@bu3sch.de>
Christian,
Will you be able to test this patch for us?
Thanks,
John
On Mon, Oct 26, 2009 at 09:38:28PM +0100, Michael Buesch wrote:
> On Monday 26 October 2009 20:37:33 Michael Buesch wrote:
> > Ok, it just turns out this actually is a driver bug.
> > Thanks to Johannes Berg for tracking it down.
> >
> > I think it's caused by the DMA bouncebuffer stuff that does not copy the skb->cb
> > and does not adjust the "tx-info" pointer.
> > I wonder why this didn't blow up easlier, because this bug is there since mac80211
> > switched to using the CB.
> >
> > Here's a completely untested patch.
>
> Here's a new version of the patch that also fixes queue mapping bugs:
>
> ---
> drivers/net/wireless/b43/dma.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> --- wireless-testing.orig/drivers/net/wireless/b43/dma.c
> +++ wireless-testing/drivers/net/wireless/b43/dma.c
> @@ -1157,8 +1157,9 @@ struct b43_dmaring *parse_cookie(struct
> }
>
> static int dma_tx_fragment(struct b43_dmaring *ring,
> - struct sk_buff *skb)
> + struct sk_buff **in_skb)
> {
> + struct sk_buff *skb = *in_skb;
> const struct b43_dma_ops *ops = ring->ops;
> struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
> u8 *header;
> @@ -1224,8 +1225,14 @@ static int dma_tx_fragment(struct b43_dm
> }
>
> memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len);
> + memcpy(bounce_skb->cb, skb->cb, sizeof(skb->cb));
> + bounce_skb->dev = skb->dev;
> + skb_set_queue_mapping(bounce_skb, skb_get_queue_mapping(skb));
> + info = IEEE80211_SKB_CB(bounce_skb);
> +
> dev_kfree_skb_any(skb);
> skb = bounce_skb;
> + *in_skb = bounce_skb;
> meta->skb = skb;
> meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
> if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
> @@ -1355,7 +1362,11 @@ int b43_dma_tx(struct b43_wldev *dev, st
> * static, so we don't need to store it per frame. */
> ring->queue_prio = skb_get_queue_mapping(skb);
>
> - err = dma_tx_fragment(ring, skb);
> + /* dma_tx_fragment might reallocate the skb, so invalidate pointers pointing
> + * into the skb data or cb now. */
> + hdr = NULL;
> + info = NULL;
> + err = dma_tx_fragment(ring, &skb);
> if (unlikely(err == -ENOKEY)) {
> /* Drop this packet, as we don't have the encryption key
> * anymore and must not transmit it unencrypted. */
>
>
>
> --
> Greetings, Michael.
>
--
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] rt73usb.c : more ids
From: John W. Linville @ 2009-10-28 19:20 UTC (permalink / raw)
To: Xose Vazquez Perez; +Cc: linux-wireless, users, IvDoorn
In-Reply-To: <4ADC368F.1050709@gmail.com>
On Mon, Oct 19, 2009 at 11:51:11AM +0200, Xose Vazquez Perez wrote:
> hi,
>
> stolen from windows inf file(07/17/2009, 1.03.05.0000)
> Ovislink 0x1b75, 0x7318
> MSI 0x0db0, 0x4600
> WideTell 0x7167, 0x3840
>
>
> -thanks-
>
> regards,
>
> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
>
> --
> «Allá muevan feroz guerra, ciegos reyes por un palmo más de tierra;
> que yo aquí tengo por mío cuanto abarca el mar bravío, a quien nadie
> impuso leyes. Y no hay playa, sea cualquiera, ni bandera de esplendor,
> que no sienta mi derecho y dé pecho a mi valor.»
>
>
> --- o/drivers/net/wireless/rt73usb.c 2009-10-13 12:58:32.042380351 +0200
> +++ n/drivers/net/wireless/rt73usb.c 2009-10-13 13:01:01.073379225 +0200
WTF is this? That's not where that file lives in any tree I have...
I manually applied this one, but in the future please go to the
effort of sending a patch against the sources everyone else is using.
Not sending it as an attachment and not cluttering the changelog
with "hi...thanks, regards..." etc would be appreciated as well.
Maybe you could even read the link I sent you previously...
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: [rt2x00-users] [PATCH] rt2800pci.c : more ids
From: John W. Linville @ 2009-10-28 19:44 UTC (permalink / raw)
To: rt2x00 Users List; +Cc: Xose Vazquez Perez, linux-wireless
In-Reply-To: <200910191931.07361.IvDoorn@gmail.com>
Looks like those IDs were already added by Ivo...
On Mon, Oct 19, 2009 at 07:31:06PM +0200, Ivo van Doorn wrote:
> Hi,
>
> I have merged your previous rt2800pci patch before sending it
> upstream. Please recheck and if required rebase your patch
> to the new version.
>
> Thanks,
>
> Ivo
>
> On Monday 19 October 2009, Xose Vazquez Perez wrote:
> > On 10/13/2009 10:05 AM, Xose Vazquez Perez wrote:
> >
> > > stolen from windows inf file(09/05/2009, 1.04.07.0000)
> > >
> > > 0x1814, 0x3060
> >
> > apply this one instead,
> > got 0x1462,0x89a from linux driver(2009_0903_RT3090_Linux_STA_v2.2.0.1)
> >
> > -thanks-
> >
> > Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
> >
>
>
>
> _______________________________________________
> users mailing list
> users@rt2x00.serialmonkey.com
> http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com
>
--
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] mac80211: make align adjustment code support paged SKB
From: Reinette Chatre @ 2009-10-28 20:13 UTC (permalink / raw)
To: johannes, linville; +Cc: linux-wireless, Zhu Yi, Reinette Chatre
From: Zhu Yi <yi.zhu@intel.com>
This fixed a BUG_ON in __skb_trim() when paged rx is used in
iwlwifi driver. Yes, the whole mac80211 stack doesn't support
paged SKB yet. But let's start the work slowly from small
code snippets.
Reported-and-tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
net/mac80211/rx.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5c385e3..a50d5f3 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1337,10 +1337,10 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
skb = NULL;
} else {
u8 *data = skb->data;
- size_t len = skb->len;
- u8 *new = __skb_push(skb, align);
- memmove(new, data, len);
- __skb_trim(skb, len);
+ size_t len = skb_headlen(skb);
+ skb->data -= align;
+ memmove(skb->data, data, len);
+ skb_set_tail_pointer(skb, len);
}
}
#endif
--
1.5.6.3
^ permalink raw reply related
* Re: [PATCH] mac80211: make align adjustment code support paged SKB
From: Johannes Berg @ 2009-10-28 20:15 UTC (permalink / raw)
To: Reinette Chatre; +Cc: linville, linux-wireless, Zhu Yi
In-Reply-To: <1256760832-29063-1-git-send-email-reinette.chatre@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]
On Wed, 2009-10-28 at 13:13 -0700, Reinette Chatre wrote:
> From: Zhu Yi <yi.zhu@intel.com>
>
> This fixed a BUG_ON in __skb_trim() when paged rx is used in
> iwlwifi driver. Yes, the whole mac80211 stack doesn't support
> paged SKB yet. But let's start the work slowly from small
> code snippets.
>
> Reported-and-tested-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
> Signed-off-by: Zhu Yi <yi.zhu@intel.com>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
we'll also be working on moving more paged RX awareness into the stack
so other drivers can benefit and things get more efficient.
johannes
> ---
> net/mac80211/rx.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 5c385e3..a50d5f3 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1337,10 +1337,10 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
> skb = NULL;
> } else {
> u8 *data = skb->data;
> - size_t len = skb->len;
> - u8 *new = __skb_push(skb, align);
> - memmove(new, data, len);
> - __skb_trim(skb, len);
> + size_t len = skb_headlen(skb);
> + skb->data -= align;
> + memmove(skb->data, data, len);
> + skb_set_tail_pointer(skb, len);
> }
> }
> #endif
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: odd state reached when AP deauths you after assoc
From: Johannes Berg @ 2009-10-28 20:24 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless
In-Reply-To: <20091028183726.GA4952@tux>
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
On Wed, 2009-10-28 at 11:37 -0700, Luis R. Rodriguez wrote:
> I ran into this when ath5k with wpa_supplicant with config file with
> a wrong password against a Cisco AP. It seems the Cisco AP auths you
> and lets you assoc but later it deauths you -- I guess after it
> determines you are auth credentials failed. When this happens I get:
>
> mcgrof@tux ~ $ iw dev wlan0 link
> Authenticated with 00:0b:85:5b:8d:6c (on wlan0)
> Not connected.
I'm guessing that you're using -Dnl80211. You need this patch, or
equivalent:
http://johannes.sipsolutions.net/patches/hostap/all/2009-10-26-12%3a59/deauth-on-disassoc.patch
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: 2.6.32-rc5-git3: Reported regressions from 2.6.31
From: Christian Casteyde @ 2009-10-28 20:38 UTC (permalink / raw)
To: John W. Linville; +Cc: Michael Buesch, linux-wireless, Johannes Berg
In-Reply-To: <20091028190547.GA2856@tuxdriver.com>
I've just tested the patch posted in bugzilla: it works.
That is, I do not manage to get the warning anymore in 3 boots in a row.
CC
Le mercredi 28 octobre 2009 20:05:47, John W. Linville a écrit :
> Christian,
>
> Will you be able to test this patch for us?
>
> Thanks,
>
> John
>
> On Mon, Oct 26, 2009 at 09:38:28PM +0100, Michael Buesch wrote:
> > On Monday 26 October 2009 20:37:33 Michael Buesch wrote:
> > > Ok, it just turns out this actually is a driver bug.
> > > Thanks to Johannes Berg for tracking it down.
> > >
> > > I think it's caused by the DMA bouncebuffer stuff that does not copy
> > > the skb->cb and does not adjust the "tx-info" pointer.
> > > I wonder why this didn't blow up easlier, because this bug is there
> > > since mac80211 switched to using the CB.
> > >
> > > Here's a completely untested patch.
> >
> > Here's a new version of the patch that also fixes queue mapping bugs:
> >
> > ---
> > drivers/net/wireless/b43/dma.c | 15 +++++++++++++--
> > 1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > --- wireless-testing.orig/drivers/net/wireless/b43/dma.c
> > +++ wireless-testing/drivers/net/wireless/b43/dma.c
> > @@ -1157,8 +1157,9 @@ struct b43_dmaring *parse_cookie(struct
> > }
> >
> > static int dma_tx_fragment(struct b43_dmaring *ring,
> > - struct sk_buff *skb)
> > + struct sk_buff **in_skb)
> > {
> > + struct sk_buff *skb = *in_skb;
> > const struct b43_dma_ops *ops = ring->ops;
> > struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
> > u8 *header;
> > @@ -1224,8 +1225,14 @@ static int dma_tx_fragment(struct b43_dm
> > }
> >
> > memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len);
> > + memcpy(bounce_skb->cb, skb->cb, sizeof(skb->cb));
> > + bounce_skb->dev = skb->dev;
> > + skb_set_queue_mapping(bounce_skb, skb_get_queue_mapping(skb));
> > + info = IEEE80211_SKB_CB(bounce_skb);
> > +
> > dev_kfree_skb_any(skb);
> > skb = bounce_skb;
> > + *in_skb = bounce_skb;
> > meta->skb = skb;
> > meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
> > if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
> > @@ -1355,7 +1362,11 @@ int b43_dma_tx(struct b43_wldev *dev, st
> > * static, so we don't need to store it per frame. */
> > ring->queue_prio = skb_get_queue_mapping(skb);
> >
> > - err = dma_tx_fragment(ring, skb);
> > + /* dma_tx_fragment might reallocate the skb, so invalidate pointers
> > pointing + * into the skb data or cb now. */
> > + hdr = NULL;
> > + info = NULL;
> > + err = dma_tx_fragment(ring, &skb);
> > if (unlikely(err == -ENOKEY)) {
> > /* Drop this packet, as we don't have the encryption key
> > * anymore and must not transmit it unencrypted. */
>
^ permalink raw reply
* [RFC] ath9k: update hw configuration for virtual wiphys
From: Luis R. Rodriguez @ 2009-10-28 20:43 UTC (permalink / raw)
To: Jouni.Malinen; +Cc: linux-wireless, ath9k-devel, Luis R. Rodriguez
ath9k supports its own virtual wiphys. The hardware code
relies on the ieee80211_hw for the present interface but
with recent changes introduced the common->hw was never
updated and is required for virtual wiphys.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
Jouni, it seems this the right place for this, do you agree?
drivers/net/wireless/ath/ath9k/virtual.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/virtual.c b/drivers/net/wireless/ath/ath9k/virtual.c
index bc7d173..fe2e300 100644
--- a/drivers/net/wireless/ath/ath9k/virtual.c
+++ b/drivers/net/wireless/ath/ath9k/virtual.c
@@ -298,6 +298,7 @@ static void ath9k_wiphy_unpause_channel(struct ath_softc *sc)
void ath9k_wiphy_chan_work(struct work_struct *work)
{
struct ath_softc *sc = container_of(work, struct ath_softc, chan_work);
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_wiphy *aphy = sc->next_wiphy;
if (aphy == NULL)
@@ -313,6 +314,10 @@ void ath9k_wiphy_chan_work(struct work_struct *work)
/* XXX: remove me eventually */
ath9k_update_ichannel(sc, aphy->hw,
&sc->sc_ah->channels[sc->chan_idx]);
+
+ /* sync hw configuration for hw code */
+ common->hw = aphy->hw;
+
ath_update_chainmask(sc, sc->chan_is_ht);
if (ath_set_channel(sc, aphy->hw,
&sc->sc_ah->channels[sc->chan_idx]) < 0) {
--
1.6.0.4
^ permalink raw reply related
* Re: 2.6.32-rc5-git3: Reported regressions from 2.6.31
From: Michael Buesch @ 2009-10-28 20:57 UTC (permalink / raw)
To: Christian Casteyde; +Cc: John W. Linville, linux-wireless, Johannes Berg
In-Reply-To: <200910282138.37401.casteyde.christian@free.fr>
On Wednesday 28 October 2009 21:38:37 Christian Casteyde wrote:
> I've just tested the patch posted in bugzilla: it works.
> That is, I do not manage to get the warning anymore in 3 boots in a row.
Thanks a lot for testing. I'll resend with proper signoff.
> CC
> Le mercredi 28 octobre 2009 20:05:47, John W. Linville a écrit :
> > Christian,
> >
> > Will you be able to test this patch for us?
> >
> > Thanks,
> >
> > John
> >
> > On Mon, Oct 26, 2009 at 09:38:28PM +0100, Michael Buesch wrote:
> > > On Monday 26 October 2009 20:37:33 Michael Buesch wrote:
> > > > Ok, it just turns out this actually is a driver bug.
> > > > Thanks to Johannes Berg for tracking it down.
> > > >
> > > > I think it's caused by the DMA bouncebuffer stuff that does not copy
> > > > the skb->cb and does not adjust the "tx-info" pointer.
> > > > I wonder why this didn't blow up easlier, because this bug is there
> > > > since mac80211 switched to using the CB.
> > > >
> > > > Here's a completely untested patch.
> > >
> > > Here's a new version of the patch that also fixes queue mapping bugs:
> > >
> > > ---
> > > drivers/net/wireless/b43/dma.c | 15 +++++++++++++--
> > > 1 file changed, 13 insertions(+), 2 deletions(-)
> > >
> > > --- wireless-testing.orig/drivers/net/wireless/b43/dma.c
> > > +++ wireless-testing/drivers/net/wireless/b43/dma.c
> > > @@ -1157,8 +1157,9 @@ struct b43_dmaring *parse_cookie(struct
> > > }
> > >
> > > static int dma_tx_fragment(struct b43_dmaring *ring,
> > > - struct sk_buff *skb)
> > > + struct sk_buff **in_skb)
> > > {
> > > + struct sk_buff *skb = *in_skb;
> > > const struct b43_dma_ops *ops = ring->ops;
> > > struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
> > > u8 *header;
> > > @@ -1224,8 +1225,14 @@ static int dma_tx_fragment(struct b43_dm
> > > }
> > >
> > > memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len);
> > > + memcpy(bounce_skb->cb, skb->cb, sizeof(skb->cb));
> > > + bounce_skb->dev = skb->dev;
> > > + skb_set_queue_mapping(bounce_skb, skb_get_queue_mapping(skb));
> > > + info = IEEE80211_SKB_CB(bounce_skb);
> > > +
> > > dev_kfree_skb_any(skb);
> > > skb = bounce_skb;
> > > + *in_skb = bounce_skb;
> > > meta->skb = skb;
> > > meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
> > > if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
> > > @@ -1355,7 +1362,11 @@ int b43_dma_tx(struct b43_wldev *dev, st
> > > * static, so we don't need to store it per frame. */
> > > ring->queue_prio = skb_get_queue_mapping(skb);
> > >
> > > - err = dma_tx_fragment(ring, skb);
> > > + /* dma_tx_fragment might reallocate the skb, so invalidate pointers
> > > pointing + * into the skb data or cb now. */
> > > + hdr = NULL;
> > > + info = NULL;
> > > + err = dma_tx_fragment(ring, &skb);
> > > if (unlikely(err == -ENOKEY)) {
> > > /* Drop this packet, as we don't have the encryption key
> > > * anymore and must not transmit it unencrypted. */
> >
>
>
--
Greetings, Michael.
^ permalink raw reply
* pull request: wireless-2.6 2009-10-28
From: John W. Linville @ 2009-10-28 20:53 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
Here is a collection of fixes (mostly (almost-)one-liners) intended
for 2.6.32. There are a couple of fixes relating to behavior when an
association failes, as well as spelling fixes, simply endian fixes,
a MAINTAINERS change...I don't think there is anything controversial
here...
Please let me know if there are problems!
Thanks,
John
---
Individual patches are available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/
---
The following changes since commit 66ed1e5ec1d979e572554643063734a7664261bb:
Eric Dumazet (1):
pktgen: Dont leak kernel memory
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git master
Andrey Yurovsky (1):
mac80211: trivial: fix spelling in mesh_hwmp
Bartlomiej Zolnierkiewicz (1):
MAINTAINERS: rt2x00 list is moderated
Benoit PAPILLAULT (1):
rt2x00: Fix crypto in TX frame for rt2800usb
Björn Smedman (1):
mac80211: fix for incorrect sequence number on hostapd injected frames
Holger Schurig (1):
libertas spi: fix sparse errors
Johannes Berg (2):
mac80211: keep auth state when assoc fails
cfg80211: sme: deauthenticate on assoc failure
Larry Finger (1):
b43: Fix Bugzilla #14181 and the bug from the previous 'fix'
Miguel Boton (1):
b43: add 'struct b43_wl' missing declaration
Reinette Chatre (1):
mac80211: fix ibss joining
Roel Kluin (1):
airo: Reorder tests, check bounds before element
MAINTAINERS | 2 +-
drivers/net/wireless/airo.c | 5 ++---
drivers/net/wireless/b43/leds.h | 1 +
drivers/net/wireless/b43/main.c | 1 -
drivers/net/wireless/b43/rfkill.c | 3 ++-
drivers/net/wireless/libertas/if_spi.c | 10 +++++-----
drivers/net/wireless/rt2x00/rt2800usb.c | 2 +-
net/mac80211/ibss.c | 6 ++----
net/mac80211/mesh_hwmp.c | 2 +-
net/mac80211/mlme.c | 3 +--
net/mac80211/tx.c | 2 +-
net/wireless/core.h | 1 +
net/wireless/mlme.c | 9 +++++++++
net/wireless/sme.c | 21 +++++++++++++++++++--
14 files changed, 46 insertions(+), 22 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 70bc7de..cdbbaf5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4280,7 +4280,7 @@ F: drivers/video/aty/aty128fb.c
RALINK RT2X00 WIRELESS LAN DRIVER
P: rt2x00 project
L: linux-wireless@vger.kernel.org
-L: users@rt2x00.serialmonkey.com
+L: users@rt2x00.serialmonkey.com (moderated for non-subscribers)
W: http://rt2x00.serialmonkey.com/
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 7116a1a..abf896a 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -4790,9 +4790,8 @@ static int proc_stats_rid_open( struct inode *inode,
static int get_dec_u16( char *buffer, int *start, int limit ) {
u16 value;
int valid = 0;
- for( value = 0; buffer[*start] >= '0' &&
- buffer[*start] <= '9' &&
- *start < limit; (*start)++ ) {
+ for (value = 0; *start < limit && buffer[*start] >= '0' &&
+ buffer[*start] <= '9'; (*start)++) {
valid = 1;
value *= 10;
value += buffer[*start] - '0';
diff --git a/drivers/net/wireless/b43/leds.h b/drivers/net/wireless/b43/leds.h
index 4c56187..32b66d5 100644
--- a/drivers/net/wireless/b43/leds.h
+++ b/drivers/net/wireless/b43/leds.h
@@ -1,6 +1,7 @@
#ifndef B43_LEDS_H_
#define B43_LEDS_H_
+struct b43_wl;
struct b43_wldev;
#ifdef CONFIG_B43_LEDS
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index df6b26a..86f3582 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4501,7 +4501,6 @@ static void b43_op_stop(struct ieee80211_hw *hw)
cancel_work_sync(&(wl->beacon_update_trigger));
- wiphy_rfkill_stop_polling(hw->wiphy);
mutex_lock(&wl->mutex);
if (b43_status(dev) >= B43_STAT_STARTED) {
dev = b43_wireless_core_stop(dev);
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c
index 7a3218c..ffdce6f 100644
--- a/drivers/net/wireless/b43/rfkill.c
+++ b/drivers/net/wireless/b43/rfkill.c
@@ -33,7 +33,8 @@ bool b43_is_hw_radio_enabled(struct b43_wldev *dev)
& B43_MMIO_RADIO_HWENABLED_HI_MASK))
return 1;
} else {
- if (b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
+ if (b43_status(dev) >= B43_STAT_STARTED &&
+ b43_read16(dev, B43_MMIO_RADIO_HWENABLED_LO)
& B43_MMIO_RADIO_HWENABLED_LO_MASK)
return 1;
}
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index cb8be8d..5b3672c 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -134,7 +134,7 @@ static void spu_transaction_finish(struct if_spi_card *card)
static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
{
int err = 0;
- u16 reg_out = cpu_to_le16(reg | IF_SPI_WRITE_OPERATION_MASK);
+ __le16 reg_out = cpu_to_le16(reg | IF_SPI_WRITE_OPERATION_MASK);
struct spi_message m;
struct spi_transfer reg_trans;
struct spi_transfer data_trans;
@@ -166,7 +166,7 @@ static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
static inline int spu_write_u16(struct if_spi_card *card, u16 reg, u16 val)
{
- u16 buff;
+ __le16 buff;
buff = cpu_to_le16(val);
return spu_write(card, reg, (u8 *)&buff, sizeof(u16));
@@ -188,7 +188,7 @@ static int spu_read(struct if_spi_card *card, u16 reg, u8 *buf, int len)
{
unsigned int delay;
int err = 0;
- u16 reg_out = cpu_to_le16(reg | IF_SPI_READ_OPERATION_MASK);
+ __le16 reg_out = cpu_to_le16(reg | IF_SPI_READ_OPERATION_MASK);
struct spi_message m;
struct spi_transfer reg_trans;
struct spi_transfer dummy_trans;
@@ -235,7 +235,7 @@ static int spu_read(struct if_spi_card *card, u16 reg, u8 *buf, int len)
/* Read 16 bits from an SPI register */
static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
{
- u16 buf;
+ __le16 buf;
int ret;
ret = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
@@ -248,7 +248,7 @@ static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
* The low 16 bits are read first. */
static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val)
{
- u32 buf;
+ __le32 buf;
int err;
err = spu_read(card, reg, (u8 *)&buf, sizeof(buf));
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index a084077..9fe770f 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1994,7 +1994,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size);
rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID,
test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ?
- (skbdesc->entry->entry_idx + 1) : 0xff);
+ txdesc->key_idx : 0xff);
rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
skb->len - txdesc->l2pad);
rt2x00_set_field32(&word, TXWI_W1_PACKETID,
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 6eaf698..ca8ecce 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -538,13 +538,12 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
WLAN_CAPABILITY_PRIVACY,
capability);
+ if (bss) {
#ifdef CONFIG_MAC80211_IBSS_DEBUG
- if (bss)
printk(KERN_DEBUG " sta_find_ibss: selected %pM current "
"%pM\n", bss->cbss.bssid, ifibss->bssid);
#endif /* CONFIG_MAC80211_IBSS_DEBUG */
- if (bss && !memcmp(ifibss->bssid, bss->cbss.bssid, ETH_ALEN)) {
printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM"
" based on configured SSID\n",
sdata->dev->name, bss->cbss.bssid);
@@ -552,8 +551,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
ieee80211_sta_join_ibss(sdata, bss);
ieee80211_rx_bss_put(local, bss);
return;
- } else if (bss)
- ieee80211_rx_bss_put(local, bss);
+ }
#ifdef CONFIG_MAC80211_IBSS_DEBUG
printk(KERN_DEBUG " did not try to join ibss\n");
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index e12a786..29b82e9 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -259,7 +259,7 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,
* @hwmp_ie: hwmp information element (PREP or PREQ)
*
* This function updates the path routing information to the originator and the
- * transmitter of a HWMP PREQ or PREP fram.
+ * transmitter of a HWMP PREQ or PREP frame.
*
* Returns: metric to frame originator or 0 if the frame should not be further
* processed
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 8d26e9b..dc5049d 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1457,8 +1457,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
if (status_code != WLAN_STATUS_SUCCESS) {
printk(KERN_DEBUG "%s: AP denied association (code=%d)\n",
sdata->dev->name, status_code);
- list_del(&wk->list);
- kfree(wk);
+ wk->state = IEEE80211_MGD_STATE_IDLE;
return RX_MGMT_CFG80211_ASSOC;
}
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index db4bda6..eaa4118 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1445,7 +1445,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
continue;
if (compare_ether_addr(tmp_sdata->dev->dev_addr,
- hdr->addr2)) {
+ hdr->addr2) == 0) {
dev_hold(tmp_sdata->dev);
dev_put(sdata->dev);
sdata = tmp_sdata;
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 2a33d8b..68b3219 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -358,6 +358,7 @@ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev);
void cfg80211_conn_work(struct work_struct *work);
+void cfg80211_sme_failed_assoc(struct wireless_dev *wdev);
bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev);
/* internal helpers */
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 79d2eec..0a6b7a0 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -62,6 +62,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
u8 *ie = mgmt->u.assoc_resp.variable;
int i, ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
struct cfg80211_internal_bss *bss = NULL;
+ bool need_connect_result = true;
wdev_lock(wdev);
@@ -94,6 +95,14 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len)
}
WARN_ON(!bss);
+ } else if (wdev->conn) {
+ cfg80211_sme_failed_assoc(wdev);
+ need_connect_result = false;
+ /*
+ * do not call connect_result() now because the
+ * sme will schedule work that does it later.
+ */
+ goto out;
}
if (!wdev->conn && wdev->sme_state == CFG80211_SME_IDLE) {
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 93c3ed3..ece378d 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -26,6 +26,7 @@ struct cfg80211_conn {
CFG80211_CONN_AUTHENTICATING,
CFG80211_CONN_ASSOCIATE_NEXT,
CFG80211_CONN_ASSOCIATING,
+ CFG80211_CONN_DEAUTH_ASSOC_FAIL,
} state;
u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
u8 *ie;
@@ -148,6 +149,12 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev)
NULL, 0,
WLAN_REASON_DEAUTH_LEAVING);
return err;
+ case CFG80211_CONN_DEAUTH_ASSOC_FAIL:
+ __cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
+ NULL, 0,
+ WLAN_REASON_DEAUTH_LEAVING);
+ /* return an error so that we call __cfg80211_connect_result() */
+ return -EINVAL;
default:
return 0;
}
@@ -158,6 +165,7 @@ void cfg80211_conn_work(struct work_struct *work)
struct cfg80211_registered_device *rdev =
container_of(work, struct cfg80211_registered_device, conn_work);
struct wireless_dev *wdev;
+ u8 bssid[ETH_ALEN];
rtnl_lock();
cfg80211_lock_rdev(rdev);
@@ -173,10 +181,10 @@ void cfg80211_conn_work(struct work_struct *work)
wdev_unlock(wdev);
continue;
}
+ memcpy(bssid, wdev->conn->params.bssid, ETH_ALEN);
if (cfg80211_conn_do_work(wdev))
__cfg80211_connect_result(
- wdev->netdev,
- wdev->conn->params.bssid,
+ wdev->netdev, bssid,
NULL, 0, NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE,
false, NULL);
@@ -337,6 +345,15 @@ bool cfg80211_sme_failed_reassoc(struct wireless_dev *wdev)
return true;
}
+void cfg80211_sme_failed_assoc(struct wireless_dev *wdev)
+{
+ struct wiphy *wiphy = wdev->wiphy;
+ struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
+
+ wdev->conn->state = CFG80211_CONN_DEAUTH_ASSOC_FAIL;
+ schedule_work(&rdev->conn_work);
+}
+
void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
const u8 *req_ie, size_t req_ie_len,
const u8 *resp_ie, size_t resp_ie_len,
--
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 related
* [PATCH] b43: Fix DMA TX bounce buffer copying
From: Michael Buesch @ 2009-10-28 21:08 UTC (permalink / raw)
To: linville; +Cc: bcm43xx-dev, linux-wireless, Larry Finger, Christian Casteyde
b43 allocates a bouncebuffer, if the supplied TX skb is in an invalid
memory range for DMA.
However, this is broken in that it fails to copy over some metadata to the
new skb.
This patch fixes three problems:
* Failure to adjust the ieee80211_tx_info pointer to the new buffer.
This results in a kmemcheck warning.
* Failure to copy the skb cb, which contains ieee80211_tx_info, to the new skb.
This results in breakage of various TX-status postprocessing (Rate control).
* Failure to transfer the queue mapping.
This results in the wrong queue being stopped on saturation and can result in queue overflow.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Christian Casteyde <casteyde.christian@free.fr>
---
Thanks to Johannes for tracking down this hard to find bug and
thanks to Christian for testing.
Larry, I think I remember you reported a strange rate control failure on
one of your cards. Does this patch fix it?
b43legacy:
Note that b43legacy has the same bug and also needs fixing.
Is there a maintainer for b43legacy?
stable:
I'm not sure if it's necessary to send this patch to stable.
The problem is there since the very beginning and it doesn't affect many people.
I'll leave this decision to somebody else, if somebody cares.
---
drivers/net/wireless/b43/dma.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
--- wireless-testing.orig/drivers/net/wireless/b43/dma.c
+++ wireless-testing/drivers/net/wireless/b43/dma.c
@@ -1157,8 +1157,9 @@ struct b43_dmaring *parse_cookie(struct
}
static int dma_tx_fragment(struct b43_dmaring *ring,
- struct sk_buff *skb)
+ struct sk_buff **in_skb)
{
+ struct sk_buff *skb = *in_skb;
const struct b43_dma_ops *ops = ring->ops;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
u8 *header;
@@ -1224,8 +1225,14 @@ static int dma_tx_fragment(struct b43_dm
}
memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len);
+ memcpy(bounce_skb->cb, skb->cb, sizeof(skb->cb));
+ bounce_skb->dev = skb->dev;
+ skb_set_queue_mapping(bounce_skb, skb_get_queue_mapping(skb));
+ info = IEEE80211_SKB_CB(bounce_skb);
+
dev_kfree_skb_any(skb);
skb = bounce_skb;
+ *in_skb = bounce_skb;
meta->skb = skb;
meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
@@ -1355,7 +1362,11 @@ int b43_dma_tx(struct b43_wldev *dev, st
* static, so we don't need to store it per frame. */
ring->queue_prio = skb_get_queue_mapping(skb);
- err = dma_tx_fragment(ring, skb);
+ /* dma_tx_fragment might reallocate the skb, so invalidate pointers pointing
+ * into the skb data or cb now. */
+ hdr = NULL;
+ info = NULL;
+ err = dma_tx_fragment(ring, &skb);
if (unlikely(err == -ENOKEY)) {
/* Drop this packet, as we don't have the encryption key
* anymore and must not transmit it unencrypted. */
--
Greetings, Michael.
^ permalink raw reply
* pull request: wireless-next-2.6 2009-10-28
From: John W. Linville @ 2009-10-28 21:10 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
Dave,
I let my patches pile-up! Yikes!!
This request includes the usual ton of stuff for -next -- driver
updates, fixes for some earlier -next stuff, a few cfg80211 changes to
accomodate the libertas driver, etc. Of note is the rt2800pci support
added to the rt2x00 family.
Pleaset let me know if there are problems!
Thanks,
John
---
Individual patches are available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6/
---
The following changes since commit b37b62fea1d1bf68ca51818f8eb1035188efd030:
Ben Hutchings (1):
sfc: Rename 'xfp' file and functions to reflect reality
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master
Abhijeet Kolekar (5):
iwlwifi/iwl3945: unify rts_tx_cmd_flag
iwl3945: rename tx to tx_cmd
iwlwifi/iwl3945: remove data_retry_limit
iwl3945: rearrange the code.
iwl3945: disable all tx fifos
Amitkumar Karwar (1):
libertas: Check return status of command functions
Ben M Cahill (8):
iwl3945: update iwl3945_apm_init()
iwlwifi: turn off device when not used.
iwl3945: remove unnecessary call to apm_ops.reset()
iwlagn, iwl3945: remove apm_reset() functions
iwl3945: streamline iwl3945_rfkill_poll()
iwl3945: move iwl_power_initialize()
iwlwifi: consolidate apm_init() functions
iwlwifi: make sure device is reset when unloading driver
Benoit PAPILLAULT (1):
zd1211rw: Fix TX status reporting in order to have proper rate control
Bob Copeland (1):
ath5k: use noise calibration from madwifi hal
Christian Lamparter (3):
ar9170: atomic pending A-MPDU counter
ar9170usb: atomic pending urbs counter
ar9170: don't filter BlockACK frames
David Kilroy (1):
orinoco: use cfg80211 ethtool ops
David-John Willis (1):
wl1251: add support for PG11 chips.
Holger Schurig (22):
cfg80211: no cookies in cfg80211_send_XXX()
cfg80211: remove warning in deauth case
libertas: make __lbs_cmd_async() non-static
libertas: cleanup host.h and hostcmd.h
libertas: harmonize cmd.h
libertas: make lbs_get_channel() static
libertas: remove unused lbs_cmd_802_11_inactivity_timeout()
libertas: remove unused 11d code
libertas: remove unused 11d.h as well, priv->countryinfo
libertas: change IW_ESSID_MAX_SIZE -> IEEE80211_MAX_SSID_LEN
libertas: move scan/assoc related stuff
libertas: sort variables in struct lbs_private
libertas: get current channel out of priv->curbssparams
libertas: move association related commands into assoc.c
libertas: move lbs_send_iwevcustom_event() to wext.c
libertas: remove handling for CMD_802_11_LED_GPIO_CTRL
libertas: remove handling for CMD_GET_TSF
libertas: remove "struct cmd_ds_gen"
libertas: move SIOCGIWAP calls to wext.c
libertas: move mic failure event to wext.c
libertas: sort and categorize entries in decl.h
libertas: remove some references to IW_MODE_abc
Ivo van Doorn (2):
rt2x00: Add rt2x00soc bus module
rt2x00: Implement support for rt2800pci
Javier Cardona (1):
mac80211: Learn about mesh portals from multicast traffic
Jay Sternberg (1):
iwlwifi: add missing commands to syslog messages
John W. Linville (3):
mac80211: replace netif_tx_{start,stop,wake}_all_queues
b43: use ieee80211_rx_ni()
wl1251: re-disable PG10 chips
Juuso Oikarinen (44):
wl1271: Correction to TX block allocation calculation
wl1271: Security sequence number handling for TX (for WPA)
wl1271: Correct TKIP header space handling in TX path
wl1271: Implement delayed entry into ELP
wl1271: mask aid bits 14 and 15 in ps-poll template
wl1271: Implementation for SPI busy word checking
wl1271: Configure rate policies based on AP rates
wl1271: Update join usage
wl1271: Corrections to TX path
wl1271: use workqueue provided by mac80211 instead of the default
wl1271: Clear probe-request template after scan
wl1271: Multicast filtering configuration
wl1271: Use vmalloc to allocate memory for firmware
wl1271: Add connection monitoring configuration
wl1271: Enable beacon filtering with the stack
wl1271: Configure beacon filtering on if PSM used
wl1271: Mask unneeded events from firmware to conserve power
wl1271: Update memory mapping for firmware revision 6.1.0.0.241
wl1271: Remove RX workaround
wl1271: Add top-register access functions
wl1271: RefClk configuration
wl1271: Update interrupt handling by removing an extra SPI read
wl1271: Enable ELP
wl1271: Enable smart reflex
wl1271: Update TX path block calucation algo
wl1271: Remove outdated SPI functions
wl1271: Update boot time configuration for the new firmware
wl1271: Workaround for reference clock setting on boot.
wl1271: Add structure for firmware configuration values
wl1271: Add config structure for RX path parameters
wl1271: Add config structure for TX path parameters
wl1271: Add config structure for connection management parameters
wl1271: Add config structure for FW init parameters
wl1271: Move default FW config struct away from stack
wl1271: Fix IRQ enable handling on FW init failure
wl1271: Implement beacon early termination support
wl1271: Remove busy-word checking
wl1271: Fix multicast list handling
wl1271: Fix event handling mechanism
wl1271: Support for IPv4 ARP filtering
wl1271: Remove unnecessary rx_descriptor memory allocation
wl1271: Correct memory handling for FW boot
wl1271: Fix filter configuration
wl1271: Set IEEE80211_FCTL_TODS in the null data template
Kalle Valo (3):
wl1251: rename spi device to wl1251
mac80211: add ieee80211_rx_ni()
wl1251: use ieee80211_rx_ni()
Luciano Coelho (15):
wl1271: remove unecessary qual parameter from rx status
wl1271: added Juuso Oikarinen as module author
wl1271: hack to disable filters
wl1271: implement cmd_disconnect
wl1271: workaround to send a disconnect before rejoining
wl1271: add workaround to avoid distortion due to excessive tx power
wl1271: enable HW_AVAILABLE interrupt to fix ELP
wl1271: use acx_rx_config instead of join when updating filters
wl1271: remove unnecessary joins and join only when the bssid changes
wl1271: make sure PS is disabled in PLT
wl1271: fix sparse warnings about undeclared functions
wl1271: added missing packed modifier in some acx structs
wl1271: fix endianess issues
wl1271: added missing packed modifier in some cmd structs
wl1271: use ieee80211_rx_ni()
Luis R. Rodriguez (2):
ath9k_hw: run the carrier leakage calibration fix for ar9271 as well
ath9k_hw: run ath9k_hw_9271_pa_cal() initial calibration
Marek Lindner (1):
ath9k: adjust ahb callbacks to new struct layout to avoid compile errors
Matthieu CASTET (1):
airo : allow supend with card without power management
Michael Buesch (4):
b43/legacy: Fix usage of host_pci pointer
ssb: Put host pointers into a union
b43: Remove me as maintainer
b43: Optimize PIO scratchbuffer usage
Reinette Chatre (5):
iwlwifi: fix userspace setting of sleep_level_override
iwlwifi: move iwl_setup_mac to iwlagn
iwlwifi: move rate scaling structures to header file
iwlagn: store station rate scale information in mac80211 station structure
iwlwifi: remove duplicate defines
Rui Paulo (1):
mesh: use set_bit() to set MESH_WORK_HOUSEKEEPING.
Samuel Ortiz (13):
iwmc3200wifi: WPS support
iwmc3200wifi: CT kill support
iwmc3200wifi: Profile flags can be WPA1 or WPA2 not both
iwmc3200wifi: Improve rx debug
iwmc3200wifi: Update statistics notification structure
iwmc3200wifi: Update fixed size config definitions
iwmc3200wifi: Tx power setting
iwmc3200wifi: SDIO disable race fix
iwmc3200wifi: Check for cmd pointer before dereferencing it
iwmc3200wifi: Do not handle wifi command if the interface is not ready
iwmc3200wifi: Try shared auth when open WEP fails
iwmc3200wifi: Support unexpected reboot barker
iwmc3200wifi: Set wiphy firmware version
Sujith (1):
ath9k: Fix TX hang poll routine
Teemu Paasikivi (5):
wl1271: Added 5 GHz parameters for wl1273
wl1271: Scan only enabled channels
wl1271: Added support to scan on 5 GHz band
wl1271: Added 5 GHz support to join and rx
wl1271: Checking of rx descriptor status fixed
Vivek Natarajan (1):
ath: Updates for regulatory and country codes.
Wey-Yi Guy (23):
iwlwifi: remove duplicated/unused definition
iwlwifi: additional items in sensitivity range table
iwlwifi: dynamic allocate tx queue structure
iwlwifi: showing accumulative ucode statistics counters
iwlwifi: update channel switch command API
iwlwifi: show current power save status reported by uCode
iwlwifi: identify eeprom version for 6x50 series NIC
iwlwifi: fix incorrect otp blocks number for 6x50 series
iwlwifi: set auto clock gate disable bit for 6x00/6x50 series
iwlwifi: no chain noise support for 6x50 series
iwlwifi: rework for static power save
iwlwifi: fix gain computation for 5000 series and up
iwlwifi: separate led function from statistic notification
iwlwifi: update bt co-exit configuration parameter
iwlwifi: specify the valid tx/rx chain in device config structure
iwlwifi: increase max tfd payload size
iwlwifi: choose thermal throttle method based on device config
iwlwifi: issue ct_kill host command based on device config
iwlwifi: add channel switch support to 5000 series and up
iwlwifi: remove unused parameters
iwlwifi: remove duplicated define
iwlwifi: update lowest API version support for 6x00 & 6x50 series
iwlwifi: minor comments changes for wimax co-exist command
Zhu Yi (6):
iwlwifi: use paged Rx
iwmc3200wifi: add BGN sdio device id
iwmc3200wifi: allow joining an existed IBSS network
iwmc3200wifi: handle coexistence radio notification
iwlwifi: fix use after free bug for paged rx
iwlwifi: reuse page for notification packets
MAINTAINERS | 1 -
drivers/net/wireless/airo.c | 3 +-
drivers/net/wireless/ath/ar9170/ar9170.h | 2 +-
drivers/net/wireless/ath/ar9170/hw.h | 4 +-
drivers/net/wireless/ath/ar9170/main.c | 11 +-
drivers/net/wireless/ath/ar9170/usb.c | 12 +-
drivers/net/wireless/ath/ar9170/usb.h | 2 +-
drivers/net/wireless/ath/ath5k/ath5k.h | 13 +
drivers/net/wireless/ath/ath5k/attach.c | 2 +
drivers/net/wireless/ath/ath5k/phy.c | 185 +-
drivers/net/wireless/ath/ath5k/reg.h | 11 +-
drivers/net/wireless/ath/ath5k/reset.c | 17 +-
drivers/net/wireless/ath/ath9k/ahb.c | 6 +-
drivers/net/wireless/ath/ath9k/calib.c | 28 +-
drivers/net/wireless/ath/ath9k/xmit.c | 2 +
drivers/net/wireless/ath/regd.h | 8 +
drivers/net/wireless/ath/regd_common.h | 32 +-
drivers/net/wireless/b43/b43.h | 16 +-
drivers/net/wireless/b43/main.c | 4 +-
drivers/net/wireless/b43/pio.c | 79 +-
drivers/net/wireless/b43/xmit.c | 7 +-
drivers/net/wireless/b43legacy/main.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 17 +-
drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 12 -
drivers/net/wireless/iwlwifi/iwl-3945.c | 237 +-
drivers/net/wireless/iwlwifi/iwl-3945.h | 8 -
drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 3 -
drivers/net/wireless/iwlwifi/iwl-4965.c | 172 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 219 +-
drivers/net/wireless/iwlwifi/iwl-6000.c | 172 ++-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 108 +-
drivers/net/wireless/iwlwifi/iwl-agn-rs.h | 101 +
drivers/net/wireless/iwlwifi/iwl-agn.c | 154 +-
drivers/net/wireless/iwlwifi/iwl-calib.c | 9 +-
drivers/net/wireless/iwlwifi/iwl-commands.h | 79 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 260 ++-
drivers/net/wireless/iwlwifi/iwl-core.h | 24 +-
drivers/net/wireless/iwlwifi/iwl-csr.h | 11 +-
drivers/net/wireless/iwlwifi/iwl-debug.h | 1 +
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 676 ++++--
drivers/net/wireless/iwlwifi/iwl-dev.h | 82 +-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 8 +
drivers/net/wireless/iwlwifi/iwl-eeprom.h | 5 +-
drivers/net/wireless/iwlwifi/iwl-hcmd.c | 23 +-
drivers/net/wireless/iwlwifi/iwl-power.c | 83 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 177 +-
drivers/net/wireless/iwlwifi/iwl-scan.c | 20 +-
drivers/net/wireless/iwlwifi/iwl-spectrum.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-sta.c | 62 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 45 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 266 ++-
drivers/net/wireless/iwmc3200wifi/cfg80211.c | 47 +-
drivers/net/wireless/iwmc3200wifi/commands.c | 31 +-
drivers/net/wireless/iwmc3200wifi/commands.h | 70 +-
drivers/net/wireless/iwmc3200wifi/fw.c | 9 +
drivers/net/wireless/iwmc3200wifi/iwm.h | 6 +
drivers/net/wireless/iwmc3200wifi/lmac.h | 8 +
drivers/net/wireless/iwmc3200wifi/main.c | 46 +
drivers/net/wireless/iwmc3200wifi/netdev.c | 1 +
drivers/net/wireless/iwmc3200wifi/rx.c | 84 +-
drivers/net/wireless/iwmc3200wifi/sdio.c | 10 +-
drivers/net/wireless/iwmc3200wifi/umac.h | 5 +
drivers/net/wireless/libertas/11d.c | 696 ------
drivers/net/wireless/libertas/11d.h | 105 -
drivers/net/wireless/libertas/Makefile | 1 -
drivers/net/wireless/libertas/assoc.c | 445 ++++-
drivers/net/wireless/libertas/assoc.h | 141 ++-
drivers/net/wireless/libertas/cmd.c | 482 +----
drivers/net/wireless/libertas/cmd.h | 127 +-
drivers/net/wireless/libertas/cmdresp.c | 104 +-
drivers/net/wireless/libertas/debugfs.c | 27 +-
drivers/net/wireless/libertas/decl.h | 62 +-
drivers/net/wireless/libertas/defs.h | 1 -
drivers/net/wireless/libertas/dev.h | 424 +---
drivers/net/wireless/libertas/host.h | 960 +++++++--
drivers/net/wireless/libertas/hostcmd.h | 800 -------
drivers/net/wireless/libertas/main.c | 202 +--
drivers/net/wireless/libertas/persistcfg.c | 8 +-
drivers/net/wireless/libertas/rx.c | 2 +-
drivers/net/wireless/libertas/scan.c | 250 ++-
drivers/net/wireless/libertas/scan.h | 30 +
drivers/net/wireless/libertas/tx.c | 2 +-
drivers/net/wireless/libertas/types.h | 4 +-
drivers/net/wireless/libertas/wext.c | 144 +-
drivers/net/wireless/libertas/wext.h | 8 +
drivers/net/wireless/orinoco/hw.c | 33 +-
drivers/net/wireless/orinoco/hw.h | 3 +-
drivers/net/wireless/orinoco/main.c | 33 +-
drivers/net/wireless/orinoco/orinoco.h | 1 -
drivers/net/wireless/rt2x00/Kconfig | 30 +
drivers/net/wireless/rt2x00/Makefile | 2 +
drivers/net/wireless/rt2x00/rt2800pci.c | 3323 ++++++++++++++++++++++++++
drivers/net/wireless/rt2x00/rt2800pci.h | 1960 +++++++++++++++
drivers/net/wireless/rt2x00/rt2x00.h | 7 +
drivers/net/wireless/rt2x00/rt2x00soc.c | 159 ++
drivers/net/wireless/rt2x00/rt2x00soc.h | 52 +
drivers/net/wireless/wl12xx/wl1251_main.c | 7 +-
drivers/net/wireless/wl12xx/wl1251_rx.c | 2 +-
drivers/net/wireless/wl12xx/wl1251_spi.c | 2 +-
drivers/net/wireless/wl12xx/wl1271.h | 92 +-
drivers/net/wireless/wl12xx/wl1271_acx.c | 369 +++-
drivers/net/wireless/wl12xx/wl1271_acx.h | 586 ++---
drivers/net/wireless/wl12xx/wl1271_boot.c | 215 +-
drivers/net/wireless/wl12xx/wl1271_boot.h | 22 +-
drivers/net/wireless/wl12xx/wl1271_cmd.c | 329 ++-
drivers/net/wireless/wl12xx/wl1271_cmd.h | 115 +-
drivers/net/wireless/wl12xx/wl1271_conf.h | 911 +++++++
drivers/net/wireless/wl12xx/wl1271_event.c | 64 +-
drivers/net/wireless/wl12xx/wl1271_event.h | 30 +-
drivers/net/wireless/wl12xx/wl1271_init.c | 155 +-
drivers/net/wireless/wl12xx/wl1271_init.h | 53 +-
drivers/net/wireless/wl12xx/wl1271_main.c | 963 ++++++--
drivers/net/wireless/wl12xx/wl1271_ps.c | 68 +-
drivers/net/wireless/wl12xx/wl1271_ps.h | 2 +-
drivers/net/wireless/wl12xx/wl1271_reg.h | 47 +-
drivers/net/wireless/wl12xx/wl1271_rx.c | 86 +-
drivers/net/wireless/wl12xx/wl1271_rx.h | 4 +-
drivers/net/wireless/wl12xx/wl1271_spi.c | 311 ++--
drivers/net/wireless/wl12xx/wl1271_spi.h | 65 +-
drivers/net/wireless/wl12xx/wl1271_tx.c | 76 +-
drivers/net/wireless/wl12xx/wl1271_tx.h | 18 +-
drivers/net/wireless/wl12xx/wl12xx_80211.h | 4 +-
drivers/net/wireless/zd1211rw/zd_chip.c | 4 +-
drivers/net/wireless/zd1211rw/zd_chip.h | 18 +-
drivers/net/wireless/zd1211rw/zd_mac.c | 202 ++-
drivers/net/wireless/zd1211rw/zd_mac.h | 25 +-
drivers/net/wireless/zd1211rw/zd_usb.c | 4 +-
drivers/ssb/driver_pcicore.c | 4 +-
include/linux/ssb/ssb.h | 20 +-
include/net/cfg80211.h | 31 +-
include/net/mac80211.h | 32 +-
net/mac80211/iface.c | 4 +-
net/mac80211/mesh.c | 4 +-
net/mac80211/mlme.c | 22 +-
net/mac80211/rx.c | 21 +-
net/mac80211/scan.c | 10 +-
net/wireless/mlme.c | 45 +-
137 files changed, 13469 insertions(+), 6003 deletions(-)
delete mode 100644 drivers/net/wireless/libertas/11d.c
delete mode 100644 drivers/net/wireless/libertas/11d.h
delete mode 100644 drivers/net/wireless/libertas/hostcmd.h
create mode 100644 drivers/net/wireless/rt2x00/rt2800pci.c
create mode 100644 drivers/net/wireless/rt2x00/rt2800pci.h
create mode 100644 drivers/net/wireless/rt2x00/rt2x00soc.c
create mode 100644 drivers/net/wireless/rt2x00/rt2x00soc.h
create mode 100644 drivers/net/wireless/wl12xx/wl1271_conf.h
Omnibus patch is available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2009-10-28.patch.bz2
--
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] b43: Fix DMA TX bounce buffer copying
From: Larry Finger @ 2009-10-28 21:48 UTC (permalink / raw)
To: Michael Buesch; +Cc: linville, bcm43xx-dev, linux-wireless, Christian Casteyde
In-Reply-To: <200910282208.15792.mb@bu3sch.de>
Michael Buesch wrote:
> b43 allocates a bouncebuffer, if the supplied TX skb is in an invalid
> memory range for DMA.
> However, this is broken in that it fails to copy over some metadata to the
> new skb.
>
> This patch fixes three problems:
> * Failure to adjust the ieee80211_tx_info pointer to the new buffer.
> This results in a kmemcheck warning.
> * Failure to copy the skb cb, which contains ieee80211_tx_info, to the new skb.
> This results in breakage of various TX-status postprocessing (Rate control).
> * Failure to transfer the queue mapping.
> This results in the wrong queue being stopped on saturation and can result in queue overflow.
>
> Signed-off-by: Michael Buesch <mb@bu3sch.de>
> Tested-by: Christian Casteyde <casteyde.christian@free.fr>
>
> ---
>
> Thanks to Johannes for tracking down this hard to find bug and
> thanks to Christian for testing.
>
> Larry, I think I remember you reported a strange rate control failure on
> one of your cards. Does this patch fix it?
>
> b43legacy:
> Note that b43legacy has the same bug and also needs fixing.
> Is there a maintainer for b43legacy?
Michael,
There was not really a rate-control problem - just a difficulty with
the operator. I was making a transmit test, then interrogating the
rate from the same console. By that time, the rate was back to 1 Mb/s
for control messages. When I looped the transmit tests, and looked at
the rate in a separate console, the code was doing mostly what it
should. Mostly because the success rate for the LP PHY does not
satisfy the assumptions that mistrel makes. One gets a higher
throughput with a fixed rate, but that will improve as power control
is implemented.
There is no maintainer for b43legacy. I have ported your patch for b43
to legacy and I will be testing and submitting it.
Larry
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2009-10-28
From: Bartlomiej Zolnierkiewicz @ 2009-10-28 21:56 UTC (permalink / raw)
To: John W. Linville; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <20091028211031.GF2856@tuxdriver.com>
On Wednesday 28 October 2009 22:10:32 John W. Linville wrote:
> Dave,
>
> I let my patches pile-up! Yikes!!
>
> This request includes the usual ton of stuff for -next -- driver
> updates, fixes for some earlier -next stuff, a few cfg80211 changes to
> accomodate the libertas driver, etc. Of note is the rt2800pci support
> added to the rt2x00 family.
Unfortunately rt2800pci support is non-functioning at the moment... :(
> Pleaset let me know if there are problems!
I find it rather disappointing that all my review comments regarding
rt2800pci support were just completely ignored and then the initial
patch was merged just as it was..
The way rt2800usb and rt2800pci drivers are designed really results
in making the task of adding working support for RT28x0 and RT30x0
chipsets to rt2x00 infrastructure more difficult and time consuming
than it should be... :(
--
Bartlomiej Zolnierkiewicz
^ permalink raw reply
* [PATCH -next] wireless: airo_cs needs WEXT_SPY
From: Randy Dunlap @ 2009-10-28 23:08 UTC (permalink / raw)
To: Stephen Rothwell, linux-wireless; +Cc: linux-next, LKML, linville
In-Reply-To: <20091028190643.627f10aa.sfr@canb.auug.org.au>
From: Randy Dunlap <randy.dunlap@oracle.com>
airo_cs uses spy interfaces so it needs to select WEXT_SPY.
ERROR: "iw_handler_set_thrspy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "wireless_spy_update" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_get_spy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_get_thrspy" [drivers/net/wireless/airo.ko] undefined!
ERROR: "iw_handler_set_spy" [drivers/net/wireless/airo.ko] undefined!
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/net/wireless/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20091028.orig/drivers/net/wireless/Kconfig
+++ linux-next-20091028/drivers/net/wireless/Kconfig
@@ -111,6 +111,7 @@ config AIRO_CS
tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
depends on PCMCIA && (BROKEN || !M32R)
select WIRELESS_EXT
+ select WEXT_SPY
select CRYPTO
select CRYPTO_AES
---help---
^ permalink raw reply
* [PATCH] ath9k: fix misplaced semicolon on rate control
From: Luis R. Rodriguez @ 2009-10-29 0:19 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel, Luis R. Rodriguez, stable
The patch e43419f9:
ath9k: downgrade assert in rc.c for invalid rate
downgraded an ASSERT to a WARN_ON() but also misplaced a
semicolon at the end of the second check. What this did
was force the rate control code to always return the rate
even if we should have warned about it. Since this should
not have happened anymore anyway this fix isn't critical
as the proper rate would have been returned anyway.
Cc: stable@kernel.org
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/rc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 0639364..bb72b46 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -679,7 +679,7 @@ static u8 ath_rc_get_highest_rix(struct ath_softc *sc,
return rate;
if (rate_table->info[rate].valid_single_stream &&
- !(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG));
+ !(ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG))
return rate;
/* This should not happen */
--
1.6.0.4
^ permalink raw reply related
* Re: [RFC] ath9k: update hw configuration for virtual wiphys
From: Luis R. Rodriguez @ 2009-10-29 1:36 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Jouni.Malinen, linux-wireless, ath9k-devel
In-Reply-To: <1256762627-1574-1-git-send-email-lrodriguez@atheros.com>
On Wed, Oct 28, 2009 at 04:43:47PM -0400, Luis R. Rodriguez wrote:
> ath9k supports its own virtual wiphys. The hardware code
> relies on the ieee80211_hw for the present interface but
> with recent changes introduced the common->hw was never
> updated and is required for virtual wiphys.
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
>
> Jouni, it seems this the right place for this, do you agree?
>
> drivers/net/wireless/ath/ath9k/virtual.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
Here is a bigger alternative to that 5-line patch. What it
illustrates is that the the current virtual wiphy needs to be kept
record of for asynchronous events one way or another. I list
the events below.
Luis
From: Luis R. Rodriguez <lrodriguez@atheros.com>
Subject: [PATCH] ath9k: update hw configuration for virtual wiphys
ath9k supports its own virtual wiphys. The hardware code
relies on the ieee80211_hw for the present interface but
with recent changes introduced the common->hw was never
updated and is required for virtual wiphys. Instead of
relying on the common->hw pointer remove it and instead
require all hw code to pass the currently used ieee80211_hw
struct used.
Worth noting though is that at specific events we need
the hw code to access the hw configuration and during
those events the driver has currently no way of knowing
what the currently used virtual wiphy. For now we stick
to using the sc->hw for those events. These events are:
Interrupt:
* ISR --> ATH9K_INT_MIB --> ath9k_hw_procmibevent()
* tasklet --> ATH9K_INT_FATAL --> ath_reset()
* beacon tasklet --> ath_reset()
Timer:
* ath_ani_calibrate -->
ath9k_hw_reset_calvalid()
ath9k_hw_ani_monitor()
Xmit:
* ath_tx_complete_poll_work --> needreset --> ath_reset() (Xmit hang check)
* tasklet --> tx --> ath_tx_complete_aggr() --> needreset --> ath_reset()
* tasklet --> ath_draintxq --> ath_tx_complete_aggr() --> needreset --> ath_reset()
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath.h | 1 -
drivers/net/wireless/ath/ath5k/base.c | 1 -
drivers/net/wireless/ath/ath9k/ani.c | 21 +++---
drivers/net/wireless/ath/ath9k/ani.h | 5 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 8 ++-
drivers/net/wireless/ath/ath9k/beacon.c | 4 +-
drivers/net/wireless/ath/ath9k/calib.c | 20 +++---
drivers/net/wireless/ath/ath9k/calib.h | 3 +-
drivers/net/wireless/ath/ath9k/hw.c | 115 ++++++++++++++++++-----------
drivers/net/wireless/ath/ath9k/hw.h | 11 ++-
drivers/net/wireless/ath/ath9k/main.c | 44 +++++++-----
drivers/net/wireless/ath/ath9k/virtual.c | 6 +-
drivers/net/wireless/ath/ath9k/xmit.c | 6 +-
13 files changed, 150 insertions(+), 95 deletions(-)
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index 5e19a73..e97f5c9 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -62,7 +62,6 @@ struct ath_bus_ops {
struct ath_common {
void *ah;
void *priv;
- struct ieee80211_hw *hw;
int debug_mask;
enum ath_device_state state;
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 07c1e52..523b359 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -594,7 +594,6 @@ ath5k_pci_probe(struct pci_dev *pdev,
common = ath5k_hw_common(sc->ah);
common->ops = &ath5k_common_ops;
common->ah = sc->ah;
- common->hw = hw;
common->cachelsz = csz << 2; /* convert to bytes */
/* Initialize device */
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index 2a0cd64..dd87cbd 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -273,9 +273,10 @@ static void ath9k_ani_restart(struct ath_hw *ah)
aniState->cckPhyErrCount = 0;
}
-static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
+static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah,
+ struct ieee80211_hw *hw)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
+ struct ieee80211_conf *conf = &hw->conf;
struct ar5416AniState *aniState;
int32_t rssi;
@@ -345,9 +346,10 @@ static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
}
}
-static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)
+static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah,
+ struct ieee80211_hw *hw)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
+ struct ieee80211_conf *conf = &hw->conf;
struct ar5416AniState *aniState;
int32_t rssi;
@@ -545,6 +547,7 @@ void ath9k_ani_reset(struct ath_hw *ah)
}
void ath9k_hw_ani_monitor(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
struct ath9k_channel *chan)
{
struct ar5416AniState *aniState;
@@ -619,12 +622,12 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah,
} else if (aniState->listenTime > ah->aniperiod) {
if (aniState->ofdmPhyErrCount > aniState->listenTime *
aniState->ofdmTrigHigh / 1000) {
- ath9k_hw_ani_ofdm_err_trigger(ah);
+ ath9k_hw_ani_ofdm_err_trigger(ah, hw);
ath9k_ani_restart(ah);
} else if (aniState->cckPhyErrCount >
aniState->listenTime * aniState->cckTrigHigh /
1000) {
- ath9k_hw_ani_cck_err_trigger(ah);
+ ath9k_hw_ani_cck_err_trigger(ah, hw);
ath9k_ani_restart(ah);
}
}
@@ -708,7 +711,7 @@ u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah,
* any of the MIB counters overflow/trigger so don't assume we're
* here because a PHY error counter triggered.
*/
-void ath9k_hw_procmibevent(struct ath_hw *ah)
+void ath9k_hw_procmibevent(struct ath_hw *ah, struct ieee80211_hw *hw)
{
u32 phyCnt1, phyCnt2;
@@ -750,9 +753,9 @@ void ath9k_hw_procmibevent(struct ath_hw *ah)
* check will never be true.
*/
if (aniState->ofdmPhyErrCount > aniState->ofdmTrigHigh)
- ath9k_hw_ani_ofdm_err_trigger(ah);
+ ath9k_hw_ani_ofdm_err_trigger(ah, hw);
if (aniState->cckPhyErrCount > aniState->cckTrigHigh)
- ath9k_hw_ani_cck_err_trigger(ah);
+ ath9k_hw_ani_cck_err_trigger(ah, hw);
/* NB: always restart to insure the h/w counters are reset */
ath9k_ani_restart(ah);
}
diff --git a/drivers/net/wireless/ath/ath9k/ani.h b/drivers/net/wireless/ath/ath9k/ani.h
index 4e1ab94..ac0592e 100644
--- a/drivers/net/wireless/ath/ath9k/ani.h
+++ b/drivers/net/wireless/ath/ath9k/ani.h
@@ -17,6 +17,8 @@
#ifndef ANI_H
#define ANI_H
+#include "hw.h"
+
#define HAL_PROCESS_ANI 0x00000001
#define DO_ANI(ah) (((ah)->proc_phyerr & HAL_PROCESS_ANI))
@@ -110,12 +112,13 @@ struct ar5416Stats {
void ath9k_ani_reset(struct ath_hw *ah);
void ath9k_hw_ani_monitor(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
struct ath9k_channel *chan);
void ath9k_enable_mib_counters(struct ath_hw *ah);
void ath9k_hw_disable_mib_counters(struct ath_hw *ah);
u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah, u32 *rxc_pcnt,
u32 *rxf_pcnt, u32 *txf_pcnt);
-void ath9k_hw_procmibevent(struct ath_hw *ah);
+void ath9k_hw_procmibevent(struct ath_hw *ah, struct ieee80211_hw *hw);
void ath9k_hw_ani_setup(struct ath_hw *ah);
void ath9k_hw_ani_init(struct ath_hw *ah);
void ath9k_hw_ani_disable(struct ath_hw *ah);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 13dd020..3b551a7 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -341,7 +341,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush);
struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype);
void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq);
int ath_tx_setup(struct ath_softc *sc, int haltype);
-void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx);
+void ath_drain_all_txq(struct ath_softc *sc,
+ struct ieee80211_hw *hw,
+ bool retry_tx);
void ath_draintxq(struct ath_softc *sc,
struct ath_txq *txq, bool retry_tx);
void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an);
@@ -654,8 +656,8 @@ void ath9k_update_ichannel(struct ath_softc *sc, struct ieee80211_hw *hw,
void ath_update_chainmask(struct ath_softc *sc, int is_ht);
int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
struct ath9k_channel *hchan);
-void ath_radio_enable(struct ath_softc *sc);
-void ath_radio_disable(struct ath_softc *sc);
+void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw);
+void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw);
#ifdef CONFIG_PCI
int ath_pci_init(void);
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index b10c884..0797207 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -385,6 +385,7 @@ void ath_beacon_tasklet(unsigned long data)
struct ath_buf *bf = NULL;
struct ieee80211_vif *vif;
struct ath_wiphy *aphy;
+ struct ieee80211_hw *hw;
int slot;
u32 bfaddr, bc = 0, tsftu;
u64 tsf;
@@ -442,6 +443,7 @@ void ath_beacon_tasklet(unsigned long data)
slot = ATH_BCBUF - slot - 1;
vif = sc->beacon.bslot[slot];
aphy = sc->beacon.bslot_aphy[slot];
+ hw = aphy->hw;
ath_print(common, ATH_DBG_BEACON,
"slot %d [tsf %llu tsftu %u intval %u] vif %p\n",
@@ -476,7 +478,7 @@ void ath_beacon_tasklet(unsigned long data)
sc->beacon.updateslot = COMMIT; /* commit next beacon */
sc->beacon.slotupdate = slot;
} else if (sc->beacon.updateslot == COMMIT && sc->beacon.slotupdate == slot) {
- ath9k_hw_setslottime(sc->sc_ah, sc->beacon.slottime);
+ ath9k_hw_setslottime(sc->sc_ah, &hw->conf, sc->beacon.slottime);
sc->beacon.updateslot = OK;
}
if (bfaddr != 0) {
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 238a574..cb42861 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -279,10 +279,9 @@ static bool ath9k_hw_per_calibration(struct ath_hw *ah,
/* Assumes you are talking about the currently configured channel */
static bool ath9k_hw_iscal_supported(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
enum ath9k_cal_types calType)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
-
switch (calType & ah->supp_cals) {
case IQ_MISMATCH_CAL: /* Both 2 GHz and 5 GHz support OFDM */
return true;
@@ -560,10 +559,10 @@ static void ath9k_hw_adc_dccal_calibrate(struct ath_hw *ah, u8 numChains)
}
/* This is done for the currently configured channel */
-bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
+bool ath9k_hw_reset_calvalid(struct ath_hw *ah, struct ieee80211_hw *hw)
{
struct ath_common *common = ath9k_hw_common(ah);
- struct ieee80211_conf *conf = &common->hw->conf;
+ struct ieee80211_conf *conf = &hw->conf;
struct ath9k_cal_list *currCal = ah->cal_list_curr;
if (!ah->curchan)
@@ -582,7 +581,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
return true;
}
- if (!ath9k_hw_iscal_supported(ah, currCal->calData->calType))
+ if (!ath9k_hw_iscal_supported(ah, conf, currCal->calData->calType))
return true;
ath_print(common, ATH_DBG_CALIBRATE,
@@ -1121,8 +1120,11 @@ static bool ar9285_clc(struct ath_hw *ah, struct ath9k_channel *chan)
return true;
}
-bool ath9k_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan)
+bool ath9k_hw_init_cal(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
+ struct ath9k_channel *chan)
{
+ struct ieee80211_conf *conf = &hw->conf;
struct ath_common *common = ath9k_hw_common(ah);
if (AR_SREV_9271(ah) || AR_SREV_9285_12_OR_LATER(ah)) {
@@ -1174,19 +1176,19 @@ bool ath9k_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan)
/* Enable IQ, ADC Gain and ADC DC offset CALs */
if (AR_SREV_9100(ah) || AR_SREV_9160_10_OR_LATER(ah)) {
- if (ath9k_hw_iscal_supported(ah, ADC_GAIN_CAL)) {
+ if (ath9k_hw_iscal_supported(ah, conf, ADC_GAIN_CAL)) {
INIT_CAL(&ah->adcgain_caldata);
INSERT_CAL(ah, &ah->adcgain_caldata);
ath_print(common, ATH_DBG_CALIBRATE,
"enabling ADC Gain Calibration.\n");
}
- if (ath9k_hw_iscal_supported(ah, ADC_DC_CAL)) {
+ if (ath9k_hw_iscal_supported(ah, conf, ADC_DC_CAL)) {
INIT_CAL(&ah->adcdc_caldata);
INSERT_CAL(ah, &ah->adcdc_caldata);
ath_print(common, ATH_DBG_CALIBRATE,
"enabling ADC DC Calibration.\n");
}
- if (ath9k_hw_iscal_supported(ah, IQ_MISMATCH_CAL)) {
+ if (ath9k_hw_iscal_supported(ah, conf, IQ_MISMATCH_CAL)) {
INIT_CAL(&ah->iq_caldata);
INSERT_CAL(ah, &ah->iq_caldata);
ath_print(common, ATH_DBG_CALIBRATE,
diff --git a/drivers/net/wireless/ath/ath9k/calib.h b/drivers/net/wireless/ath/ath9k/calib.h
index b2c873e..ff7b3c1 100644
--- a/drivers/net/wireless/ath/ath9k/calib.h
+++ b/drivers/net/wireless/ath/ath9k/calib.h
@@ -120,7 +120,7 @@ struct ath9k_pacal_info{
int8_t skipcount; /* No. of times the PACAL to be skipped */
};
-bool ath9k_hw_reset_calvalid(struct ath_hw *ah);
+bool ath9k_hw_reset_calvalid(struct ath_hw *ah, struct ieee80211_hw *hw);
void ath9k_hw_start_nfcal(struct ath_hw *ah);
void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan);
int16_t ath9k_hw_getnf(struct ath_hw *ah,
@@ -130,6 +130,7 @@ s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan);
bool ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
u8 rxchainmask, bool longcal);
bool ath9k_hw_init_cal(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
struct ath9k_channel *chan);
#endif /* CALIB_H */
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 111ff04..f08cc61 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -26,7 +26,9 @@
#define ATH9K_CLOCK_RATE_2GHZ_OFDM 44
static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type);
-static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan);
+static void ath9k_hw_set_regs(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
+ struct ath9k_channel *chan);
static u32 ath9k_hw_ini_fixup(struct ath_hw *ah,
struct ar5416_eeprom_def *pEepData,
u32 reg, u32 value);
@@ -52,10 +54,10 @@ module_exit(ath9k_exit);
/* Helper Functions */
/********************/
-static u32 ath9k_hw_mac_usec(struct ath_hw *ah, u32 clks)
+static u32 ath9k_hw_mac_usec(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 clks)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
-
if (!ah->curchan) /* should really check for CCK instead */
return clks / ATH9K_CLOCK_RATE_CCK;
if (conf->channel->band == IEEE80211_BAND_2GHZ)
@@ -64,20 +66,20 @@ static u32 ath9k_hw_mac_usec(struct ath_hw *ah, u32 clks)
return clks / ATH9K_CLOCK_RATE_5GHZ_OFDM;
}
-static u32 ath9k_hw_mac_to_usec(struct ath_hw *ah, u32 clks)
+static u32 ath9k_hw_mac_to_usec(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 clks)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
-
if (conf_is_ht40(conf))
- return ath9k_hw_mac_usec(ah, clks) / 2;
+ return ath9k_hw_mac_usec(ah, conf, clks) / 2;
else
- return ath9k_hw_mac_usec(ah, clks);
+ return ath9k_hw_mac_usec(ah, conf, clks);
}
-static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs)
+static u32 ath9k_hw_mac_clks(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 usecs)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
-
if (!ah->curchan) /* should really check for CCK instead */
return usecs *ATH9K_CLOCK_RATE_CCK;
if (conf->channel->band == IEEE80211_BAND_2GHZ)
@@ -85,14 +87,14 @@ static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs)
return usecs *ATH9K_CLOCK_RATE_5GHZ_OFDM;
}
-static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs)
+static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 usecs)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
-
if (conf_is_ht40(conf))
- return ath9k_hw_mac_clks(ah, usecs) * 2;
+ return ath9k_hw_mac_clks(ah, conf, usecs) * 2;
else
- return ath9k_hw_mac_clks(ah, usecs);
+ return ath9k_hw_mac_clks(ah, conf, usecs);
}
bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout)
@@ -1205,31 +1207,43 @@ static void ath9k_hw_init_interrupt_masks(struct ath_hw *ah,
}
}
-static bool ath9k_hw_set_ack_timeout(struct ath_hw *ah, u32 us)
+static bool ath9k_hw_set_ack_timeout(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 us)
{
- if (us > ath9k_hw_mac_to_usec(ah, MS(0xffffffff, AR_TIME_OUT_ACK))) {
+ if (us > ath9k_hw_mac_to_usec(ah,
+ conf,
+ MS(0xffffffff, AR_TIME_OUT_ACK))) {
ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
"bad ack timeout %u\n", us);
ah->acktimeout = (u32) -1;
return false;
} else {
- REG_RMW_FIELD(ah, AR_TIME_OUT,
- AR_TIME_OUT_ACK, ath9k_hw_mac_to_clks(ah, us));
+ REG_RMW_FIELD(ah,
+ AR_TIME_OUT,
+ AR_TIME_OUT_ACK,
+ ath9k_hw_mac_to_clks(ah, conf, us));
ah->acktimeout = us;
return true;
}
}
-static bool ath9k_hw_set_cts_timeout(struct ath_hw *ah, u32 us)
+static bool ath9k_hw_set_cts_timeout(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 us)
{
- if (us > ath9k_hw_mac_to_usec(ah, MS(0xffffffff, AR_TIME_OUT_CTS))) {
+ if (us > ath9k_hw_mac_to_usec(ah,
+ conf,
+ MS(0xffffffff, AR_TIME_OUT_CTS))) {
ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
"bad cts timeout %u\n", us);
ah->ctstimeout = (u32) -1;
return false;
} else {
- REG_RMW_FIELD(ah, AR_TIME_OUT,
- AR_TIME_OUT_CTS, ath9k_hw_mac_to_clks(ah, us));
+ REG_RMW_FIELD(ah,
+ AR_TIME_OUT,
+ AR_TIME_OUT_CTS,
+ ath9k_hw_mac_to_clks(ah, conf, us));
ah->ctstimeout = us;
return true;
}
@@ -1249,7 +1263,8 @@ static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu)
}
}
-static void ath9k_hw_init_user_settings(struct ath_hw *ah)
+static void ath9k_hw_init_user_settings(struct ath_hw *ah,
+ struct ieee80211_conf *conf)
{
ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n",
ah->misc_mode);
@@ -1258,11 +1273,11 @@ static void ath9k_hw_init_user_settings(struct ath_hw *ah)
REG_WRITE(ah, AR_PCU_MISC,
REG_READ(ah, AR_PCU_MISC) | ah->misc_mode);
if (ah->slottime != (u32) -1)
- ath9k_hw_setslottime(ah, ah->slottime);
+ ath9k_hw_setslottime(ah, conf, ah->slottime);
if (ah->acktimeout != (u32) -1)
- ath9k_hw_set_ack_timeout(ah, ah->acktimeout);
+ ath9k_hw_set_ack_timeout(ah, conf, ah->acktimeout);
if (ah->ctstimeout != (u32) -1)
- ath9k_hw_set_cts_timeout(ah, ah->ctstimeout);
+ ath9k_hw_set_cts_timeout(ah, conf, ah->ctstimeout);
if (ah->globaltxtimeout != (u32) -1)
ath9k_hw_set_global_txtimeout(ah, ah->globaltxtimeout);
}
@@ -1431,6 +1446,7 @@ static u32 ath9k_regd_get_ctl(struct ath_regulatory *reg,
}
static int ath9k_hw_process_ini(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
struct ath9k_channel *chan)
{
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
@@ -1537,7 +1553,7 @@ static int ath9k_hw_process_ini(struct ath_hw *ah,
}
ath9k_hw_override_ini(ah, chan);
- ath9k_hw_set_regs(ah, chan);
+ ath9k_hw_set_regs(ah, hw, chan);
ath9k_hw_init_chain_masks(ah);
if (OLC_FOR_AR9280_20_LATER)
@@ -1818,8 +1834,11 @@ static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type)
}
}
-static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan)
+static void ath9k_hw_set_regs(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
+ struct ath9k_channel *chan)
{
+ struct ieee80211_conf *conf = &hw->conf;
u32 phymode;
u32 enableDacFifo = 0;
@@ -1840,7 +1859,7 @@ static void ath9k_hw_set_regs(struct ath_hw *ah, struct ath9k_channel *chan)
}
REG_WRITE(ah, AR_PHY_TURBO, phymode);
- ath9k_hw_set11nmac2040(ah);
+ ath9k_hw_set11nmac2040(ah, conf);
REG_WRITE(ah, AR_GTXTO, 25 << AR_GTXTO_TIMEOUT_LIMIT_S);
REG_WRITE(ah, AR_CST, 0xF << AR_CST_TIMEOUT_LIMIT_S);
@@ -1866,6 +1885,7 @@ static bool ath9k_hw_chip_reset(struct ath_hw *ah,
}
static bool ath9k_hw_channel_change(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
struct ath9k_channel *chan)
{
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
@@ -1891,7 +1911,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
return false;
}
- ath9k_hw_set_regs(ah, chan);
+ ath9k_hw_set_regs(ah, hw, chan);
r = ah->ath9k_hw_rf_set_freq(ah, chan);
if (r) {
@@ -1940,10 +1960,13 @@ static void ath9k_enable_rfkill(struct ath_hw *ah)
REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
}
-int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
- bool bChannelChange)
+int ath9k_hw_reset(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
+ struct ath9k_channel *chan,
+ bool bChannelChange)
{
struct ath_common *common = ath9k_hw_common(ah);
+ struct ieee80211_conf *conf = &hw->conf;
u32 saveLedState;
struct ath9k_channel *curchan = ah->curchan;
u32 saveDefAntenna;
@@ -1969,7 +1992,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
!(AR_SREV_9280(ah) || IS_CHAN_A_5MHZ_SPACED(chan) ||
IS_CHAN_A_5MHZ_SPACED(ah->curchan))) {
- if (ath9k_hw_channel_change(ah, chan)) {
+ if (ath9k_hw_channel_change(ah, hw, chan)) {
ath9k_hw_loadnf(ah, ah->curchan);
ath9k_hw_start_nfcal(ah);
return 0;
@@ -2029,7 +2052,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
REG_SET_BIT(ah, AR_MAC_PCU_ASYNC_FIFO_REG3,
AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET);
}
- r = ath9k_hw_process_ini(ah, chan);
+ r = ath9k_hw_process_ini(ah, hw, chan);
if (r)
return r;
@@ -2095,7 +2118,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
ath9k_enable_rfkill(ah);
- ath9k_hw_init_user_settings(ah);
+ ath9k_hw_init_user_settings(ah, conf);
if (AR_SREV_9287_12_OR_LATER(ah)) {
REG_WRITE(ah, AR_D_GBL_IFS_SIFS,
@@ -2132,7 +2155,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
ath9k_hw_init_bb(ah, chan);
- if (!ath9k_hw_init_cal(ah, chan))
+ if (!ath9k_hw_init_cal(ah, hw, chan))
return -EIO;
rx_chainmask = ah->rxchainmask;
@@ -3710,24 +3733,28 @@ void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting)
}
EXPORT_SYMBOL(ath9k_hw_set_tsfadjust);
-bool ath9k_hw_setslottime(struct ath_hw *ah, u32 us)
+bool ath9k_hw_setslottime(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 us)
{
- if (us < ATH9K_SLOT_TIME_9 || us > ath9k_hw_mac_to_usec(ah, 0xffff)) {
+ if (us < ATH9K_SLOT_TIME_9 ||
+ us > ath9k_hw_mac_to_usec(ah, conf, 0xffff)) {
ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
"bad slot time %u\n", us);
ah->slottime = (u32) -1;
return false;
} else {
- REG_WRITE(ah, AR_D_GBL_IFS_SLOT, ath9k_hw_mac_to_clks(ah, us));
+ REG_WRITE(ah,
+ AR_D_GBL_IFS_SLOT,
+ ath9k_hw_mac_to_clks(ah, conf, us));
ah->slottime = us;
return true;
}
}
EXPORT_SYMBOL(ath9k_hw_setslottime);
-void ath9k_hw_set11nmac2040(struct ath_hw *ah)
+void ath9k_hw_set11nmac2040(struct ath_hw *ah, struct ieee80211_conf *conf)
{
- struct ieee80211_conf *conf = &ath9k_hw_common(ah)->hw->conf;
u32 macmode;
if (conf_is_ht40(conf) && !ah->config.cwm_ignore_extcca)
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index c7b0c4d..a7ae7ac 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -20,6 +20,7 @@
#include <linux/if_ether.h>
#include <linux/delay.h>
#include <linux/io.h>
+#include <net/mac80211.h>
#include "mac.h"
#include "ani.h"
@@ -635,7 +636,9 @@ static inline struct ath_regulatory *ath9k_hw_regulatory(struct ath_hw *ah)
const char *ath9k_hw_probe(u16 vendorid, u16 devid);
void ath9k_hw_detach(struct ath_hw *ah);
int ath9k_hw_init(struct ath_hw *ah);
-int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
+int ath9k_hw_reset(struct ath_hw *ah,
+ struct ieee80211_hw *hw,
+ struct ath9k_channel *chan,
bool bChannelChange);
void ath9k_hw_fill_cap_info(struct ath_hw *ah);
bool ath9k_hw_getcapability(struct ath_hw *ah, enum ath9k_capability_type type,
@@ -689,8 +692,10 @@ u64 ath9k_hw_gettsf64(struct ath_hw *ah);
void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64);
void ath9k_hw_reset_tsf(struct ath_hw *ah);
void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting);
-bool ath9k_hw_setslottime(struct ath_hw *ah, u32 us);
-void ath9k_hw_set11nmac2040(struct ath_hw *ah);
+bool ath9k_hw_setslottime(struct ath_hw *ah,
+ struct ieee80211_conf *conf,
+ u32 us);
+void ath9k_hw_set11nmac2040(struct ath_hw *ah, struct ieee80211_conf *conf);
void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period);
void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
const struct ath9k_beacon_state *bs);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 9fefc51..4dec8c0 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -303,7 +303,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
- struct ieee80211_conf *conf = &common->hw->conf;
+ struct ieee80211_conf *conf = &hw->conf;
bool fastcc = true, stopped;
struct ieee80211_channel *channel = hw->conf.channel;
int r;
@@ -323,7 +323,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
* the relevant bits of the h/w.
*/
ath9k_hw_set_interrupts(ah, 0);
- ath_drain_all_txq(sc, false);
+ ath_drain_all_txq(sc, hw, false);
stopped = ath_stoprecv(sc);
/* XXX: do not flush receive queue here. We don't want
@@ -340,7 +340,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
spin_lock_bh(&sc->sc_resetlock);
- r = ath9k_hw_reset(ah, hchan, fastcc);
+ r = ath9k_hw_reset(ah, hw, hchan, fastcc);
if (r) {
ath_print(common, ATH_DBG_FATAL,
"Unable to reset channel (%u Mhz) "
@@ -381,6 +381,8 @@ static void ath_ani_calibrate(unsigned long data)
struct ath_softc *sc = (struct ath_softc *)data;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
+ /* XXX: this is not right when using a virtual wiphy */
+ struct ieee80211_hw *hw = sc->hw;
bool longcal = false;
bool shortcal = false;
bool aniflag = false;
@@ -423,7 +425,7 @@ static void ath_ani_calibrate(unsigned long data)
} else {
if ((timestamp - sc->ani.resetcal_timer) >=
ATH_RESTART_CALINTERVAL) {
- sc->ani.caldone = ath9k_hw_reset_calvalid(ah);
+ sc->ani.caldone = ath9k_hw_reset_calvalid(ah, hw);
if (sc->ani.caldone)
sc->ani.resetcal_timer = timestamp;
}
@@ -439,7 +441,7 @@ static void ath_ani_calibrate(unsigned long data)
if (longcal || shortcal || aniflag) {
/* Call ANI routine if necessary */
if (aniflag)
- ath9k_hw_ani_monitor(ah, ah->curchan);
+ ath9k_hw_ani_monitor(ah, hw, ah->curchan);
/* Perform calibration if necessary */
if (longcal || shortcal) {
@@ -663,7 +665,8 @@ irqreturn_t ath_isr(int irq, void *dev)
* it will clear whatever condition caused
* the interrupt.
*/
- ath9k_hw_procmibevent(ah);
+ /* XXX: the sc->hw is bogus here when using virtual wiphys */
+ ath9k_hw_procmibevent(ah, sc->hw);
ath9k_hw_set_interrupts(ah, sc->imask);
}
@@ -1200,7 +1203,7 @@ fail:
ath_deinit_leds(sc);
}
-void ath_radio_enable(struct ath_softc *sc)
+void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
@@ -1214,7 +1217,7 @@ void ath_radio_enable(struct ath_softc *sc)
ah->curchan = ath_get_curchannel(sc, sc->hw);
spin_lock_bh(&sc->sc_resetlock);
- r = ath9k_hw_reset(ah, ah->curchan, false);
+ r = ath9k_hw_reset(ah, hw, ah->curchan, false);
if (r) {
ath_print(common, ATH_DBG_FATAL,
"Unable to reset channel %u (%uMhz) ",
@@ -1245,7 +1248,7 @@ void ath_radio_enable(struct ath_softc *sc)
ath9k_ps_restore(sc);
}
-void ath_radio_disable(struct ath_softc *sc)
+void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
{
struct ath_hw *ah = sc->sc_ah;
struct ieee80211_channel *channel = sc->hw->conf.channel;
@@ -1261,7 +1264,7 @@ void ath_radio_disable(struct ath_softc *sc)
/* Disable interrupts */
ath9k_hw_set_interrupts(ah, 0);
- ath_drain_all_txq(sc, false); /* clear pending tx frames */
+ ath_drain_all_txq(sc, hw, false); /* clear pending tx frames */
ath_stoprecv(sc); /* turn off frame recv */
ath_flushrecv(sc); /* flush recv queue */
@@ -1269,7 +1272,7 @@ void ath_radio_disable(struct ath_softc *sc)
ah->curchan = ath_get_curchannel(sc, sc->hw);
spin_lock_bh(&sc->sc_resetlock);
- r = ath9k_hw_reset(ah, ah->curchan, false);
+ r = ath9k_hw_reset(ah, hw, ah->curchan, false);
if (r) {
ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL,
"Unable to reset channel %u (%uMhz) "
@@ -1652,7 +1655,6 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
common->ops = &ath9k_common_ops;
common->bus_ops = bus_ops;
common->ah = ah;
- common->hw = sc->hw;
common->priv = sc;
common->debug_mask = ath9k_debug;
@@ -1988,16 +1990,22 @@ int ath_reset(struct ath_softc *sc, bool retry_tx)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
+ /*
+ * XXX: the sc->hw may not be the active one,
+ * we may actually be on a virtual wiphy aphy->hw
+ * but currently have no way of knowing which is the
+ * active one.
+ */
struct ieee80211_hw *hw = sc->hw;
int r;
ath9k_hw_set_interrupts(ah, 0);
- ath_drain_all_txq(sc, retry_tx);
+ ath_drain_all_txq(sc, hw, retry_tx);
ath_stoprecv(sc);
ath_flushrecv(sc);
spin_lock_bh(&sc->sc_resetlock);
- r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
+ r = ath9k_hw_reset(ah, hw, sc->sc_ah->curchan, false);
if (r)
ath_print(common, ATH_DBG_FATAL,
"Unable to reset hardware; reset status %d\n", r);
@@ -2308,7 +2316,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
* and then setup of the interrupt mask.
*/
spin_lock_bh(&sc->sc_resetlock);
- r = ath9k_hw_reset(ah, init_channel, false);
+ r = ath9k_hw_reset(ah, hw, init_channel, false);
if (r) {
ath_print(common, ATH_DBG_FATAL,
"Unable to reset hardware; reset status %d "
@@ -2539,7 +2547,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
ath9k_hw_set_interrupts(ah, 0);
if (!(sc->sc_flags & SC_OP_INVALID)) {
- ath_drain_all_txq(sc, false);
+ ath_drain_all_txq(sc, hw, false);
ath_stoprecv(sc);
ath9k_hw_phy_disable(ah);
} else
@@ -2704,7 +2712,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
disable_radio = true;
}
else if (all_wiphys_idle) {
- ath_radio_enable(sc);
+ ath_radio_enable(sc, hw);
ath_print(common, ATH_DBG_CONFIG,
"not-idle: enabling radio\n");
}
@@ -2781,7 +2789,7 @@ skip_chan_change:
if (disable_radio) {
ath_print(common, ATH_DBG_CONFIG, "idle: disabling radio\n");
- ath_radio_disable(sc);
+ ath_radio_disable(sc, hw);
}
mutex_unlock(&sc->mutex);
diff --git a/drivers/net/wireless/ath/ath9k/virtual.c b/drivers/net/wireless/ath/ath9k/virtual.c
index bc7d173..2dcbfbd 100644
--- a/drivers/net/wireless/ath/ath9k/virtual.c
+++ b/drivers/net/wireless/ath/ath9k/virtual.c
@@ -508,6 +508,8 @@ int ath9k_wiphy_select(struct ath_wiphy *aphy)
sc->wiphy_select_failures++;
if (time_after(jiffies, sc->wiphy_select_first_fail + HZ / 2))
{
+ struct ieee80211_hw *hw = aphy->hw;
+
printk(KERN_DEBUG "ath9k: Previous wiphy select timed "
"out; disable/enable hw to recover\n");
__ath9k_wiphy_mark_all_paused(sc);
@@ -521,8 +523,8 @@ int ath9k_wiphy_select(struct ath_wiphy *aphy)
* frame being completed)
*/
spin_unlock_bh(&sc->wiphy_lock);
- ath_radio_disable(sc);
- ath_radio_enable(sc);
+ ath_radio_disable(sc, hw);
+ ath_radio_enable(sc, hw);
ieee80211_queue_work(aphy->sc->hw,
&aphy->sc->chan_work);
return -EBUSY; /* previous select still in progress */
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2a4efcb..e6c6d35 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1053,7 +1053,9 @@ void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx)
}
}
-void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
+void ath_drain_all_txq(struct ath_softc *sc,
+ struct ieee80211_hw *hw,
+ bool retry_tx)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -1082,7 +1084,7 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
"Unable to stop TxDMA. Reset HAL!\n");
spin_lock_bh(&sc->sc_resetlock);
- r = ath9k_hw_reset(ah, sc->sc_ah->curchan, true);
+ r = ath9k_hw_reset(ah, hw, sc->sc_ah->curchan, true);
if (r)
ath_print(common, ATH_DBG_FATAL,
"Unable to reset hardware; reset status %d\n",
--
1.6.0.4
^ permalink raw reply related
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