Commit graph

73701 commits

Author SHA1 Message Date
Alexander Duyck f2ca0dbe07 igb: replace the VF clear_to_send with a flags value
In order to support future features it is easiest to replace the
clear_to_send boolean with a flag value.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 03:25:39 -07:00
Alexander Duyck d249be5474 igb: use packet buffer sizes from RXPBS register
This patch changes the configuration for 82576 so that it uses the actual
value of the 82576 rx packet buffer size instead of just assuming the
value.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 03:25:38 -07:00
Alexander Duyck 317f66bdad igb: misc cleanups within igb_ethtool.c
This patch just goes thorugh and does several cleanups on igb_ethtool.c.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 03:25:34 -07:00
Alexander Duyck c5b9bd5e4f igb: cleanup some of the code related to hw timestamping
The code for the hw timestamping is a bit bulky and making some of the
functions difficult to read.  In order to clean things up a bit I am moving
the timestamping operations into seperate functions.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 03:25:33 -07:00
Alexander Duyck 4fc82adfb0 igb: add support for seperate tx-usecs setting in ethtool
This patch adds support for a seperate tx-usecs interrupt moderation setting
in ethtool which is supported when tx and rx interrupt vectors are sperated.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 03:25:31 -07:00
Ben Hutchings 9c1bbbaf3e sfc: Really allow RX checksum offload to be disabled
We have never checked the efx_nic::rx_checksum_enabled flag everywhere
we should, and since the switch to GRO we don't check it anywhere.
It's simplest to check it in the one place where we initialise the
per-packet checksummed flag.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 02:50:44 -07:00
Sreenivasa Honnur 5beefb4f77 vxge: Configure the number of transmit descriptors per packet to MAX_SKB_FRAGS + 1.
- Configure the number of transmit descriptors per packet to MAX_SKB_FRAGS + 1.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 02:46:54 -07:00
Randy Dunlap 0531d7b851 netxen: fix builds for SYSFS=n or MODULES=n
When CONFIG_MODULES=n:
drivers/net/netxen/netxen_nic_main.c:2751: error: dereferencing pointer to incomplete type
drivers/net/netxen/netxen_nic_main.c:2764: error: dereferencing pointer to incomplete type

