Age | Commit message (Collapse) | Author |
|
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
These are unnecessary constructs in a function.
This patch removes these from both RX and TX init
routines.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Using a u32 to store a single flag is overkill.
Use a bool to store whether the buffer is stale or not.
Also, use u8 instead of u32 to store the buffer type.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Change the void pointer to struct sk_buff and access
bf_mpdu directly, removing all casts in the process.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch updates count of every hw tried rate with
appropriate tries before reporting tx status of a frame.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
We will miss rate control update if first A-MPDU of an
aggregation is not Block Acked as we always tell if the
rate control needs to updated through update_rc of first
A-MPDU. This patch does rate control update for the first
A-MPDU which notifies it's tx status (which is not
necessarily the first A-MPDU of an aggregation) to mac80211.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
How time flies.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch fills the ack_signal field in TX status with an appropriate
value from the TX descriptor.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This is not a fatal message, hitting it simply means we're
going to tell the upper layers to slow their horses down but
as we make more descriptors available we let the show continue
by waking up the queues in ath_wake_mac80211_queue().
We downgrade this as otherwise we fill up your kernel log with
messages which can be common under heavy traffic.
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
mac80211 expects the driver to fill in the starting
sequence number of an ADDBA request to initiate TX aggregation.
IEEE80211_TX_CTL_AMPDU would be set for frames only after a
successful ADDBA exchange, but we have to increment the
internal sequence counter for the normal(non-AMPDU) data frames proerly.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Allow virtual wiphys to be paused/unpaused to allow off-channel
operations. Pause will stop all TX queues for the wiphy and move the
STA into power save mode if in managed mode. Unpause wakes up the TX
queues and notifies the AP that the STA woke up if in managed mode.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
The new struct ath_softc::sec_wiphy array is used to store information
about virtual wiphys and select which wiphy is used in calls to
mac80211. Each virtual wiphy will be assigned a different MAC address
based on the virtual wiphy index.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Setting up the CAB queue requires only the beacon interval,
remove the function ath_get_beaconconfig() which is redundant.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Finally, merge these structures and have a single
HW specific data structure.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch removes the useless sc_ prefixes for all variables.
Also, refer to interfaces as VIFs and not as VAPs anymore.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Split the core header files into manageable pieces.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Use mac80211's primitives for identifying the frame type,
and cleanup the driver-specific macros.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
mac80211 notifies the RC algorithm if RTS/CTS and short preamble
are needed. The RC flags for MCS rates are currently not handled
by mac80211, and ath9k's RC doesn't set the flags either. Fix this.
Also, set the rts_cts_rate_idx inside the RC algorithm.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch fixes the lockdep warning shown below, and also
initializes the starting sequence number when starting a TX
aggregation session.
=============================================
[ INFO: possible recursive locking detected ]
2.6.29-rc2-wl #21
---------------------------------------------
swapper/0 is trying to acquire lock:
(_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
but task is already holding lock:
(_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
other info that might help us debug this:
7 locks held by swapper/0:
#0: (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
#1: (_xmit_ETHER#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
#2: (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
#3: (_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
#4: (rcu_read_lock){..--}, at: [<ffffffffa0154919>] ieee80211_master_start_xmit+0x219/0x6c0 [mac80211]
#5: (rcu_read_lock){..--}, at: [<ffffffffa01427c6>] ieee80211_start_tx_ba_session+0x66/0x4e0 [mac80211]
#6: (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
stack backtrace:
Pid: 0, comm: swapper Not tainted 2.6.29-rc2-wl #21
Call Trace:
<IRQ> [<ffffffff8026c329>] __lock_acquire+0x1be9/0x1c40
[<ffffffff80442af1>] dev_queue_xmit+0xe1/0x620
[<ffffffff8026a8cc>] __lock_acquire+0x18c/0x1c40
[<ffffffff8026c3d5>] lock_acquire+0x55/0x70
[<ffffffff80456d71>] __qdisc_run+0x221/0x290
[<ffffffff804dbeb9>] _spin_lock+0x39/0x50
[<ffffffff80456d71>] __qdisc_run+0x221/0x290
[<ffffffff804dbd2f>] _spin_unlock+0x1f/0x50
[<ffffffff80456d71>] __qdisc_run+0x221/0x290
[<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
[<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
[<ffffffffa0142a63>] ieee80211_start_tx_ba_session+0x303/0x4e0 [mac80211]
[<ffffffffa01427c6>] ieee80211_start_tx_ba_session+0x66/0x4e0 [mac80211]
[<ffffffffa0149dae>] rate_control_get_rate+0xae/0xc0 [mac80211]
[<ffffffffa01526b5>] invoke_tx_handlers+0x655/0x1000 [mac80211]
[<ffffffff802699fd>] mark_held_locks+0x4d/0x90
[<ffffffff804dbcf5>] _spin_unlock_irqrestore+0x65/0x80
[<ffffffffa0151aaa>] __ieee80211_tx_prepare+0x16a/0x310 [mac80211]
[<ffffffffa0151adc>] __ieee80211_tx_prepare+0x19c/0x310 [mac80211]
[<ffffffff80439cc2>] pskb_expand_head+0x112/0x190
[<ffffffffa0154986>] ieee80211_master_start_xmit+0x286/0x6c0 [mac80211]
[<ffffffffa0154919>] ieee80211_master_start_xmit+0x219/0x6c0 [mac80211]
[<ffffffff8026a8cc>] __lock_acquire+0x18c/0x1c40
[<ffffffff80456d8e>] __qdisc_run+0x23e/0x290
[<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
[<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
[<ffffffffa0154221>] ieee80211_subif_start_xmit+0x4a1/0x980 [mac80211]
[<ffffffffa0153f18>] ieee80211_subif_start_xmit+0x198/0x980 [mac80211]
[<ffffffff80456d8e>] __qdisc_run+0x23e/0x290
[<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
[<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
[<ffffffffa028ecfd>] ip6_output+0x62d/0x1230 [ipv6]
[<ffffffff8024ca00>] __mod_timer+0xb0/0xd0
[<ffffffffa02ad25a>] mld_sendpack+0x3fa/0x4a0 [ipv6]
[<ffffffffa02ace60>] mld_sendpack+0x0/0x4a0 [ipv6]
[<ffffffffa02adf90>] mld_ifc_timer_expire+0x0/0x340 [ipv6]
[<ffffffffa02ae219>] mld_ifc_timer_expire+0x289/0x340 [ipv6]
[<ffffffffa02adf90>] mld_ifc_timer_expire+0x0/0x340 [ipv6]
[<ffffffff8024c097>] run_timer_softirq+0x147/0x220
[<ffffffff802473fb>] __do_softirq+0x9b/0x180
[<ffffffff80265516>] tick_dev_program_event+0x36/0xb0
[<ffffffff8020d77c>] call_softirq+0x1c/0x30
[<ffffffff8020f2c5>] do_softirq+0x65/0xb0
[<ffffffff80246ebd>] irq_exit+0x9d/0xc0
[<ffffffff80221db6>] smp_apic_timer_interrupt+0x86/0xd0
[<ffffffff8020d1b3>] apic_timer_interrupt+0x13/0x20
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
The ieee80211_sta pointer in the SKB's TX control info
area is not guaranteed to be valid after returning from the tx() callback.
Use ieee80211_find_sta() instead and return early if the station
is no longer present.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
The buffer state is already cleared in ATH_TXBUF_RESET.
Remove redundant code clearing the type variable.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch cleans up the convoluted buffer management
logic for TX aggregation. Both aggregation creation and
completion are addressed.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
If the current holding descriptor is the last one in the TX queue,
*and* it has been marked as STALE, then move it to the free list
and bail out, as it has already been processed.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
The TX queue draining routines have confusing names,
rename them approprately and merge ath_drain_txdataq()
with ath_drain_all_txq().
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch starts cleaning up all the crufty code in transmission path,
grouping functions into logical blocks.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Convert to use bus-agnostic DMA routines to make it usable on AHB bus as well.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Convert 'struct pci_dev' to 'struct device' to make it usable on the AHB
bus as well.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Use shiny new conf_is_ht*() helpers, we can later remove ht.enabled if
desired.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
HW reset calls pass the same variables or structs
which we can obtain easily from ah. Although this also applies
during channel changes as we will keep around the ath9k_channel
passed as an argument for now.
We now also now propagate the hw reset errors down.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
No need to cache when we want to use 2Mbit/s for all protection
frames for 802.11g as we can determine that dynamically on
ath_buf_set_rate() itself.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch reverts "ath9k: Fix TX status reporting for retries and MCS index"
because that change ended up breaking ath9k rate control. While the
MCS index reporting to mac80211 was indeed fixed by the patch, it did
not take into account that the ath9k rate control algorithm was
updating private tables based on this index and the index comes
through the rate control API call, i.e., based on mac80211 TX status
call. In addition, it looks like the "fix" to remove +1 from TX status
'count' field was not correct based on ieee80211_tx_status()
implementation that counts the total of count values, but starting
from -1, not 0.
The TX status reporting for frames using MCS needs to be fixed
somehow, but it does not look like there is any easy fix for the ath9k
rate control algorithm, so the best option now seems to be to revert the
change and bring it back once the rate control code is cleaned up to
handle this better.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch fixes an issue with the sequence numbers of unaggregated
QoS frames, because of which the frames are handled in a different order
at the AP and resulted in MLME REPLAYFAILURE.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Remove the possible MAC header pad before reporting TX status to
mac80211. This pad is hardware specific operation and should not be
exposed outside the driver. This fixes the frame body in monitor
interfaces that could be used to check on TX status for transmitted
frames.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
The count field in struct ieee80211_tx_rate does not include the final
successful attempt, so only report retries here.
Fix the struct ieee80211_tx_rate::idx field when MCS was used. It is
supposed to be the MCS index, not an internal index to the rate
control algorithm table.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Split ath_softc into smaller structures for rx, tx and beacon
handling.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
ath_tx_complete_buf uses a BH version of spinlock and so releasing
the lock enables BH which is incorrect when called from sta_notify
callback as MAC80211 disables hardirqs before the driver callback
is called.
As ath_tx_complete_buf is shared between user and softirq context
using normal spinlock may not be appropriate. Though the proper
fix would be to cleanup the context properly in the driver code,
this would be an interim fix to avoid kernel warning.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
A scan run after association would change sc_curmode which is
used to get the current rate table. This patch fixes it
by removing sc_curmode and setting the rate table in usage in cur_rate_table
on association.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Using GFP_KERNEL was wrong and produces a 'scheduling while atomic'
bug as we're in a tasklet. Also, check for proper return values
now, in case allocation fails and be sure to stop the TX queue
in case of memory issues but gaurantee the TX queue will
eventually be woken up.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
pci_map_single() can fail so detect those errors with
pci_dma_mapping_error() and deal with them accordingly.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This patch kills ath9k's ath9k_opmode enum by replacing it with nl80211_iftype.
Signed-off-by: Colin McCabe <colin@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Remove all the useless __func__ prefixes in debug messages,
and replace the DPRINTF macro with a function.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
The TX channel width of the BSS can be obtained only after association.
In all cases, default to HT20 if HT is enabled, and set
chan width to HT40 only if the BSS supports it.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Merge core.c and base.c
Remove Antenna Diversity (unused now).
Remove unused chainmask handling code.
Comment, indentation scrub.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Update the rate control only with the tx status of first
AMPDU of an aggregation. This patch fixes frequent drops
in throughput.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|