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>
This masks the PHY TX error interrupt, if debugging is disabled.
Currently we have a bug somewhere which triggers this interrupt once
in a while. (Depends on the network noise/quality). While this is nonfatal,
it scares the hell out of users and we frequently receive bugreports
that incorrectly identify this error message as the reason.
There's another problem with this. The PHY TX error interrupt is protected
with a watchdog that will restart the device if it keeps triggering very often.
This is used to fix interrupt storms from completely broken devices.
However, this watchdog might trigger in completely normal operation.
If the TX capacity of the card is saturated, the likeliness of the watchdog
triggering increases, as more TX errors occur. The current threshold
for the watchdog is 1000 errors in 15 seconds.
This patch adds a workaround for the issue by just enabling the interrupt
if debugging is disabled (by Kconfig or by modparam).
This has the downside that real fatal PHY TX errors are not caught anymore.
But this is nonfatal due to the following reasons:
* If the card is not able to transmit anymore, MLME will notice anyway.
* I did _never_ see a real fatal PHY TX error in a mainline b43 driver.
* It does _not_ result in interrupt storms or something like that.
It will simply result in a stalled card. It can be debugged by enabling
the debugging module parameter.
Signed-off-by: Michael Buesch <mb@bu3sch>
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>
A *leftover* stations is replaced with stations_39.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This fix related to bug 1921 at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1921
when detect error during stopping tx aggregation queue, report the error to
help identify the problem.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Control the rate decrease. Do not decrease the rate fast.
Use success_ratio for rate scaling :)
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwl_cmd_queue_free needs to be used to free up the cmd_queue,
as TFD slots for cmd_queue and tx_queue are different.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Total number of queues is 8 but only 7 of them are TX queues.
4 AC(Data) queue ,1 CMD and 2 HCCA. The HCCA queues are not used.
max_txq_num is set to maximum usable TX queues.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Set IEEE80211_HW_SPECTRUM_MGMT bit in hw->flags, this tell mac80211
we support spectrum mgmt.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
If user set new power level, accept the new power level and only
send command to host if the interface is up and radio on.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
allow user to set power level at all times
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When receive IEEE80211_AMPDU_RX_STOP or IEEE80211_AMPDU_TX_STOP request
in iwl_mac_ampdu_action() from mac80211; check STATUS_EXIT_PENDING bit,
if NIC is on the way out, then return 0 back to mac80211, this can
prevent mac80211 report HW error incorrectly.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
In function iwl3945_mac_config use changed flag to call only
the affected functions.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
In function iwl_mac_config use changed flag to call only
the affected functions. This patch also allow user to cache
channel, txpower and power value when the interface is not
ready and apply the changes once the interface ready.
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Add tx power calibration support
* Add a few tx power limits
* Hardcode default power to 12.5dB
* Disable TPC for now
v2: Address Jiri's comments
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove the PCI retry timeout code, for all the same reasons that
Luis Rodriguez removed it for ath9k.
Changes-licensed-under: 3-Clause-BSD
Cc: Luis Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The MIB interrupt fires whenever counters overflow; however without
support for automatic noise immunity, we can sometimes get an interrupt
storm. The get_stats() callback reads the counters anyway so we can
disable the interrupt for now until ANI is implemented. This fixes
the issue reported in http://bugzilla.kernel.org/show_bug.cgi?id=12647.
Changes-licensed-under: 3-Clause-BSD
Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Convert chip specific calibration data to a generic format common
for all chips
Note: We scale up power to be in 0.25dB units for all chips for
compatibility with RF5112
v2: Address Bob's and Jiri's comments
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Fix a typo in initvals.c so that we use the RF2425 array for RF2425 and not RF2413
Note: This also fixes incorect pd gain overlap since RF2425 has different pd gain overlap from RF2413
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Radiotap was updated to include a "bad PLCP" flag and standardise
the "bad FCS" flag in the "flags" rather than "RX flags" field,
this patch updates Linux to that standard.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
AP mode currently sets up the dual stream capability
for all stations. This patch fixes it by checking if the
associated station supports dual stream MCS rates (8-15).
We would disregard any MCS rates above 15, since Atheros
HW supports only 0..15 rates currently, and can't receive
at rates > 15 anyway.
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>
We should be checking with the 4K header and not the non-4K
header size.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
We always return true, checking for 'false' return value
is bogus anyway, so fix this.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This improves readability. Handle both 4K/non-4K EEPROM
in this patch.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Print the EEPROM version/revision on init.
Choose appropriate debug masks on error conditions,
and remove useless print messages.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove the PCI retry timeout code as that was just taken from ipw2100
due to historical reasons but in reality its a no-op, additionally its
simply incorrect as each PCI devices has its own custom PCI configuration
space on PCI config space >= 0x40. Not to mention we were trying to write
0 to a place that already has 0 on it.
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ben Cahill <ben.m.cahill@intel.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Tested-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes the TSF offset calculation for staggered Beacon frames
and sets ATH_BCBUF back to the earlier value 4 to enable multi-BSS
configurations of up to four BSSes.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When there are no free snums, UCC ethernet should gracefully fail, but
currently it oopses this way:
# ifconfig eth0 up
fill_init_enet_entries: Can not get SNUM.
ucc_geth_startup: Can not fill p_init_enet_param_shadow.
eth0: Cannot configure net device, aborting.
Unable to handle kernel paging request for data at address 0x00000190
Faulting instruction address: 0xc0294c88
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c0294c88] mutex_lock+0x0/0x1c
LR [c01b6be8] phy_stop+0x20/0x70
Call Trace:
[efb25da0] [efb2eb60] 0xefb2eb60 (unreliable)
[efb25db0] [c01b2058] ucc_geth_stop+0x2c/0x8c
[efb25dd0] [c01b4194] ucc_geth_open+0x48/0x27c
[efb25df0] [c020eec0] dev_open+0xc0/0x118
[...]
This is because the ucc_geth_stop() routine assumes that ugeth->phydev
is always initialized by the ucc_geth_open(), while it is not in case
of errors.
If we add a check to the ucc_geth_stop(), then another oops pops up:
Unable to handle kernel paging request for data at address 0x00000004
Faulting instruction address: 0xc01b46a4
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c01b46a4] adjust_link+0x20/0x1b4
LR [c01b770c] phy_state_machine+0xdc/0x44c
Call Trace:
[ef83bf10] [c021b388] linkwatch_schedule_work+0x74/0xf8 (unreliable)
[ef83bf40] [c01b770c] phy_state_machine+0xdc/0x44c
[ef83bf60] [c004c13c] run_workqueue+0xb8/0x148
[ef83bf90] [c004c870] worker_thread+0x70/0xd0
[ef83bfd0] [c00505fc] kthread+0x48/0x84
[ef83bff0] [c000f464] kernel_thread+0x4c/0x68
[...]
That one happens because ucc_geth_stop() does not call phy_disconnect()
and so phylib state machine is running without any idea that a MAC has
just died.
Also, when device tree specifies fixed-link, and CONFIG_FIXED_PHY
is disabled, we'll get this oops:
0:01 not found
eth2: Could not attach to PHY
eth2: Cannot initialize PHY, aborting.
Unable to handle kernel paging request for data at address 0x00000190
Faulting instruction address: 0xc02967d0
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c02967d0] mutex_lock+0x0/0x1c
LR [c01b6bcc] phy_stop+0x20/0x70
Call Trace:
[ef82be50] [efb6bb60] 0xefb6bb60 (unreliable)
[ef82be60] [c01b2058] ucc_geth_stop+0x2c/0x8c
[ef82be80] [c01b4194] ucc_geth_open+0x48/0x27c
[ef82bea0] [c0210a04] dev_open+0xc0/0x118
[ef82bec0] [c020f85c] dev_change_flags+0x84/0x1ac
[ef82bee0] [c037b768] ic_open_devs+0x168/0x2bc
[ef82bf20] [c037ca98] ip_auto_config+0x90/0x28c
[ef82bf60] [c0001b9c] do_one_initcall+0x34/0x1a0
[ef82bfd0] [c035e240] do_initcalls+0x38/0x58
[ef82bfe0] [c035e2c4] kernel_init+0x30/0x90
[ef82bff0] [c000f464] kernel_thread+0x4c/0x68
[...]
And again, ucc_geth_stop() assumes that ugeth->phydev is there, while
it isn't.
This patch fixes all three oopses simply by rearranging some code:
- In ucc_geth_open(): move init_phy() call to the beginning, so
that we only call ucc_geth_stop() with a PHY attached;
- Move phy_disconnect() call from ucc_geth_close() to
ucc_geth_stop(), so that we'll always disconnect the PHY.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
DMA mapping can be expensive in the presence of iommus.
Reduce the Rx iommu activity by mapping an entire page, and provide the H/W
the mapped address + offset of the current page chunk.
Reserve bits at the end of the page to track mapping references, so the page
can be unmapped.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Use resource_size_t to declare mmio start and len variables.
Print PEX error register after EEH resumed.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Enable timestamps, update delayed ack threshold for iSCSI/iWARP traffic
Remove the len flag in Tx requests. It might corrupt offload trace packets.
Update SGE context setup to avoid potential H/W misprogrammation.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Start queue set reclaim timers after the queue sets have been
allocated successfully.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>