Also needs addition of <linux/sysfs.h> for sysfs function prototypes or
stubs when CONFIG_SYSFS=n.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 02:36:24 -07:00
Eric Dumazet 23289a37e2 net: add a list_head parameter to dellink() method
Adding a list_head parameter to rtnl_link_ops->dellink() methods
allow us to queue devices on a list, in order to dismantle
them all at once.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 02:22:07 -07:00
Alexander Duyck 83ab50a56e igb: cleanup "todo" code found in igb_ethtool.c
This patch moves some defines into the e1000_regs.h file since this is the
correct place for register defines and not inside of igb_ethtool.c

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:43 -07:00
Alexander Duyck 4eefa8f013 igb: add single vector msi-x testing to interrupt test
This change adds testing of the first msix vector to the interrupt testing.
This should help with determining the cause of interrupt issues when they are
encountered.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:42 -07:00
Alexander Duyck ad93d17efe igb: make ethtool use core xmit map and free functionality
This change adds a clean_rx/tx_irq type function call to the ethtool loopback
testing which allows us to test the core transmit and receive functionality in
the driver.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:41 -07:00
Alexander Duyck b1a436c34c igb: make tx ring map and free functionality non-static
This change makes a minor change to the xmit_frame_ring_adv funcition in that
it moves 2 checks from it into the xmit_frame_adv since the checks were not
ring specific.  In addition it exports the xmit_frame_ring_adv and the
unmap_and_free_tx_resource calls so that they can be used by other code such
as the ethtool loopback testing calls.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:40 -07:00
Alexander Duyck d7ee5b3a78 igb: re-use ring configuration code in ethtool testing
Since all of the ring code is now specific to the ring instead of the adapter
struct it is possible to cut a large section of code out of the ethtool
testing configuraiton since we can just use the existing functions to
configure the rings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:37 -07:00
Alexander Duyck 10d8e9073a igb: setup vlan tag replication stripping in igb_vmm_control
This update adds vlan tag stripping for inter-vf communications to the
igb_vmm_control configuration function.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:36 -07:00
Alexander Duyck d4960307ea igb: delay VF reset notification until after interrupts are enabed
This update delays the VF reset notification until after interrupts are
enabled.  Otherwise there is a chance of having the VF try to reset itself too
soon and being ignored by the PF as a result.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:35 -07:00
Alexander Duyck 06cf2666c7 igb: move the multiple receive queue configuration into seperate function
This patch moves the multiple receive queue configuration into a seperate
function from igb_configure_rx.  We can essentially do the configuration for
the multiple receive queues just prior to enabling the RX and this will allow
us to seperate the queue enablement from the receive queue layout
configuration.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:34 -07:00
Alexander Duyck e694e964fc igb: place a pointer to the netdev struct in the ring itself
This change adds a pointer to the netdev to the ring itself.  The idea being
at some point in the future it will be possible to support multiple netdevs
from a single adapter struct.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:32 -07:00
Alexander Duyck 85ad76b2f9 igb: add a flags value to the ring
This patch adds a flags value to the ring that cleans up some of the last
remaining items from the ring in order to help seperate it from the adapter
struct.  By implementing these flags it becomes possible for different rings
to support different functions such as rx checksumming.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:30 -07:00
Alexander Duyck 04a5fcaaf0 igb: move alloc_failed and csum_err stats into per rx-ring stat
The allocation failed and checksum error stats are currently kept as a
global stat.  If we end up allocating the queues to multiple netdevs then
the global counter doesn't make much sense.  For this reason I felt it
necessary to move the alloc_rx_buff_failed stat into the rx_stats
portion of the rx_ring.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:29 -07:00
Alexander Duyck 4c844851d1 igb: move rx_buffer_len into the ring structure
This patch moves the rx_buffer_len value into the ring structure.  This allows
greater flexibility and the option of doing things such as supporting packet
split only on some queues, or enabling virtualization.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:28 -07:00
Alexander Duyck 80785298aa igb: add pci device pointer to ring structure
This patch adds a pci device pointer to the ring structure.  The main use of
this pointer is for memory mapping/unmapping of the rings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:26 -07:00
Alexander Duyck fce99e3415 igb: change the head and tail offsets into pointers
Since we are writting to the head/tail pointers frequently we might as well
save ourselves some processing time by converting the head and tail offsets
directly to pointers.  This will shave a few cycles off the rx/tx path and
allows us to move one step closer to the rings being a bit more independant of
each other.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:24 -07:00
Alexander Duyck 952f72a8ce igb: move SRRCTL register configuration into ring specific config
The SRRCTL register exists per ring.  Instead of configuring all of them in
the RCTL configuration which is meant to be global it makes more sense to move
this out into the ring specific configuration.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:22 -07:00
Alexander Duyck 6ec43fe635 igb: remove rx_ps_hdr_len
This patch removes the rx_ps_hdr_len which isn't really needed since we can
now use rx_buffer_len less than 1K to indicate that we are in a packet split
mode.  We also don't need it since we always use a half page for the data
buffers when receiving so we always know the size to map/unmap.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:21 -07:00
Alexander Duyck 85b430b477 igb: move the tx and rx ring specific config into seperate functions
This change makes the tx and rx config a bit cleaner by breaking out the ring
specific configuration from the generic rx and tx configuration.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:20 -07:00
Alexander Duyck 7d95b7170e igb: increase minimum rx buffer size to 1K
This update increases the minimum rx buffer size to 1K.  The reason for this
change is to support SR-IOV and avoid any conflicts with the rings being able
to set their own MTU sizes.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:18 -07:00
Alexander Duyck 094919a4b0 igb: remove rx checksum good counter
Counting packets with a good checksum can cause a significant amount of cache
line bouncing due to the shared counter being written to by all of the queues.
In order to avoid this I am removing the counter since we still have the
checksum failed counter which will tell us if there are any issues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:17 -07:00
Alexander Duyck 047e0030f1 igb: add new data structure for handling interrupts and NAPI
Add a new igb_q_vector data structure to handle interrupts and NAPI.  This
helps to abstract the rings away from the adapter struct.  In addition it
allows for a bit of consolidation since a tx and rx ring can share a
q_vector.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-28 01:20:16 -07:00
Jie Yang 678b77e265 atl1c: duplicate atl1c_get_tpd
remove duplicate atl1c_get_tpd, it may cause hardware to send wrong packets.

Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-27 22:31:19 -07:00
Vivek Natarajan bd6b4442ff ath: Updates for regulatory and country codes.
Add a few new country codes and update the regulatory domain for some
countries.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:50:04 -04:00
Wey-Yi Guy d23000cd89 iwlwifi: minor comments changes for wimax co-exist command
'COEX_PRIORITY_TABLE_CMD' host command will be supported for 5000 series
and up.

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>
2009-10-27 16:50:04 -04:00
Ben Cahill c166b25a5c iwlwifi: make sure device is reset when unloading driver
Add unconditional call to apm_ops.stop() to reset device to low power state
when unloading driver.  Some paths have existed to unload driver *without*
resetting device, therefore some errors have persisted through multiple
load/unload cycles, until the whole platform gets rebooted; this is an
attempt to remedy some of those situations.  Sorry, I can't seem to find
a bughost.org bug that specifically has these symptoms, but I had it happen
recently here.

Note that this will *not* fix situations in which the PCI express bus has
crashed (evidenced by register reads showing "0xffffffff"), e.g. bughost.org
1855 and 2096; device is unreachable from driver in those cases.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:50:03 -04:00
Wey-Yi Guy 442464218d iwlwifi: update lowest API version support for 6x00 & 6x50 series
For 6x00 and 6x50 series devices, APIv4 is the lowest firmware version
driver can support. This is also the lowest API version available to the
public so there is no need for backward compatibility support for the
earlier API versions.

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>
2009-10-27 16:50:03 -04:00
Wey-Yi Guy 570af86e0a iwlwifi: remove duplicated define
Duplicated define for listen interval (IWL_CONN_MAX_LISTEN_INTERVAL and
IWL_CONN_LISTEN_INTERVAL), remove IWL_CONN_LISTEN_INTERVAL

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Reported-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:50:03 -04:00
Zhu Yi 7300515d10 iwlwifi: reuse page for notification packets
For notification packets and SKBs that fail to rx correctly, add
them back into the rx_free list so that the pages can be reused
later. This avoids allocating new rx pages unnecessarily.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:50:03 -04:00
Wey-Yi Guy 71c55d90f9 iwlwifi: remove unused parameters
parameters "len" is not used in both iwl_tx_queue_free() and
iwl_cmd_queue_free() functions

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>
2009-10-27 16:50:02 -04:00
Reinette Chatre 6c5cd9d524 iwlwifi: remove duplicate defines
RX_FREE_BUFFERS and RX_LOW_WATERMARK are currently defined in four places.
Based on how files are included we only need the definition in iwl-fh.h

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reported-by: Frans Pop <elendil@planet.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:50:02 -04:00
Wey-Yi Guy 4a56e9652e iwlwifi: add channel switch support to 5000 series and up
Support "channel switch" request by issue "channel switch" host command
to uCode.

