keep it little-endian, update places that use its members
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Make it match the on-the-wire endianness, eliminate byteswapping.
The only driver that used this sucker (ipw2200) updated.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ipw2200 makes extensive use of background scanning when unassociated or
down. Unfortunately, the firmware sends scan completed events many
times per second, which the driver pushes directly up to userspace.
This needlessly wakes up processes listening for wireless events many
times per second. Batch together scan completed events for
non-user-requested scans and send them up to userspace every 4 seconds.
Scan completed events resulting from an SIOCSIWSCAN call are pushed up
without delay.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch cleans up duplicate includes in
drivers/net/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch enables the ipw2200 driver to support passive scanning as
offered by the wireless extensions. For this, I enhanced the ipw_wx_set_scan
function in such a way that it differentiates between a passive and an
active scan request. Additionally, I added a new function called
ipw_request_passive_scan that is similiar to the ipw_request_scan
function to perform passive scans. Last but not least, I added a field
(in fact it is a work_struct struct) called request_passive_scan to
the ipw_priv struct.
Signed-off-by: Thomas King <king@informatik.uni-mannheim.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When command error log debug is enabled, we write every host command and
parameters into a buffer. But we didn't alloc the parameter buffer for this
case. The patch adds struct cmdlog_host_cmd so that the buffer is allocated
from the stack.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Moving part of the debugging code from IPW_DEBUG to IPW_LL_DEBUG (low level
debugging) and make IPW_DEBUG be always enabled. IPW_LL_DEBUG still needs
to be enabled by selecting CONFIG_IPW2200_DEBUG. But it is highly
deprecated for normal users since it adds higher debug verbosity in driver
hot paths.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Well, this is not 100% if when the card fires two consecutive
interrupts. Though unlikely, it's better to protect early than seeing
some "weird" bugs one day. I proposed attached patch. If you can help to
test, that will be appreciated (I cannot see the lockdep warning on my
box somehow).
Cc: Frederik Deweerdt <deweerdt@free.fr>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
With this patch, a new promiscuous mode is enabled. If the module is loaded
with the rtap_iface=1 module parameter, two interfaces will be created
(instead of just one).
The second interface is prefixed 'rtap' and provides received 802.11 frames
on the current channel to user space in a radiotap header format.
Example usage:
% modprobe ipw2200 rtap_iface=1
% iwconfig eth1 essid MyNetwork
% dhcpcd eth1
% tcpdump -i rtap0
If you do not specify 'rtap_iface=1' then the rtap interface will
not be created and you will need to turn it on via:
% echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
You can filter out what type of information is passed to user space via
the rtap_filter sysfs entry. Currently you can tell the driver to
transmit just the headers (which will provide the RADIOTAP and IEEE
802.11 header but not the payload), to filter based on frame control
type (Management, Control, or Data), and whether to report transmitted
frames, received frames, or both.
The transmit frame reporting is based on a patch by Stefan Rompf.
Filters can be get and set via a sysfs interface. For example, set the
filter to only send headers (0x7), don't report Tx'd frames (0x10), and
don't report data frames (0x100):
% echo 0x117 > /sys/bus/pci/drivers/ipw2200/*/rtap_filter
All your packets are belong to us:
% tethereal -n -i rtap0
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch replaces sliding averaging by exponential averaging for
reporting the wireless statistics for signal and noise level for ipw2200.
See details from: http://www.ces.clemson.edu/linux/ipw2200_averages.shtml
Signed-off-by: Bill Moss <bmoss@clemson.edu>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The patch allows the user to set the handover threshold, i.e. the number
of consecutively missed beacons that will trigger a roaming attempt. The
disassociation threshold is set to 3 times the handover threshold.
Signed-off-by: Olivier Hochreutiner <olivier.hochreutiner@epfl.ch>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This forces one antenna or the other, if the background noise is
significantly quieter in one than the other. It favors the quieter
antenna, and won't kick in unless the difference is significant.
Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Set a meaningful silence threshold value (replacing our previous "0"
default), which gets rid of the gratuitous "Link deterioration"
notifications that we've been receiving from firmware. This
notification feature tells the driver information to help it determine
when to pre-emptively restart the firmware/ucode in anticipation of
firmware errors! But since setting this new threshold, I haven't seen
any such notifications. At least it keeps the logs a little less busy.
Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
replace ipw2200 specific frame_hdr_len() with generic
ieee80211 routine ieee80211_get_hdrlen()
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Ronald Bultje <rbultje@ronald.bitfreak.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Yi Zhu <yi.zhu@intel.com>
Cc: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Checking the stack usage of my kernel, showed that ipw2200 had a few bad
offenders. This is on i386 32-bit:
0x00002876 ipw_send_associate: 544
0x000028ee ipw_send_associate: 544
0x000027dc ipw_send_scan_request_ext: 520
0x00002864 ipw_set_sensitivity: 520
0x00005eac ipw_set_rsn_capa: 520
The reason is the host_cmd structure is large (500 bytes). All other
functions currently using ipw_send_cmd() suffer from the same problem.
This patch introduces ipw_send_cmd_simple() for commands with no data
transfer, and ipw_send_cmd_pdu() for commands with a data payload and
makes the payload a pointer to the buffer passed in from the caller.
As an added bonus, the diffstat looks like this:
ipw2200.c | 260 +++++++++++++++++++++-----------------------------------------
ipw2200.h | 2
2 files changed, 92 insertions(+), 170 deletions(-)
and it shrinks the module a lot as well:
Before:
text data bss dec hex filename
75177 2472 44 77693 12f7d drivers/net/wireless/ipw2200.ko
After:
text data bss dec hex filename
61363 2488 44 63895 f997 drivers/net/wireless/ipw2200.ko
So about a ~18% reduction in module size.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This substitutes Linux jiffies_to_msec() wherever there is a
computation for determining milliseconds from jiffies,
following lead from ieee80211 code. And it does a little cleanup.
"it's" == "it is" ... "its" == possessive "it". Indulge me. ;-)
Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
I've added a new module param "bt_coexist" which defaults to OFF.
This does not seem to fix the firmware restarts, but it does do "the
right thing" and disables something that we were enabling by default:
signaling the Bluetooth h/w which channel we're on (whether or not the
BT h/w was out there).
Signed-off-by: Ben M Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The indirect SRAM/register 8/16-bit write routines are broken for
non-dword-aligned destination addresses.
Fortunately, these routines are, so far, not used for non-dword-aligned
destinations, but here's a patch that fixes them, anyway.
The attached patch also adds comments for all direct/indirect I/O routine
variations.
Signed-off-by: Ben M Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch contains the following possible cleanups:
- make needlessly global functions static
- "extern inline" -> "static inline"
- #if 0 the unused global function ipw_led_activity_on()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There are currently two IPW_DEBUG options in drivers/net/wireless/Kconfig
(one for ipw2100 and one for ipw2200). The attached patch splits it into
IPW2100_DEBUG and IPW2200_DEBUG.
Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
Cc: "James P. Ketrenos" <ipw2100-admin@linux.intel.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch removes almost all inclusions of linux/version.h. The 3
#defines are unused in most of the touched files.
A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.
There are also lots of #ifdef for long obsolete kernels, this was not
touched. In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.
quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`
search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Wireless extensions moved the get_wireless_stats handler from being
in net_device into wireless_handler.
Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
You can now specify via the module parameter 'cmdlog' to allocate a
ring buffer for caching host commands sent to the firmware. They can
then be dumped at any time via the sysfs entry 'cmd_log'
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
via sysfs even if debugging disabled. When a firmware error is
captured, it will be dumped to the kernel log (if debug enabled) and
captured in memory to be retrieved via sysfs.
If an error has already been captured, subsequent errors will be
dropped.
The existing error can be cleared by writing to the error log entry.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
We send SYSTEM_CONFIG command after the TGI_KEY command if hardware
encryption is enabled. It sometimes causes a firmware stall (firmware
doesn't respond to any request) and finally bungs up the Tx send queue.
The solution is to send SYSTEM_CONFIG command in the post association
stage from a workqueue.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
* Fixed#452 problem with setting retry limit (thanks to Hong Liu)
* Fixed#592 race condition during association causing firmware errors
* Fixed#602 problem with building in 64-bit environment
* Fixed#625 problem with SCAN_REQUEST_EXT sometimes failing
* Fixed#645 problem with bit rate not decreasing when moving laptop
farther from AP
* Fixed#656 problem with 'iwconfig eth1 mode auto' and 'modprobe'
locking the system
* Fixed#667 problem with "No space for Tx" for hwcrypto=1
* Fixed#685 kernel panic in rmmod caused by led work is still queued
* Fixed#695 problem with network doesn't reassociate after suspend/resume
* Fixed#701 problem with 'iwprvi sw_reset' not resetting the card from
monitor mode
* Fixed#710 problem with monitor mode being used after a WEP key has
been configured
* Fixed network->mode vs. priv->ieee->iw_mode checking (thanks to Ben Cahill)
* Fixed "Unknown management packet %d" warning
* Fixed setting channels multiple times in monitor mode causes scan stopped
* Fixed ipw_wx_sw_reset doesn't switch firmware if mode is changed.
* Add duplicate packet checking code (kill ping DUP! and TKIP replay warning)
* Fix hardware encryption (both WEP and AES) doesn't work with fragmentation.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
* Fixed#627 problem with open APs not working with wpa_supplicant
* Fixed#632 problem with 'txpower auto' setting power incorrectly (thanks
to Kai Groner)
* Fixed#634 problem with 'iwconfig eth1 frag 0' hanging the shell
* Fixed problem with adapter not fully powering off during suspend to RAM or
when module unloaded.
* Fixed#645 problem with turning fixed rates off not taking effect until
you reload the driver
* Fixed problem with firmware restart if wpa_supplicant was used to set a key
that wasn't exactly 5 or 13 bytes in length.
* Fixed#623 Added iwpriv sw_reset extension to reset sw parameters
* Added managment frame export to user space with frame statistics
* Fixed#652 Modified the driver to load the EEPROM data even if RF KILL is
active during driver load
* Global s:CX2_:IPW_:g to make code more consistent
* Fixed#572 problem with setting txpower to auto
* Fixed#656 problem with kernel oops if mode auto; modprobe -r ipw2200
* Added QoS (CONFIG_IPW_QOS) support. This is being actively developed but
is the first step in getting WMM support into the driver and the kernel.
* Fixed some race conditions with channel changes, association, and scan
abort that could periodically cause a firmware restart.
* Added some extensions to export scan and network statistics to user space
(exposed through speed_scan and net_stats sysfs entries)
* Fixed a few bugs in how monitor mode was supported (scan lists
weren't quite right)
* Updated the firmware requirement from 2.2 to 2.3 which supports
monitor mode.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
* Fix#616 problem with OOPS on module load (thanks to Yi Zhu)
* Fixed problem with led module parameter being described as
'auto_create'
* Added support to merge between adhoc networks (thanks to Mohamed Abbas)
* Added semaphore lock at the driver's entry points to protect against
re-entry (thanks to Mohamed Abbas)
* Added semaphore lock to background scheduled driver actions (thanks to
Mohamed Abbas)
* Changed how signal quality is reported for scan output (thanks to
Peter Jones)
* Fixed how high/low clamp values of signal quality are reported so a
more consistent ramp is provided (thanks to Bill Moss)
* Fix#624 problem with duplicate addresses (again) (thanks to Bernard
Blackham)
* Fix#385 problem with fragmentation and certain sized packets (thanks
to Mohamed Abbas)
* Modified iwconfig network name if RF kill is enabled to say 'radio off'
* Fix#382 problem with driver not responding to probe requests in Ad-Hoc
mode (thanks to Mohamed Abbas)
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Removed unneeded parenthesis around numeric constant defines
Added support for iwspy
Put in fix for Ad-Hoc mode not passing through all packets (thanks to KKH)
Put in fix for fragmentation not working for fragment sizes between
441-464 bytes (thanks to Mohamed Abbas)
Fixed#592 problem of CONFIG_IEEE80211_WPA_MODULE not including WPA
support into the driver -- fixed as a result of no longer limiting WPAs
inclusion
Fixed#594 problem with user rates mask causing lack of association if
AP mandatory rate is masked out. We now add back in as a supported rate
any mandatory rate.
Fixed#597 kernel oops due to calling dev_kfree_skb on an skb multiple times.
Added code to control LEDs that can be controlled through the wireless
NIC (vs. non-wireless HW interfaces) -- this is currently disabled by
default due to reports by some users of it hanging their laptop.
Added some more debug messages around fragmentation logic
Added locking around STATUS_HCMD_ACTIVE to prevent re-entry race
conditions
Moved ipw_adapter_restart to only execute on the priv->workqueue to
keep keyboard errors from occuring during adapter restart
Added CFG_BACKGROUND_SCAN to easily allow people to play with
background scanning implementations
Modified WPA logic to send WPA IE if one is set (vs. being based on
wpa_enabled)
Modified scan result logic to report WPA and RSN IEs if set (vs. being
based on wpa_enabled)
Fixed issues with endianess compatability between the host and
wireless adapter (thanks to York Liu and Yi Zhu)
Fixed problem with Ad-Hoc network creation causing a firmware error if
a scan was actively running (thanks to Mohamed Abbas)
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
This commit contains the following fixes:
Fixed#559: iwconfig rate support (thanks to Florian Hackenberger)
Improved link signal quality calculation (thanks to Bill Moss)
Fixed a problem with sensitivity threshold during association
Added iwpriv for turning forcing long preamble support:
% iwpriv eth1 set_preamble 1|0
Fixed#542 and #377 support for short preamble
Fixed locked BSSID reporting channel number (thanks to Pedro
Ramalhais)
Fixed type-o with scan watchdog timeout message (thanks to Pedro
Ramalhais)
Changed logic for displaying get_mode output so the code is easier to
follow (thanks to Pedro Ramalhais)
Added initial support for WPA (thanks to Yi Zhu) -- tested with
wpa_supplicant (either tip w/ ipw driver, or with -Dipw2100) with
both CCMP and TKIP
Fixed problem with CCMP not working due to uninitialized 802.11
header fields (thanks to Pedro Ramalhais)
Bug references are to defects stored on http://bughost.org
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
tree 9f86c7b4f59249c05c96c360dfaa817995e8a44f
parent 9b09701b2c6254f2fddb009004a14eb5a908714f
author James Ketrenos <jketreno@linux.intel.com> 1126714305 -0500
committer James Ketrenos <jketreno@linux.intel.com> 1127316074 -0500
Updated ipw2200 to be compatible with ieee80211_hdr changes.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
No code changes, just Lindent + manual fixups.
This prepares us for updating to the latest Intel driver code, plus
gives the source code a nice facelift.
This removes one trap for a programmer, few unused macros, and one
unused struct.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jiri Benc <jbenc@suse.cz>