L2 padding will only be present when there is actual payload present.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Simplify the rt2x00queue_insert_l2pad function by handling the alignment
operations one by one. Do not special case special circumstances.
Basically first perform header alignment, and then perform payload alignment
(if any payload does exist). This results in a properly aligned skb.
The end result is better readable code, with better results, as now L2 padding
is inserted only when a payload is actually present in the frame.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
With the improved L2 padding code, this flag is no longer necessary, as the
rt2x00queue_remove_l2pad is capable of detecting by itself if L2 padding is
applied.
For received frames the RX descriptor flag is still being checked.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix a couple of more bugs in the L2 padding code:
1. Compute the amount of L2 padding correctly (in 3 places).
2. Trim the skb correctly when the L2 padding has been applied.
Also introduce a central macro the compute the L2 padding size.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Otherwise we end up truncating the skb before removing the l2pad
thus we might have the truncated part become garbage while getting
it back in remove_l2pad.
For the same issue: remove the skb_trim from the rt2800 fill_rxdone
(it is done after l2pad removal in rt2x00lib_rxdone).
Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Do not include timestamp for a frame that has been injected
through a monitor interface.
Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The padding is to be added between header and payload for the only header need
padding case.
Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
platform rfkill is async thus we may try to read while the device is
already off.
Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kenichi HORIO <moattailk1@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Do not need to log error when fail the sensitivity command, driver will send
sensitivity write command to uCode after each sensitivity calibration if
station is associated with AP. It is a normal case when user unload the module
or shutdown the system while still associated with the AP, since uCode already
on the way down, it will not reply the sensitivity write request; report
error in this case will give misleading information, remove the error checking
here to provide a clean shutdown if no other error detected.
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>
This feature enables the on-screen uCode event log dump. The original
method will append the event log to syslog; with this capability,
we also enable the user to write script to capture the
events which provide additional flexibility to help uCode debugging
Method
1) change to debugfs directory (sys/kernel/debug/phyX/iwlagn/data)
2) #cat log_event
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 order to help uCode debugging, adding the capability to provide
continuous uCode event logging function.
uCode events is located in round-robin event queue and filled by uCode,
by enable continuous event logging, driver check the write pointer
and log the newly added events in iwl_bg_ucode_trace() timer function.
There is still possibility of missing events if event queue being
wrapped before next event dump; but with this capability, we can have
much better understanding of the uCode behavior during runtime; it can
help to debug the uCode related issues.
Methods to enable/disable the continuous event log:
step 1: enable ucode trace timer
"echo 1 >
/sys/kernel/debug/ieee80211/phyX/iwlagn/debug/ucode_tracing"
step 2: start ftrace
sudo ./trace-cmd record -e iwlwifi_ucode:* sleep 1d
step 3: stop ftrace
sudo ./trace-cmd report trace.dat
step 4: disable ucode trace timer
"echo 0 >
/sys/kernel/debug/ieee80211/phyX/iwlagn/debug/ucode_tracing"
use "ucode_tracing" debugfs file to display number of event
queue wrapped when driver attempt the continuous event logging. If event
queue being wrapped more than once when driver has opportunity to log
the event; it indicated there are events missing in the event log trace.
This continuous event log function only available for 4965 and newer
NICs.
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>
When uCode HW/SW error detected, dumping important CSR (Control and Status
Registers) values.
Also add "csr" debugfs file to dump the current values of CSR defined in
CSR table to syslog.
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>
Change name from RF_CARD_DISABLED to CT_CARD_DISABLED to match the
indication from uCode, also log the debug message when the condition
detected in iwl_rx_card_state_notif()
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>
This patch provides infrastructure for machine translation of the
regulatory rules database used by CRDA into a C data structure.
It includes code for searching that database as an alternative
to dynamic regulatory rules updates via CRDA. Most people should
use CRDA instead of this infrastructure, but it provides a better
alternative than the WIRELESS_OLD_REGULATORY infrastructure (which
can now be removed).
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The payload alignment warning enabled by MAC80211_DEBUG_PACKET_ALIGNMENT is
difficult. To fix it, a firmware change is needed but in most cases that's
very difficult. So the benefit from the warning is low and most probably
it just creates more confusion for people who just enable all warnings
(like it did for me).
Remove the unaligned IP payload warning and the kconfig option. But
leave the unaligned packet warning, it will be enabled with
MAC80211_VERBOSE_DEBUG.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When building rtl8180, the following warning occurs:
CC [M] drivers/net/wireless/rtl818x/rtl8180_dev.o
drivers/net/wireless/rtl818x/rtl8180_dev.c: In function ‘rtl8180_handle_rx’:
drivers/net/wireless/rtl818x/rtl8180_dev.c:135: warning: ‘qual’ is deprecated
(declared at include/net/mac80211.h:562)
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
rndis_wlan didn't copy module parameters for bcm4320a to private structure.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Everything is ready now and we can enable WMM in mac80211.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Before transmission when aligning the buffer to 4-byte bounday, tx_hdr
needs to be updated. Otherwise debug logs print false data.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Now that necessary commands for WMM are implemented, implement queue handling
for WMM. But WMM is not enabled yet, only one queue is used.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Needed for WMM.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Needed for WMM.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
RX is handled in a workqueue therefore allocating for GFP_ATOMIC
is overkill and not required.
Based on a patch for wl1271 by Luis R. Rodriguez.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The wakeup time calculation was too complicated, simplify it.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The original TI driver uses 100 ms timeout ELP wakeup timeout, better
to use the same. Otherwise problems with wakeup might get unnoticed.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Not all return values were checked and one exit from function didn't put
firmware sleep after the error.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This debug message was missing and caused incomplete log messages.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sometimes when debugging the state is good info.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes a rather embarrassing typo.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch aggregates a bunch of small random changes
that won't fit really anywhere else properly.
1. move tid-locating macro into a separate function.
2. remove redundant NULL check.
3. add modulation mask definition
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The flags in question were once useful for debugging.
Time has passed and now they do nothing more than
duplicating txinfo->flags.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
AR9170 has the bad habit of choking when traffic builds up.
Tests have shown that this can partially be attributed to
a huge buildup of backlogged frames.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch removes dead infrastructure which was meant
for an out-of-tree rate control algorithm.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
It's not all that useful to have the vif/sdata pointer,
we'd rather refer to the interfaces by their name.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
For bluetooth 3, we will most likely not have
a netdev for a virtual interface (sdata), so
prepare for that by reducing the reliance on
having a netdev. This patch moves the name
and address fields into the sdata struct and
uses them from there all over. Some work is
needed to keep them sync'ed, but that's not
a lot of work and in slow paths anyway.
In doing so, this also reduces the number of
pointer dereferences in many places, because
of things like sdata->dev->dev_addr becoming
sdata->vif.addr.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The station management currently uses the virtual
interface, but you cannot add the same station to
multiple virtual interfaces if you're communicating
with it in multiple ways.
This restriction should be lifted so that in the
future we can, for instance, support bluetooth 3
with an access point that mac80211 is already
associated to.
We can do that by requiring all sta_info_get users
to provide the virtual interface and making the RX
code aware that an address may match more than one
station struct. Thanks to the previous patches this
one isn't all that large and except for the RX and
TX status paths changes has low complexity.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BugLink: https://bugs.launchpad.net/ubuntu/+bug/254837
Spurious shared interrupts or early probing interrupts can cause the
hostap interrupt handler to oops before the driver has fully configured
the IO base port addresses. In some cases the oops can be because
the hardware shares an interrupt line, on other cases it is due to a
race condition between probing for the hardware and configuring
the IO base port. The latter occurs because the probing is required to
determin the hardware port address which is only determined when the probe
can interrupt the hardware (catch 22).
This patch catches this pre-configured condition to avoid the oops.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
By default, the PATA pins are routed to the async address lines in which
case, no peripheral muxing needs to be done. However, if the pins get
routed through the GPIO PORTs pins, we need to make sure to request them
so that the muxing is properly set up.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
The second parameter to alignf() in allocate_resource() must
reflect what new resource is attempted to be allocated, else
functions like pcibios_align_resource() (at least on x86) or
pcmcia_align() can't work correctly.
Commit 1e5ad96790 broke this by
setting the "new" resource until we're about to return success.
To keep the resource untouched when allocate_resource() fails,
a "tmp" resource is introduced.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
pata_cmd64x: fix overclocking of UDMA0-2 modes
Revert "pata_cmd64x: implement serialization as per notes"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
bnx2: Fix bnx2_netif_stop() merge error.
gianfar: Fix bit definitions of IMASK_GRSC and IMASK_GTSC
gianfar: Fix stats support
gianfar: Fix a filer bug
bnx2: fixing a timout error due not refreshing TX timers correctly
can/at91: don't check platform_get_irq's return value against zero
mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion
bnx2: reset_task is crashing the kernel. Fixing it.
ipv6: fix an oops when force unload ipv6 module
TI DaVinci EMAC: Fix MDIO bus frequency configuration
e100: Fix broken cbs accounting due to missing memset.
broadcom: bcm54xx_shadow_read() errors ignored in bcm54xx_adjust_rxrefclk()
e1000e: LED settings in EEPROM ignored on 82571 and 82572
netxen: use module parameter correctly
netns: fix net.ipv6.route.gc_min_interval_ms in netns
Bluetooth: Prevent ill-timed autosuspend in USB driver
Bluetooth: Fix L2CAP locking scheme regression
Bluetooth: Ack L2CAP I-frames before retransmit missing packet
Bluetooth: Fix unset of RemoteBusy flag for L2CAP
Bluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid()
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (24 commits)
ALSA: sbawe: fix memory detection
ALSA: fix incorrect rounding direction in snd_interval_ratnum()
ALSA: HDA: add powersaving hook for Realtek
ALSA: HDA: remove useless mixers on Aspire 8930G
ALSA: HDA: simplify Aspire 8930G verb array
ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410
ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL
ALSA: Use kzalloc for allocating only one thing
ALSA: AACI: switch to per-pcm locking
ALSA: AACI: add double-rate support
ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params
ALSA: AACI: cleanup aaci_pcm_hw_params
ALSA: AACI: simplify codec rate information
ALSA: aaci - Fix a typo
ASoC: wm8974: fix a wrong bit definition
sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer
ALSA: hda - Fix quirk for Maxdata obook4-1
ALSA: hda - Fix missing capsrc_nids for ALC88x
ALSA: hda - Make use of beep device found in Dell Vostro 1015n
ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015
...
The option to support the old style PSK interface in the PS3
GELIC wireless drivers requires CONFIG_WEXT_PRIV to be set
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
My
commit 77fdaa12ce
Author: Johannes Berg <johannes@sipsolutions.net>
Date: Tue Jul 7 03:45:17 2009 +0200
mac80211: rework MLME for multiple authentications
inadvertedly broke WMM because it removed, along with
a bunch of other now useless initialisations, the line
initialising sdata->u.mgd.wmm_last_param_set to -1
which would make it adopt any WMM parameter set. If,
as is usually the case, the AP uses WMM parameter set
sequence number zero, we'd never update it until the
AP changes the sequence number.
Add the missing initialisation back to get the WMM
settings from the AP applied locally.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.31+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
I noticed yesterday, because Jeff had noticed
a speed regression, cf. bug
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2138
that the SM PS settings for peers were wrong.
Instead of overwriting the SM PS settings with
the local bits, we need to keep the remote bits.
The bug was part of the original HT code from
over two years ago, but unfortunately nobody
noticed that it makes no sense -- we shouldn't
be overwriting the peer's setting with our own
but rather keep it intact when masking the peer
capabilities with our own.
While fixing that, I noticed that the masking of
capabilities is completely useless for most of
the bits, so also fix those other bits.
Finally, I also noticed that PSMP_SUPPORT no
longer exists in the final 802.11n version, so
also remove that.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>