There is no separated "channel switch" indication from mac80211,
when detected "IEEE80211_CONF_CHANGE_CHANNEL" flag in iwl_mac_config(),
if the station is in "associated" state, then assume "channel switch
announcement" IE was received by mac80211.

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>
2009-10-27 16:50:02 -04:00
Wey-Yi Guy 480e8407dc iwlwifi: issue ct_kill host command based on device config
Using device configuration structure to decide how to configure
ct_kill host command.

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>
2009-10-27 16:50:01 -04:00
Wey-Yi Guy 6047b4f939 iwlwifi: choose thermal throttle method based on device config
Using device configuration structure to decide the type of thermal
throttle method for the device.

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>
2009-10-27 16:50:01 -04:00
Wey-Yi Guy c8c24872c6 iwlwifi: increase max tfd payload size
Increase the size of TFD_MAX_PAYLOAD_SIZE (the size of iwl_device_cmd)
to accommodate iwl6000_channel_switch_cmd data structure.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:50:01 -04:00
Zhu Yi 29b1b2688f iwlwifi: fix use after free bug for paged rx
In the paged rx patch (4854fde2), I introduced a bug that could possibly
touch an already freed page. It is fixed by avoiding the access in this
patch. I've also added some comments so that other people touching the
code won't make the same mistake. In the future, if we cannot avoid
access the page after being handled to the upper layer, we can use
get_page/put_page to handle it. For now, it's just not necessary.

It also fixed a debug message print bug reported by Stanislaw Gruszka
<sgruszka@redhat.com>.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:50:01 -04:00
Wey-Yi Guy 52aa081c40 iwlwifi: specify the valid tx/rx chain in device config structure
Specify both Tx and Rx chain in device configuration structure instead
of hard code in set_hw_params() for 4965

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>
2009-10-27 16:50:00 -04:00
Wey-Yi Guy 456d0f7672 iwlwifi: update bt co-exit configuration parameter
Adding parameter ranges for bt co-exist configuration command.

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>
2009-10-27 16:49:59 -04:00
Wey-Yi Guy 1ed2a3d29a iwlwifi: separate led function from statistic notification
Detach led background task from statistic notification routine. if led
blinking is required; the blink rate is based on the traffic condition.
It do not relate to statistics notification. In addition to that, there is
not a requirement for statistics notification has to occur all the time.

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>
2009-10-27 16:49:59 -04:00
Ben Cahill fadb3582a3 iwlwifi: consolidate apm_init() functions
Consolidate most iwlXXXX_apm_init() functions into single iwl_apm_init().
Keep iwl3945_apm_init(), but leverage iwl_apm_init() for most functionality.
Update 4965 init sequence to follow most recent factory recommendations.

Add following members to struct iwl_cfg to guide the init sequence:
pll_cfg_val (replaces needs_pll_cfg), set_l0s, use_bsm

Move L0S enable/disable from nic_config() functions to iwl_apm_init().
This satisifies the "FIXME: put here L1A -L0S w/a" notice, and complies
with factory-recommended sequence.

Add debug info message in iwl_apm_init(), and symmetrical message
in iwl_apm_stop().

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:49:59 -04:00
Wey-Yi Guy 065e63b00c iwlwifi: fix gain computation for 5000 series and up
In Rx gain balancing (chain noise) computation for 5000 series and up,
the delta gain calculation should use the average noise of default
chain, not "chain 0" which do not exist for all the devices.

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>
2009-10-27 16:49:58 -04:00
Jay Sternberg 1a5c3d6199 iwlwifi: add missing commands to syslog messages
Two commands missing from list of commands such that when debug is
enabled, these commands are shown as UNKNOWN.

Missing commands are TX_ANT_CONFIGURATION_CMD and
TEMPERATURE_NOTIFICATION.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:49:58 -04:00
Holger Schurig fef0640e1e libertas: remove some references to IW_MODE_abc
... in pursue to quaff the wide-spread references to WEXT constants.

When setting SNMP_MIB_OID_BSS_TYPE, wext.c can directly calculate the value
the firmware wants.

Reading of SNMP_MIB_OID_BSS_TYPE doesn't happen anywhere, so no need to
convert the firmware value into WEXT values anyway.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:49:58 -04:00
Holger Schurig e93156e7c4 libertas: sort and categorize entries in decl.h
This now makes decl.h only contain declarations for functions that don't
have their own *.h file.

