I wondered about junk bytes at the end when using "lbsdebug +hex +host"
until I noticed that firmware for the CF card sends my extranous bytes.
It says "I have 20 bytes", I take 20 bytes, but the last 8 bytes of this
are just data junk.
Also, in the new lbs_cmd() where was a size miscalulation
that made itself clear after fixing this bug.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don't cast struct foo * to struct list_head *, it's safe only when
the list member is the first member of struct foo.
Also don't cast struct list_head * to struct foo *.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bad Holger. Always test on big-endian machines, if it's little-endian
you need to be swapping to/from.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Otherwise, lbs_process_rx_command() will take the new path for
lbs_cmd() responses, when it shouldn't.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This is meaningless for non-USB devices and unimplemented in their
firmware. It's somewhat dubious for USB devices too, but that's a
different story.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This explains why we never noticed the corruption of checksums on
outgoing packets... we weren't actually checking them either.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Using an arbitrary firmware command was actually very painful. One
had to change big switch() statements in cmd.c, cmdresp.c, add
structs to the big union in "struct cmd_ds_command" and add the
define for the CMD_802_11_xxx to the proper place.
With this function, this is now much easier. For now, it implements
a blocking (a.k.a. CMD_OPTION_WAITFORRSP) way where one deals directly
with command requests and response buffers. You can do everything in
one place:
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
These functions were used in the old debugfs code for events, but
as this code is now gone, there's no need to export those functions.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There was no code that ever did set this variable.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There was no code that ever did set this flag.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
As we move towards having this done by a state machine, start by having
a single 'stuff sent' function, which is called by if_usb/if_sdio/if_cs
after sending both data and commands.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This is only needed for SNMP and key operations; it doesn't need to be
preserved outside that context.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes the transmission problems introduced by
commit f04b3787bbce4567e28069a9ec97dcd804626ac7
I'm not sure if the dummy read is really required.
The old code does it. I think it can't hurt and can possibly
fix some write posting problems (hardware bugs or whatever. Who knows).
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
commit f04b3787bbce4567e28069a9ec97dcd804626ac7 introduced
a regression for the ofdmtable writing.
It incorrectly removed the writing of the high 16bits for
a 32bit table write and initialized the direction identifier
too late.
This patch does also some cleanups to make the code much more
readable and adds a few comments, so non rocket scientists are
also able to understand what this address caching is all about.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch add comments that escaped from the previous merge
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes compilation warnings introduced by 'fix ucode assertion
for RX queue overrun' patch
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This pach removes HT code from iwl-3945.h - it is not needed here as 3945
does not support HT. The code ended up here during the header file split
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Always copy the latest BSS information from the firmware's results to
the driver's BSS table to ensure that everything is up-to-date (IEs,
supported rates, encryption status, etc).
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This changes some camel-case names to follow proper kernel naming convention.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
This removes some now useless comments that were added when the driver was
developed out-of-tree.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
The driver is in mainline now so there's no need to maintain a separate version
number.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
Remove old comment as up-to-date contact information is in MAINTAINERS.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Cc: Jesse Huang <jesse@icplus.com.tw>
This patch eliminates the warning of unused return values when the driver
registers it sysfs files. Now the driver will print an error if it is
unable to register the sysfs files.
It also eliminates the macros used to wrap the DEVICE_ATTR macro and the
device_create_file function call. The macros don't reduce the number of
lines of source code in the file and the name munging makes is so that
cscope and friends don't see the references to the functions. It's better
to just call the kernel API directly.
While we're at it, the DEVICE_ATTR instances have been moved down to
be grouped with the functions they depend on.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
CCK and OFDM power levels are stored in adjacent bytes, not nibbles.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Andrea Merello <andreamrl@tiscali.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch give the iwlwifi the ability to support A-MSDU up to 8K
Please notice - in order to work in 8K A-MSDU ucode support is needed,
version 4.44.1.19 (soon to be published). 4K A-MSDU works in current ucode
version as well.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch conforms the rate scaling flows according to the new mac80211's
HT framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch conforms the addition of a new station to the iwlwifi station
table according to the new mac80211's HT framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch conforms HW configuration changes according to new mac80211's
HT framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch conforms the probe request's HT IE with the
new structures used in iwlwifi HT.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fills the mac80211's ieee80211_hw_mode structures with the
needed 802.11n data needed for the new framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch removes unnecessary or duplicate 802.11n data from structures
in the code, and prepares them for new mac80211's 802.11n framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch removes MAC80211_HT config dependency as it has been
eliminated in mac80211, and adds a needed QoS dependency
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch caches mac80211 configuration setting during a hardware
scan for the iwlwifi drivers.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch removes a redundant declaration of 'iwl3945_priv' and 'iwl4965_priv' structs.
Signed-off-by: Miguel Boton <mboton@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixed a ucode timeout issue and worked code with suspend
to disk.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch allows the driver to restock the RX queue early if the RX
queue is almost empty. This will help on avoiding any ucode assert
for the RX overrun problem.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch enhanced WPA authenication stability by avoiding scan
immediately followed by association. We don't do any scanning right
after association in next several seconds. This will allow WPA
authentication to take place without any interruption.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Document 4965 rate scaling
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add comments to Tx commands
Clean up unused definitions in iwl-3945-commands.h
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add comments to QOS and ADD_STA commands
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add comments to RXON command and txpower formats
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>