Mike Travis [Tue, 12 May 2009 10:48:36 +0000 (10:48 +0000)]
sfc: modify allocation error message
Change error message when alloc_cpumask_var fails.
Repairs "cpumask: convert drivers/net/sfc".
Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Li Zefan [Tue, 12 May 2009 10:47:33 +0000 (10:47 +0000)]
cls_cgroup: remove unneeded cgroup_lock
We can remove this lock here, since we are in cgroup write handler and
thus the cgrp is guaranteed to be valid, and no lock is needed when
writing a u32 variable.
Signed-off-by: Li Zefan <lizf@cn.fujitsuc.com> Acked-by: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
David Woodhouse [Sun, 10 May 2009 05:54:21 +0000 (22:54 -0700)]
tun: add tun_flags, owner, group attributes in sysfs
This patch adds three attribute files in /sys/class/net/$dev/ for tun
devices; allowing userspace to obtain the information which TUNGETIFF
offers, and more, but without having to attach to the device in question
(which may not be possible if it's in use).
It also fixes a bug which has been present in the TUNGETIFF ioctl since
its inception, where it would never set IFF_TUN or IFF_TAP according to
the device type. (Look carefully at the code which I remove from
tun_get_iff() and how the new tun_flags() helper is subtly different).
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Richard Genoud [Sat, 9 May 2009 06:59:16 +0000 (06:59 +0000)]
Remove duplicate slow protocol define in bond_3ad.h
ETH_P_SLOW is already defined in include/linux/if_ether.h.
There's no need to define BOND_ETH_P_LACPDU in drivers/net/bonding/bond_3ad.h
Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Store msi target status register offset in adapter struct.
This avoids contention on msi_tgt_status table from interrupt
hadlers of different pci function.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
John Dykstra [Fri, 8 May 2009 21:57:01 +0000 (14:57 -0700)]
Network Drop Monitor: Fix skb_kill_datagram
Commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 ("Network Drop Monitor:
Adding kfree_skb_clean for non-drops and modifying end-of-line points
for skbs") established new conventions for identifying dropped packets.
Align skb_kill_datagram() with these conventions so that packets that
get dropped just before the copy to userspace are properly tracked.
Signed-off-by: John Dykstra <john.dykstra1@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bnx2x: do not return negative number of received packages
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bnx2x: free workqueue when driver fail to register
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ashish Karkare [Thu, 7 May 2009 23:31:01 +0000 (16:31 -0700)]
net: remove stale reference to fastroute from Kconfig help text
Signed-off-by: Ashish Karkare <akarkare@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matthias Ludwig [Thu, 7 May 2009 22:00:12 +0000 (15:00 -0700)]
smsc911x: fix calculation of res_size for ioremap
fix size of remaped iomem, which is 1 byte to small
(e.g. mappes only 0xff bytes instead of 0x100)
Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de> Acked-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
e1000/e1000e/igb/ixgb: don't txhang after link down
after the recent changes to wired drivers to use only
netif_carrier_off the driver can have outstanding tx work to
complete that will never complete once link is down. Since the
intel hardware will hold this tx work forever, the driver
notices a tx timeout condition internally and might try
to instigate printk and reset of the part with a
netif_stop_queue, which doesn't work because link is down.
Don't bother arming to tx hang detection when link is down.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Nelson, Shannon [Thu, 7 May 2009 10:40:15 +0000 (10:40 +0000)]
ixgbe: Typecase '1' for 64 bit shift
Make sure we don't get any sign-extend issues when we shift a 1
into bit 31.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Don Skidmore [Thu, 7 May 2009 10:39:54 +0000 (10:39 +0000)]
ixgbe: fix failing to log fan failures
We weren't logging the 82598AT fan failure if it occurred before (ixgbe_open)
as we hadn't sent up to catch the interrupt that event caused.
This patch checks for this failure in:
ixgbe_probe - So we can log the failure asap. We check right after we
set up the adapter->flags, which is when we know that we have a fan.
ixgbe_up_complete - To catch failures that may have happened between probe
and when we set up the interrupt that would normally detect the fan failure.
To enable all of this we need to initialize the adapter flag with
IXGBE_FLAG_FAN_FAIL_CAPABLE when the NIC contained a fan.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yi Zou [Thu, 7 May 2009 10:39:35 +0000 (10:39 +0000)]
ixgbe: Enable L2 header split in 82599
This enables L2 header split when packet split is enabled for 82599.
Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 7 May 2009 10:39:16 +0000 (10:39 +0000)]
ixgbe: set queue0 for srrctl configuration correctly for DCB
The current configuration is not setting queue 0 correctly for DCB
configurations. As a result unconfigured queues are being used to setup
the SRRCTL register rx buffer len 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>
Alexander Duyck [Thu, 7 May 2009 10:38:56 +0000 (10:38 +0000)]
ixgbe: always set header length in SRRCTL
As per the documentation for 82599 in order to support hardware RSC the
header size must be set. This is only currently done for packet split
mode. This patch sets the header buffer length for all modes.
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>
net: update skb_recycle_check() for hardware timestamping changes
Commit ac45f602ee3d1b6f326f68bc0c2591ceebf05ba4 ("net: infrastructure
for hardware time stamping") added two skb initialization actions to
__alloc_skb(), which need to be added to skb_recycle_check() as well.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 6 May 2009 23:46:47 +0000 (16:46 -0700)]
bnx2: Fix panic in bnx2_poll_work().
Add barrier() to bnx2_get_hw_{tx|rx}_cons() to fix this issue:
http://bugzilla.kernel.org/show_bug.cgi?id=12698
This issue was reported by multiple i386 users. Without barrier(),
the compiled code looks like the following where %eax contains the
address of the tx_cons or rx_cons in the DMA status block. The
status block contents can change between the cmpb and the movzwl
instruction. The driver would crash if the value was not 0xff during
the cmpb instruction, but changed to 0xff during the movzwl
instruction.
Thanks to Pascal de Bruijn <pmjdebruijn@pcode.nl> for reporting the
problem and Holger Noefer <hnoefer@pironet-ndh.com> for patiently
testing test patches for us.
Also updated version to 2.0.1.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 6 May 2009 23:45:07 +0000 (16:45 -0700)]
net-sched: fix bfifo default limit
When no limit is given, the bfifo uses a default of tx_queue_len * mtu.
Packets handled by qdiscs include the link layer header, so this should
be taken into account, similar to what other qdiscs do.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Wed, 6 May 2009 23:43:48 +0000 (16:43 -0700)]
igb: resolve panic on shutdown when SR-IOV is enabled
The setup_rctl call was making a call into the ring structure after it had
been freed. This was causing a panic on shutdown. This call wasn't
necessary since it is possible to get the needed index from
adapter->vfs_allocated_count.
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>
gouji-new [Wed, 6 May 2009 10:44:45 +0000 (10:44 +0000)]
ixgbe: Proposed PARCH PCIE legacy I/O port free intel 10Gb NIC driver
Traditionally Intel based NIC drivers request I/O port even though it
doesn't need that really.
Intel PCIE 10Gb driver (ixgbe) also requests I/O port but it doesn't
need it either.
This is a little inconvenient situation because sometimes we have to
handle those cards on the slots where any I/O space is not attached.
So we made pach which makes ixgbe driver legacy I/O port free.
Signed-off-by: Masayuki Gouji <gouji.masayuki@jp.fujitsu.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Breno Leitao [Wed, 6 May 2009 10:44:26 +0000 (10:44 +0000)]
ixgbe: Return PCI_ERS_RESULT_DISCONNECT when bus is disabled
According to the "PCI Error Recovery" document, if after a recovery,
the bus is disabled, the error_detected function should return
PCI_ERS_RESULT_DISCONNECT. Actually ixgbe error_detected function is
always returning PCI_ERS_RESULT_NEED_RESET, even if the bus is in failure.
This patch just check if the bus is disabled and then returns
PCI_ERS_RESULT_DISCONNET.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Wed, 6 May 2009 10:44:07 +0000 (10:44 +0000)]
ixgbe: remove ixgbe_napi_add/del_all references
There were still some references to napi_add/del_all left after the dynamic
vector allocation patch. This patch removes those references since the
ixgbe_napi_add/del_all calls are no longer needed as the napi struct is
added when the vector is created, and deleted when the vector is freed.
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>
Alexander Duyck [Wed, 6 May 2009 10:43:47 +0000 (10:43 +0000)]
ixgbe: skb_record_rx_queue should record rx queue instead of vector
currently ixgbe_receive_skb is passing the vector index to
skb_record_rx_queue instead of the queue index. This patch changes that so
that the ring index is passed instead.
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>
Alexander Duyck [Wed, 6 May 2009 10:43:28 +0000 (10:43 +0000)]
ixgbe: make q_vectors dynamic to reduce netdev size
Currently the q_vectors are being allocated statically inside of the
adapter struct. This increases the overall size of the adapter struct when
we can easily allocate the vectors dynamically. This patch changes that
behavior so that the q_vectors are allocated dynamically and the napi
structures are automatically allocated inside of the q_vectors as needed.
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>
Alexander Duyck [Wed, 6 May 2009 10:25:42 +0000 (10:25 +0000)]
pci: update 82576 sr-iov quirk with latest device IDs
The current quirk doesn't include all 82576 device IDs. This update
resolves that.
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>
Alexander Duyck [Wed, 6 May 2009 10:25:23 +0000 (10:25 +0000)]
igb/igbvf: set rx csum always enabled in hw, disable via sw
An issue was found in which rx checksum could not be enabled without
resetting the interface. The issue was the hardware enable was not being
done via ethtool. To resolve this issue and prevent conflicts with VF
configuration we will leave the feature always enabled in hardware, and
then in software we will choose to ignore the results via a sw flag.
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>
Alexander Duyck [Wed, 6 May 2009 10:25:01 +0000 (10:25 +0000)]
igbvf: cleanup flags and allow for rx checksum to be disabled
This patch cleans up a number of unused or unneeded feature flags. As a
result of these changes the user should now be able to enable or disable rx
checksumming via ethtool.
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>
Saeed Bishara [Wed, 6 May 2009 03:02:01 +0000 (03:02 +0000)]
mv643xx_eth: only unmask RX and TX_END interrupts for available queues
It is not a good idea to blindly unmask the RX and TX_END interrupts
for all eight queues on all mv643xx_eth hardware, since some variations
of the hardware have less than eight transmit/receive queues, and the
RX/TX_END interrupts for the queues they don't have can be in use by
other interrupt sources.
Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
On the platforms that mv643xx_eth is used on, the manual skb->data
alignment logic in mv643xx_eth can be simplified, as the only case we
need to handle is where NET_SKB_PAD is not a multiple of the cache
line size. If this is the case, the extra padding we need can be
computed at compile time, while if NET_SKB_PAD _is_ a multiple of
the cache line size, the code can be optimised out entirely.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Move the definitions for the SDMA and port serial configuration
register values to where all the other register definitions live,
and expand the shifts to 32 bit constants.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
wimax: oops: wimax_dev_add() is the only one that can initialize the state
When a new wimax_dev is created, it's state has to be __WIMAX_ST_NULL
until wimax_dev_add() is succesfully called. This allows calls into
the stack that happen before said time to be rejected.
Until now, the state was being set (by mistake) to UNINITIALIZED,
which was allowing calls such as wimax_report_rfkill_hw() to go
through even when a call to wimax_dev_add() had failed; that was
causing an oops when touching uninitialized data.
This situation is normal when the device starts reporting state before
the whole initialization has been completed. It just has to be dealt
with.
When sending a message to user space using wimax_msg(), if nla_put()
fails, correctly interpret the return code from wimax_msg_alloc() as
an err ptr and return the error code instead of crashing (as it is
assuming than non-NULL means the pointer is ok).
On x86 this allows us to do the following small savings:
shave off 23 % off of the module's data, and
shave off 6 % off of the module's text.
We save 456 bytes, for those counting.
$ size ath9k.ko
text data bss dec hex filename
250794 3628 1600 256022 3e816 ath9k.ko
$ size ath9k-old.ko
text data bss dec hex filename
239114 15308 1600 256022 3e816 ath9k-old.ko
$ du -b ath9k.ko 4034244 ath9k.ko
$ du -b ath9k-old.ko 4033788 ath9k-old.ko
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Max Filippov [Tue, 5 May 2009 21:47:02 +0000 (01:47 +0400)]
p54: call p54_wake_free_queues on every p54_free_skb and p54_rx_frame_sent
Currently queues are stopped when their length reaches their length limit,
but are restarted only when the size of freed range of packet buffer is
not less than the size of the largest possible packet.
This causes permanent queue stop on radio visibility loss in the middle
of ping series: there is plenty of room in the packet buffer, but it is
never freed more than 3 (size of 'best effort' queue) * 288 (ping packet
plus headers) bytes at once.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 5 May 2009 17:35:15 +0000 (20:35 +0300)]
mac80211: Comment the order of HT RX reorder handler vs. RX handlers
We are currently processing block ack reordering as a separate task
before all other RX handlers. In theory, this is wrong since this step
should be done only after duplicate removal (see Figure 6-1 in IEEE
802.11n). However, moving this needs some work and the current
situation is not too bad. Add a comment here so that this small detail
does not get forgotten and who knows, maybe someone has some extra
time to take a look at cleaning this up.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Tue, 5 May 2009 17:35:14 +0000 (20:35 +0300)]
mac80211: Add a timeout for frames in the RX reorder buffer
This patch allows skbs to be released from the RX reorder buffer in
case they have been there for an unexpectedly long time without us
having received the missing frames before them. Previously, these
frames were only released when the reorder window moved and that could
take very long time unless new frames were received constantly (e.g.,
TCP connections could be killed more or less indefinitely).
This situation should not happen very frequently, but it looks like
there are some scenarious that trigger it for some reason. As such,
this should be considered mostly a workaround to speed up recovery
from unexpected siutation that could result in connections hanging for
long periods of time.
The changes here will only check for timeout situation when adding new
RX frames to the reorder buffer. It does not handle all possible
cases, but seems to help for most cases that could result from common
network usage (e.g., TCP retrying at least couple of times). For more
completely coverage, a timer could be used to periodically check
whether there are any frames remaining in the reorder buffer if no new
frames are received.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 5 May 2009 17:46:08 +0000 (19:46 +0200)]
rt2x00: Simplify rt2x00_check_rev
rt2x00_check_rev() was too specific for rt2500usb and rt73usb,
by adding the mask argument (instead of hardcoding it into
the function itself) we can use the function in rt2800usb as
well.
v2: Fix revision mask for rt2800usb
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix this build error when CONFIG_PM is not set:
drivers/net/wireless/ath/ar9170/usb.c: In function 'ar9170_usb_probe':
drivers/net/wireless/ath/ar9170/usb.c:692:
error: 'struct usb_device' has no member named 'reset_resume'
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 4 May 2009 15:52:10 +0000 (17:52 +0200)]
mac80211: report operating frequency rather than current
It's not very helpful to see, in iwconfig, the current frequency
the card is tuned to if that frequency is currently somewhere
across the board because we're scanning. Since we keep track of
the frequency the user wants, display that instead.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Fri, 1 May 2009 11:12:36 +0000 (13:12 +0200)]
p54usb: Fixes compile error with CONFIG_PM=n
/drivers/net/wireless/p54/p54usb.c: In function 'p54u_probe':
/drivers/net/wireless/p54/p54usb.c:923: error: 'struct usb_device' has no member named 'reset_resume'
In the struct usb_device the reset_resume attribute is only available
when CONFIG_PM is defined.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wireless: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Cc: John W. Linville <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Fri, 1 May 2009 12:20:07 +0000 (08:20 -0400)]
wl12xx: correct printk format warnings
Fixes warnings:
drivers/net/wireless/wl12xx/main.c:87: warning: int format, different
type arg (arg 2)
drivers/net/wireless/wl12xx/main.c: In function `wl12xx_fetch_nvs':
drivers/net/wireless/wl12xx/main.c:125: warning: int format, different
type arg (arg 2)
drivers/net/wireless/wl12xx/wl1251.c: In function 'wl1251_upload_firmware':
drivers/net/wireless/wl12xx/wl1251.c:94: warning: int format, different
type arg (arg 2)
drivers/net/wireless/wl12xx/wl1251.c:141: warning: int format, different
type arg (arg 2)
Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Some issues in PS prevent us from supporting it reliably.
When 4965 goes to sleep it stores some data in host DRAM, reads it back
when device wakes up. In 4965 there is a problem that the data is not
correct when ucode starts using it upon wakeup.
For all iwlagn devices there is a problem where command is sent when PS is
enabled. At the moment there is a locking problem with priv->lock not being
held and thus not requesting nic access correctly.
We disable PS until these issues have been resolved.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add LED support for AR5BXB6 IBM Thinkpad PCIe adapters
Add LED support on the IBM ThinkPad 11a/b/g Wireless LAN Mini Express
Adapter (AR5BXB6), found on the IBM/Lenovo Thinkpad X60/T60/Z60 series.
Signed-off-by: Paride Legovini <legovini@spiro.fisica.unipd.it> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Thu, 30 Apr 2009 19:55:51 +0000 (15:55 -0400)]
ath5k: use ctl settings based on current regdomain
Update ath5k to use the ctl settings for tx power based on current
regulatory domain.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Thu, 30 Apr 2009 19:55:50 +0000 (15:55 -0400)]
ath5k: Add Spur filter support on newer chips
* Add spur filter support for RF5413 and later chips
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Thu, 30 Apr 2009 19:55:49 +0000 (15:55 -0400)]
ath5k: Implement antenna control
* Add code to support the various antenna scenarios supported by hw
* For now hardcode the default scenario (single or dual omnis with
tx/rx diversity working and tx antenna handled by session -hw keeps
track on which antenna it got ack from each ap/station and maps each
ap/station to one of the antennas-).
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
After some debuging we were hitting the following bugs so far...
* Due to huge channel list hostapd couldn't get infos from the driver
and couldn't set the channel. If we manualy set the channel after
hostapd starts (by setting channel to 0 -auto), beacons are sent
but they wont show up on scan because they are malformed (they have
channel = 0 because hostapd doesn't update the channel info -this is
probably a hostapd bug so i'm CCing Jouni) and they get dropped. Bob
fixed this by only allowing standard channels to be registered so
now hostapd works as expected.
* Docs (and HAL source) say that we must write 0 on timer0 when
operating on AP mode to start TSF increment but this seems to
mess with DBA in many cases and beacon queue never gets started.
We fixed that on the previous patch.
We have some more things to deal with...
* For some reason (hw bug or something else) after restarting hostapd
a few times, beacon inteval seems to change from 100ms to a sec
(we get one beacon per sec).
* We need to set sleep timers on STA mode and enable power saving +
support PCF.
...but i think it's time we enable AP support "officialy" so that
we can get more feedback from users. I ran ath5k with the mentioned
patches + hostapd 0.6.8 and AP mode worked fine (it had some less
throughput on my tests than IBSS but it worked).
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Thu, 30 Apr 2009 19:55:47 +0000 (15:55 -0400)]
ath5k: Beaconing fixes
* Write next beacon timer even on AP mode since without this we get
no beacons + ath9k does it too. Docs say that we must write 0 on
this register on AP mode to start TSF increment, we do both to be
on the safe side.
* Fix num_tx_pending function, we never read the register :P that's
why we got all those "beacon queue 7 didn't stop messages".
* Put full prioriy on beacon queue, lock all queues with lower
priority using the arblock and also bypass any arblock by seting
the arblock ignore flag.
* For the CAB queue (do we need this thing ?, it seems crap) since
it's supposed to fire up after each beacon (we don't use it on driver
part, ath9k/MadWiFi does), don't make it DBA gated but instead make
it fire after each beacon by using the beacon sent gated flag.
* Increase bmiss threshold to 10, that's what we used on MadWiFi for
a long time. Also when we have pending frames on the beacon queue (we
got a beacon that didn't make it on the air) it's more likely that
the beacon queue never started, probably due to faulty DBA setting,
so change that "beacon queue didn't stop" message.
Tested this with AP mode and IBSS mode and seems to work fine ;-)
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Thu, 30 Apr 2009 19:55:46 +0000 (15:55 -0400)]
ath5k: Put remaining EEPROM data on ee struct
* Put remaining EEPROM information on ee struct and remove is_hb63
function.
Now we also have rfkill stuff available.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Thu, 30 Apr 2009 19:55:45 +0000 (15:55 -0400)]
ath5k: Read Spur channels from EEPROM
* Read Spur channel information from EEPROM and use default channels
for RF5413 compatible chips that don't have this info on EEPROM.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nick Kossifidis [Thu, 30 Apr 2009 19:55:44 +0000 (15:55 -0400)]
ath5k: Allow user/driver to set txpower
* Now that we have regulatory control enable the driver to set
txpower on hw
* Also use txpower table offset so that we can match
power range set by user/driver with indices on power table.
Tested 2 different cards (a CM9 and an RF5112-based ubnt) and got
the same output using a remote machine to measure per-packet rssi
(conected the cards using attenuators). I also switched between
various tx power levels and i saw an equal power change on the remote
machine (so txpower changes as expected) and verified that we have
the same output on each rate.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 28 Apr 2009 18:14:58 +0000 (20:14 +0200)]
rt2x00: Synchronize initialization with rt2870 driver
Ralink released a new rt2870 driver, these are the obvious
differences I could find. It doesn't same to make my device
work better, but neither does it seem to regress...
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Wed, 29 Apr 2009 20:33:31 +0000 (23:33 +0300)]
wl12xx: add driver
wl12xx is a driver for TI wl1251 802.11 chipset designed for embedded
devices, supporting both SDIO and SPI busses. Currently the driver
supports only SPI. Adding support 1253 (the 5 GHz version) should be
relatively easy. More information here:
(Collapsed original sequence of pre-merge patches into single commit for
initial merge. -- JWL)
Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sun, 26 Apr 2009 13:47:48 +0000 (15:47 +0200)]
rt2x00: Implement support for rt2800usb
Add support for the rt2800usb chipset.
Current problems:
* Cannot scan 11n AP's
* No TX during first minute after association
* Broken Hardware encryption
Includes various patches from Mattias, Felix, Xose and Axel.
Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: Axel Kollhofer <rain_maker@root-forum.org> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alban Browaeys [Wed, 29 Apr 2009 20:00:23 +0000 (22:00 +0200)]
rt2x00: Style fix for interval defines
Extra parenthesis are not needed in these 2 cases,
all other defines in rt2x00 are done without parenthesis
so just fixup these 2 cases.
Signed-off-by: Alban Browaeys <prahal@yahoo.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The spin_lock handling uses lots of instructions on some archs.
With this patch the size of the ath9k module will be significantly
smaller.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 29 Apr 2009 10:26:17 +0000 (12:26 +0200)]
mac80211: tell driver when idle
When we aren't doing anything in mac80211, we can turn off
much of the hardware, depending on the driver/hw. Not doing
anything, aka being idle, means:
* no monitor interfaces
* no AP/mesh/wds interfaces
* any station interfaces are in DISABLED state
* any IBSS interfaces aren't trying to be in a network
* we aren't trying to scan
By creating a new function that verifies these conditions and calling
it at strategic points where the states of those conditions change,
we can easily make mac80211 tell the driver when we are idle to save
power.
Additionally, this fixes a small quirk where a recalculated powersave
state is passed to the driver even if the hardware is about to stopped
completely.
This patch intentionally doesn't touch radio_enabled because that is
currently implemented to be a soft rfkill which is inappropriate here
when we need to be able to wake up with low latency.
One thing I'm not entirely sure about is this:
phy0: device no longer idle - in use
wlan0: direct probe to AP 00:11:24:91:07:4d try 1
wlan0 direct probe responded
wlan0: authenticate with AP 00:11:24:91:07:4d
wlan0: authenticated
> phy0: device now idle
> phy0: device no longer idle - in use
wlan0: associate with AP 00:11:24:91:07:4d
wlan0: RX AssocResp from 00:11:24:91:07:4d (capab=0x401 status=0 aid=1)
wlan0: associated
Is it appropriate to go into idle state for a short time when we have
just authenticated, but not associated yet? This happens only with the
userspace SME, because we cannot really know how long it will wait
before asking us to associate. Would going idle after a short timeout
be more appropriate? We may need to revisit this, depending on what
happens.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gábor Stefanik [Thu, 23 Apr 2009 17:36:14 +0000 (19:36 +0200)]
mac80211: Warn if the rate controller requests retries for a NO_ACK frame
To deter future rate scaling algorithm writers from requesting NO_ACK
packets to be retried, throw a WARN_ON_ONCE if the algorithm hands us
a try count over 1 for NO_ACK packet.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gábor Stefanik [Thu, 23 Apr 2009 17:36:08 +0000 (19:36 +0200)]
iwlwifi: Fix handling of retry count of NO_ACK frames in iwl-{3945|agn}-rs
Make iwl-{3945|agn}-rs check for IEEE80211_TX_CTL_NO_ACK instead of
is_multicast_ether_addr when determining whether to use the lowest
rate, and set the retry count to 0 (total try count = 1) if
IEEE80211_TX_CTL_NO_ACK is set.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gábor Stefanik [Thu, 23 Apr 2009 18:06:06 +0000 (20:06 +0200)]
mac80211: Fix handling of retry count of NO_ACK frames in PID
Make PID check for IEEE80211_TX_CTL_NO_ACK instead of
is_multicast_ether_addr when determining whether to use the lowest
rate, and set the retry count to 0 (total try count = 1) if
IEEE80211_TX_CTL_NO_ACK is set.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 28 Apr 2009 02:18:10 +0000 (22:18 -0400)]
ath5k: correct interrupt storm warning
Ben Greear points out that the "too many interrupts" message will
never print in the intended case since the interrupt counter
will be -1 after the loop. Change it to pre-decrement so it will
be 0 on the thousandth iteration.
Cc: Ben Greear <greearb@candelatech.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sun, 26 Apr 2009 14:08:50 +0000 (16:08 +0200)]
rt2x00: Add support for L2 padding during TX/RX
Some hardware require L2 padding between header and payload
because both must be aligned to a 4-byte boundary. This hardware
also is easier during the RX path since we no longer need to
move the entire payload but rather only the header to remove
the padding (mac80211 only wants the payload to be 4-byte aligned).
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sun, 26 Apr 2009 14:08:30 +0000 (16:08 +0200)]
rt2x00: Move iv_len into tx descriptor data
By placing the iv_len into the tx descriptor data and
by passing this data to the crypto IV handlers we can
save multiple calls to ieee80211_get_hdrlen_from_skb()
and some if-statements when copying/removing the IV data
from the outgoing frame.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ar9170: wrong test on outlen in ar9170_usb_exec_cmd() ?
remove redundant test: outlen is unsigned
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Sun, 26 Apr 2009 09:27:33 +0000 (11:27 +0200)]
cfg80211: Use the correct IE buffer pointer
If the IE buffer was allocated, the pub.information_elements pointer
was also changed to the allocated space. So we must not assume anymore
that the pointer points at the "found" tail.
So if it was allocated previously, take the codebranch that grows the
buffer size (if necessary) and put the data into the allocated buffer.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>