No function change.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:49:58 -04:00
Holger Schurig 560c63383f libertas: move mic failure event to wext.c
... because for cfg80211 we'll need a completely different
implementation.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:40 -04:00
Holger Schurig fea2b8ec81 libertas: move SIOCGIWAP calls to wext.c
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:39 -04:00
Holger Schurig 8ec97cc803 libertas: remove "struct cmd_ds_gen"
It was only used as a source for S_DS_GEN, but the size of this struct
is equal to the size of "struct cmd_header".

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:39 -04:00
Holger Schurig b856f73b39 libertas: remove handling for CMD_GET_TSF
... which just resided as an old-style command in cmd/cmdresp, but
was nowhere useed. If we ever need it, we can re-add it as a newstyle
command.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:39 -04:00
Holger Schurig f57bd284e4 libertas: remove handling for CMD_802_11_LED_GPIO_CTRL
... which just resided as an old-style command in cmd/cmdresp, but
was nowhere useed. If we ever need it, we can re-add it as a newstyle
command.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:38 -04:00
Holger Schurig 6e85e0b7ab libertas: move lbs_send_iwevcustom_event() to wext.c
... because it's purely a WEXT function.

No functional change.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:38 -04:00
Holger Schurig d0de37417e libertas: move association related commands into assoc.c
That's because the new cfg80211 implementation will provide cleaner
implementations.

No functional changes.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:38 -04:00
Holger Schurig c14951fec6 libertas: get current channel out of priv->curbssparams
... as priv->curbssparams won't exist once libertas+cfg80211 lands.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:37 -04:00
Holger Schurig 5e04769224 libertas: sort variables in struct lbs_private
Having the variables in logical groups allows us to easier
#ifdef stuff out.

No functional change.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:37 -04:00
Holger Schurig 2d46502dce libertas: move scan/assoc related stuff
Another cfg80211-preparation patch: removes some code/definitions from
main.c and dev.h and put's it into assoc.c/.h, scan.c/.h.

No function change.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:36 -04:00
Holger Schurig 243e84e91e libertas: change IW_ESSID_MAX_SIZE -> IEEE80211_MAX_SSID_LEN
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:36 -04:00
Holger Schurig f4228b4c2e libertas: remove unused 11d.h as well, priv->countryinfo
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:36 -04:00
Holger Schurig d37b4fdd43 libertas: remove unused 11d code
Most of the 11d code was protected with an "if (priv->enable11d)" clause.
But there was no code that anywhere that was able to set this
variable to true. So all 11d code was dead for almost a year and no one
complained. That's enought incentive to remove this code.

Besides removing old cruft, we gain back the 11d capability in a common way
when we merge the cfg80211 functionality.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:35 -04:00
Benoit PAPILLAULT 7f4013f096 zd1211rw: Fix TX status reporting in order to have proper rate control
First, we reduce the number of hardware retries to 0 (ie 2 real retries
for each rate). Next, when we report the retries to mac80211, we always
report a retry count of 1 (it seems to be 2 in fact, but using 2 seems
to lead to wrong performance for some reason). We use a state machine to
determine the real fate of a packet based on the 802.11 ACK and what the
Zydas hardware is saying when a real retry occurs. The real retry rates
are encoded in a static array. It has been tested with both zd1211 and
zd1211b hardware. Of course, since the Zydas hardware is not reporting
retries accurately, we are just doing our best in order to get the best
performance (ie higher throughput).

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:35 -04:00
Luciano Coelho 287d374120 wl1271: use ieee80211_rx_ni()
Use the new ieee80211_rx_ni() function instead of ieee80211_rx().  Since we
use a workqueue to handle the RX path, we need to call the new function,
which disables bottom half handling.  This patch fixes the NOHZ:
local_softirq_pending messages.

CC: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:35 -04:00
Christian Lamparter 68676df00d ar9170: don't filter BlockACK frames
The current A-MPDU tx_status report mechanism is too inaccurate.
With this patch BlockACK frames show now up to the driver and
can be processed.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:34 -04:00
Christian Lamparter 731d6bfc2d ar9170usb: atomic pending urbs counter
This patch follows "ar9170: atomic pending A-MPDU counter"
idea and converts another critical counter to atomic_*.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:34 -04:00
Christian Lamparter 02bdf5b48a ar9170: atomic pending A-MPDU counter
A ref-counting bug emerged after testing ar9170usb's HT
implementation on a bigger SMP/SMT system without the usual
_debugging_ overhead.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:34 -04:00
Wey-Yi Guy 4ad177b5c8 iwlwifi: rework for static power save
For static power save, the actual intervals are calculated by driver based on
the default table and DTIM flag, then sent to uCode when the scheme
is changed.

Three tables are defined based on DTIM period.
	1. DTIM 0 - 2
	2. DTIM 3 - 10
	3. DTIM > 11

The actual number of DTIM a station may miss may not exceed the
following:
	. Only 1 DTIM may be skipped at PI=4 when allowed
	. Only 2 DTIMs may be skipped at PI=5 when allowed
	. DTIM may be skipped only 5 sec after last activity
	. DTIM may be skipped only 30 sec after connection establishment

Only allow user to override the power_level when rf is ready to make sure
power level gets changed upon request.

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>
2009-10-27 16:48:34 -04:00
Wey-Yi Guy 9444b18802 iwlwifi: no chain noise support for 6x50 series
For initial bring up of 6x50 series NICs, no chain noise support in
uCode, this feature will be added in the later stage of development.

Two chain noise related functions are removed from 6x50 series:
1. gain computation
2. chain noise reset

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>
2009-10-27 16:48:33 -04:00
Wey-Yi Guy 32004ee42f iwlwifi: set auto clock gate disable bit for 6x00/6x50 series
For 6x00 and 6x50 series NIC with OTP shadow RAM, set auto clock gate
disable bit when initializing OTP access.

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>
2009-10-27 16:48:33 -04:00
Reinette Chatre 8d9698b3e6 iwlagn: store station rate scale information in mac80211 station structure
Currently mac80211 initializes the rate scaling before notifying the driver
of the station's existence. The driver dealt with this by not relying on
mac80211's station notifications and instead mixing this functionality with
the rate scaling code and other places. To clean this up the driver needs
to do rate scaling initialization after being notified of the station, this
can be done if the rate scaling information forms part of the station
information passed from mac80211 to driver.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:33 -04:00
Reinette Chatre cc1282f63b iwlwifi: move rate scaling structures to header file
Move to header file so they can be included and used in other parts of the
driver.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:32 -04:00
Reinette Chatre f0b6e2e8cb iwlwifi: move iwl_setup_mac to iwlagn
This function is only used in iwlagn so there is no need to have it in
iwlcore.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:32 -04:00
Wey-Yi Guy 3ab312a893 iwlwifi: fix incorrect otp blocks number for 6x50 series
For 6x50 series, number of OTP blocks is different from 6x00 series

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>
2009-10-27 16:48:31 -04:00
Wey-Yi Guy 32b7e244f2 iwlwifi: identify eeprom version for 6x50 series NIC
Adding support for 6x50 series EEPROM version check, 6x50 is wifi/wimax
combo device which has different EEPROM map

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>
2009-10-27 16:48:31 -04:00
Wey-Yi Guy c09430abed iwlwifi: show current power save status reported by uCode
Power save request is sent from driver to uCode, but there is no
indication from uCode about the current device power save state.

Reading GP_CNTRL register bit 25:24 to show the current power save
status

00: no power save
01: MAC power down
10: PHY power down
11: Error

The uCode could switch in and out of power save mode in the order of
once per 100-300 ms in many cases. The reading here should just be used for
reference on the current uCode power save status. Do not confuse this
reading with the PowerSave set by driver and mac80211.

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>
2009-10-27 16:48:31 -04:00
Abhijeet Kolekar 1f80989e8b iwl3945: disable all tx fifos
Disable the all the tx fifos while stopping the 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>
2009-10-27 16:48:30 -04:00
John W. Linville 9a493e8f4d wl1251: re-disable PG10 chips
"wl1251: add support for PG11 chips." accidentally enabled PG10 chips as
well...

Reported-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:30 -04:00
John W. Linville 72f5f45756 b43: use ieee80211_rx_ni()
Convert to new use ieee80211_rx_ni() routine rather than open-coded
version.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:30 -04:00
Holger Schurig 8ef37f1cb2 libertas: remove unused lbs_cmd_802_11_inactivity_timeout()
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:30 -04:00
Holger Schurig a3cbfb08ca libertas: make lbs_get_channel() static
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:29 -04:00
Holger Schurig bca61f8a4d libertas: harmonize cmd.h
* move declarations for functions of cmd.c/cmdresp.c into cmd.h
* move declarations from cmd.h that are in main.c to decl.h
* group command functions

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:29 -04:00
Holger Schurig 9e66e701d0 libertas: cleanup host.h and hostcmd.h
Also remove some unused definitions and make tab usage consistent.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:29 -04:00
Zhu Yi b8fcf59093 iwmc3200wifi: handle coexistence radio notification
Handle WiFi/WiMax coexistence radio preemption notification event.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:28 -04:00
Samuel Ortiz 5dc53163c2 iwmc3200wifi: Set wiphy firmware version
Our wiphy firmware version is a combination of the UMAC and LMAC ones.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:27 -04:00
Samuel Ortiz 7fd6b12f32 iwmc3200wifi: Support unexpected reboot barker
We can receive unexpected reboot barker at any time, and we're supposed to
reset the whole device then.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:27 -04:00
Samuel Ortiz 9829e1b510 iwmc3200wifi: Try shared auth when open WEP fails
When we fail to associate with an open WEP AP, we fall back to shared auth.
This allows us to support joining a shared auth WEP AP with iwconfig.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:27 -04:00
Samuel Ortiz 56e3f085f5 iwmc3200wifi: Do not handle wifi command if the interface is not ready
When resetting or bringing the interface down, we should just reject any wifi
related command.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:27 -04:00
Samuel Ortiz 708567e072 iwmc3200wifi: Check for cmd pointer before dereferencing it
The wifi_if_wrapper notification handling code uses a cmd pointer without
checking if it's valid or not. We're dereferencing it because we assume that
we only get to that point if there was a pending command for us. That's not
always true, so we'd better check.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:26 -04:00
Samuel Ortiz f96cca8483 iwmc3200wifi: SDIO disable race fix
When calling sdio->bus_disable(), we are flushing the command lists before
disabling the sdio function. We can thus potentially get a command response
after having flushed the command list.
To avoid that race, we have to call iwm_reset() after disabling the sdio
function.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:26 -04:00
Samuel Ortiz 88e6195a91 iwmc3200wifi: Tx power setting
We can now set the Tx power from e.g. iwconfig.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:26 -04:00
Samuel Ortiz 7eae165e2d iwmc3200wifi: Update fixed size config definitions
We need to be in sync with the latest firmware API.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:26 -04:00
Samuel Ortiz 05f9589cd3 iwmc3200wifi: Update statistics notification structure
The latest firmware adds a ht_rates and a chain_energy field. The latter is
needed as we want to eventually support RSSI/antenna handling.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:25 -04:00
Samuel Ortiz 69cf6e2d5b iwmc3200wifi: Improve rx debug
We display the correct DROP/RELEASE string for each rx packets, and when
it's dropped we also display the reason.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:25 -04:00
Samuel Ortiz 6a79c9f62a iwmc3200wifi: Profile flags can be WPA1 or WPA2 not both
UMAC will ASSERT if the profile security flag is WPA1 | WPA2, so we can only
accept one of those.
Moreover wpa_s wext and nl80211 drivers dont try to send WPA1 | WPA2, but only
one at a time.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:25 -04:00
Samuel Ortiz e85498b21d iwmc3200wifi: CT kill support
We set the initial CT (Temperature control) value to 110 degrees.
If the chip goes over that threshold, we hard block the device which will turn
it down. At the same time we schedule a 30 seconds delayed work that unblock
the device (and userspace is supposed to bring it back up), hoping that the
chip will have cooled down by then...

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:24 -04:00
Samuel Ortiz a82aedbf1b iwmc3200wifi: WPS support
By setting the WSC profile flag, we now support WPS as an enrollee.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:24 -04:00
Zhu Yi 03d1a62c1f iwmc3200wifi: allow joining an existed IBSS network
We used to only support creating a new IBSS network. Now joining to
an existed IBSS network is supported as well.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:24 -04:00
Zhu Yi 30315ff05f iwmc3200wifi: add BGN sdio device id
Add BGN SKU sdio device id.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:24 -04:00
Ivo van Doorn a9b3a9f721 rt2x00: Implement support for rt2800pci
Add support for the rt2860/rt3090 chipsets from Ralink.

Includes various patches from a lot of people who helped
getting this driver into the current shape.

Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Mark Asselstine <asselsm@gmail.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:22 -04:00
Ivo van Doorn 5d78d34ba2 rt2x00: Add rt2x00soc bus module
Add new library module for SoC drivers.
This is needed to fully support the platform
driver part of rt2800pci.

Based on original patch from Felix.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:21 -04:00
Kalle Valo 878283f198 wl1251: use ieee80211_rx_ni()
Because of SPI and SDIO wl1251 does everything in a workqueue, including
calling ieee80211_rx() which should be called with bottom halves disabled.
An error message is emitted because of this:

NOHZ: local_softirq_pending 08

Fix this by using ieee80211_rx_ni().

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:21 -04:00
Michael Buesch 88499ab3d8 b43: Optimize PIO scratchbuffer usage
This optimizes the PIO scratchbuffer usage.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:20 -04:00
David-John Willis 2c759e03b3 wl1251: add support for PG11 chips.
This simple patch adds support for the PG11 variant of the WL1251 chip as
used on the OpenPandora OMAP3 device.

Signed-off-by: David-John Willis <John.Willis@Distant-earth.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:20 -04:00
Luciano Coelho fb46f26f38 wl1271: added missing packed modifier in some cmd structs
Some of the struct definitions in the wl1271_acx.h file were missing the
__attribute__ ((packed)) modifier.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:20 -04:00
Luciano Coelho d0f63b2021 wl1271: fix endianess issues
We were not handling endianess correctly.  The wl1271 chip runs on
little-endian values.  This patch makes sure that all the communication with
the wl1271 firmware is done in little-endian by using cpu_to_le* and
le*_to_cpu where appropriate.

Also, all the struct definitions for data exchanged with the firmware has
been changed to use __le16/32 types instead of u16/32.

This fixes a few sparse warnings, such as these:

drivers/net/wireless/wl12xx/wl1271_cmd.c:554:42: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:555:42: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:577:58: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:579:58: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:676:18: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:787:22: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_cmd.c:789:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_tx.c:98:47: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_acx.c:932:32: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_boot.c:191:32: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_boot.c:197:38: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_boot.c:199:37: warning: incorrect type in argument 1 (different base types)
drivers/net/wireless/wl12xx/wl1271_init.c:255:40: warning: incorrect type in assignment (different base types)
drivers/net/wireless/wl12xx/wl1271_init.c:275:53: warning: incorrect type in assignment (different base types)

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:19 -04:00
Luciano Coelho 0b5b72da1b wl1271: added missing packed modifier in some acx structs
Some of the struct definitions in the wl1271_acx.h file were missing the
__attribute__ ((packed)) modifier.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:19 -04:00
Luciano Coelho 938e30c930 wl1271: fix sparse warnings about undeclared functions
The following sparse warnings were fixed:

drivers/net/wireless/wl12xx/wl1271_spi.c:199:6: warning: symbol 'wl1271_spi_read_busy' was not declared. Should it be static?
drivers/net/wireless/wl12xx/wl1271_cmd.c:84:5: warning: symbol 'wl1271_cmd_cal_channel_tune' was not declared. Should it be static?
drivers/net/wireless/wl12xx/wl1271_cmd.c:107:5: warning: symbol 'wl1271_cmd_cal_update_ref_point' was not declared. Should it be static?
drivers/net/wireless/wl12xx/wl1271_cmd.c:132:5: warning: symbol 'wl1271_cmd_cal_p2g' was not declared. Should it be static?
drivers/net/wireless/wl12xx/wl1271_cmd.c:153:5: warning: symbol 'wl1271_cmd_cal' was not declared. Should it be static?

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:19 -04:00
Juuso Oikarinen 7a38079e0d wl1271: Set IEEE80211_FCTL_TODS in the null data template
Set the IEEE80211_FCTL_TODS bit in the FC of the null data template.
This is a mandatory requirement in specification.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Cc: Vidhya Govindan <vidhya.govindan@nokia.com>
Cc: Janne Ylälehto <janne.ylalehto@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:18 -04:00
Bob Copeland e5e2647fd6 ath5k: use noise calibration from madwifi hal
This updates ath5k to calibrate the noise floor similar to the
way it is done in the madwifi hal and ath9k.  Of note:

- we start NF measurement at the same time as AGC calibration,
  but do not actually read the value until the periodic (long)
  calibration
- we keep a history of the last few values read and write the
  median back to the hardware for CCA
- we do not complain if NF calibration isn't complete, instead
  we keep the last read value.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:18 -04:00
Marek Lindner e307fcf0a1 ath9k: adjust ahb callbacks to new struct layout to avoid compile errors
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:18 -04:00
Holger Schurig 6d898b1983 libertas: make __lbs_cmd_async() non-static
This function will be needed for the cfg80211-enabled libertas driver.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:17 -04:00
Kalle Valo 40f54242ae wl1251: rename spi device to wl1251
During rename of the driver from wl12xx to wl1251 the spi device name
was accidentally left as wl12xx. Rename it to wl1251 which is the proper
name of the driver.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:17 -04:00
Juuso Oikarinen b54853f1b1 wl1271: Fix filter configuration
Fix the filter configuration to properly work with the two phase filter
configuration (prepare_multicast/configure_filter.)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:16 -04:00
Luciano Coelho bd5ea18f7b wl1271: make sure PS is disabled in PLT
We cannot be in PS mode when running PLT tests, so we need to make sure we're
in active mode.  Also, we need to clear up the rx_counter when we stop PLT,
otherwise it could cause problems when entering PLT again.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:16 -04:00
Juuso Oikarinen ed317788b9 wl1271: Correct memory handling for FW boot
Several memory allocation related failure cases were not properly
handled by the driver - the result was that in low memory conditions
booting of a corrupted FW could be attempted - and user space would not
get proper failure code.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:16 -04:00
Juuso Oikarinen a163acce48 wl1271: Remove unnecessary rx_descriptor memory allocation
Remove unnecessary RX descriptor memory allocation from the driver. The
allocation was a remnant of the wl1251 driver.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:15 -04:00
Juuso Oikarinen 01c09162cd wl1271: Support for IPv4 ARP filtering
Add support for IPv4 ARP filtering in the driver. This will dramatically
reduce the number of unnecessary interrupts by the device in conqested
networks.

This patch is based on a similar patch to wl1251 by Janne Ylälehto.

Cc: Janne Ylälehto <janne.ylalehto@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:14 -04:00
Juuso Oikarinen 1fd2794f36 wl1271: Fix event handling mechanism
The event handling mechanism could miss events if multiple events would
occur simultaneously. Fix event handling mechanism to process all
events.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Juuso Oikarinen 7444113017 wl1271: Fix multicast list handling
Fixes bugs in the multicast list handling:
 - Use atomic memory allocation in non-sleepable context
 - Increment address pointer when iterating list of MC addresses

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Teemu Paasikivi 5d07b668f2 wl1271: Checking of rx descriptor status fixed
Fixed checking of status of the received packet. On wl1251 status is in the
flags field of the descriptor, on wl1271 there is a separate status field.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Teemu Paasikivi a410264553 wl1271: Added 5 GHz support to join and rx
Added support to assiociate and use connection on 5 GHz band (802.11a).

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:11 -04:00
Teemu Paasikivi abb0b3bfb2 wl1271: Added support to scan on 5 GHz band
Added support to scan 802.11a access points on 5 GHz band when using
wl1273 chip.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Teemu Paasikivi 311494c47f wl1271: Scan only enabled channels
Added checking of whether channel is enabled or disabled by mac80211
stack to scan. Disabled channels are not scanned.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Teemu Paasikivi 1ebec3d750 wl1271: Added 5 GHz parameters for wl1273
Added data rate and frequency tables for 5 GHz band channels, 5
GHz radio configration parameters and configuration option to enable
802.11 support.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Juuso Oikarinen c6d5d06e45 wl1271: Remove busy-word checking
Remove busy-word checking to work around an SPI bug. To reduce the
chance of chipset-busy scenarios, increment the number of fixed busy
words.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:10 -04:00
Juuso Oikarinen 11f70f9715 wl1271: Implement beacon early termination support
Add support to enable beacon early termination in the firmware. Early
Beacon termination is a feature which allows the radio to be turned off
after TIM IE to save power.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:09 -04:00
Juuso Oikarinen eb5b28d021 wl1271: Fix IRQ enable handling on FW init failure
Disable IRQ's after FW initialization failure - originally this was not
done in all cases, and it resulted in a kernel warning if firmware
initialization was tried again without reboot.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:09 -04:00
Juuso Oikarinen 8a08048a37 wl1271: Move default FW config struct away from stack
Move the default FW config into a module global static variable, instead
of being a stack variable.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:09 -04:00
Juuso Oikarinen 47fab7d589 wl1271: Add config structure for FW init parameters
Add a configuration structure for RX path parameters, and set default
configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 51f2be2432 wl1271: Add config structure for connection management parameters
Add a configuration structure for connection management parameters, and
set default configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 45b531a86f wl1271: Add config structure for TX path parameters
Add a configuration structure for TX path parameters, and set defalt
configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 8793f9bb19 wl1271: Add config structure for RX path parameters
Add a configuration structure for RX path parameters, and set default
configuration values there.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:08 -04:00
Juuso Oikarinen 2b60100bf0 wl1271: Add structure for firmware configuration values
In order to make the firmware configuration more manageable, collect
hardcoded configuration values into one data structure, and set default values
there.

Add the SoftGemini BT/WLAN coex paramters into the config structure.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:07 -04:00
Juuso Oikarinen 2cc8d4db9d wl1271: Workaround for reference clock setting on boot.
If the 38.4MHz reference clock is configured to the firmware, it crashes
on boot. Configuring an experimental 38.4MHz in XTAL mode allows the
firmware to boot, and everything appears to work.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:07 -04:00
Zhu Yi 2f301227a1 iwlwifi: use paged Rx
This switches the iwlwifi driver to use paged skb from linear skb for Rx
buffer. So that it relieves some Rx buffer allocation pressure for the
memory subsystem. Currently iwlwifi (4K for 3945) requests 8K bytes for
Rx buffer. Due to the trailing skb_shared_info in the skb->data,
alloc_skb() will do the next order allocation, which is 16K bytes. This
is suboptimal and more likely to fail when the system is under memory
usage pressure. Switching to paged Rx skb lets us allocate the RXB
directly by alloc_pages(), so that only order 1 allocation is required.

It also adjusts the area spin_lock (with IRQ disabled) protected in the
tasklet because tasklet guarentees to run only on one CPU and the new
unprotected code can be preempted by the IRQ handler. This saves us from
spawning another workqueue to make skb_linearize/__pskb_pull_tail happy
(which cannot be called in hard irq context).

Finally, mac80211 doesn't support paged Rx yet. So we linearize the skb
for all the management frames and software decryption or defragmentation
required data frames before handed to mac80211. For all the other frames,
we __pskb_pull_tail 64 bytes in the linear area of the skb for mac80211
to handle them properly.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Luciano Coelho ae751bab9f wl1271: remove unnecessary joins and join only when the bssid changes
We were using the join command to change some settings when the stack asked
us to do it.  In many cases they were not needed (and could cause potential
problems), so they were removed.  In other cases there are ACX commands that
can be used instead of using join to reconfigure.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Luciano Coelho 0535d9f4f0 wl1271: use acx_rx_config instead of join when updating filters
We shouldn't use a join command to change the filter settings while
associated.  The right way to do it is to use ACX_RX_CFG.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Juuso Oikarinen 8bcfcb125b wl1271: Update boot time configuration for the new firmware
Update the magic values of the wl1271 boot time config according to the new
reference driver.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:06 -04:00
Juuso Oikarinen 7462141787 wl1271: Remove outdated SPI functions
With the change to the new firmware, there was a change to firmware memory
partitioning. Along with that change, the translation of all partitions was
unified, and separate functions for reg and mem access became unnecessary.

Cleanup the unnecessary functions.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:05 -04:00
Juuso Oikarinen 207347e498 wl1271: Update TX path block calucation algo
Update the TX path block calculation algorithm based on TI reference.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:05 -04:00
Juuso Oikarinen 3cfd6cf960 wl1271: Enable smart reflex
Enable and configure smart reflex. This should have a reducing impact on
power consumption.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:05 -04:00
Juuso Oikarinen 5d0af498c0 wl1271: Enable ELP
The new firmware has fixed a firmware crash problem related to ELP entry.
Enable ELP to conserve power.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen c15f63bffa wl1271: Update interrupt handling by removing an extra SPI read
Remove separate interrupt register reading from the interrupt handling
routine. This will slightly improve interrupt performance.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen 284134eb6f wl1271: RefClk configuration
Updated RefClk configuration based on reference sources. Apparently this
change will improve RF performance.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen e8768eeb59 wl1271: Add top-register access functions
Add top register access function.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:04 -04:00
Juuso Oikarinen 732a1ad93e wl1271: Remove RX workaround
Remove RX workaround which is not needed with newer firmware revisions. This
will reduce one SPI register transaction per RX packet.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:03 -04:00
Juuso Oikarinen 451de97adb wl1271: Update memory mapping for firmware revision 6.1.0.0.241
Update the memory regions and memory mapping to support firmware revision
6.1.0.0.241.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27 16:48:03 -04:00