GitHub/exynos8895/android_kernel_samsung_universal8895.git
16 years agonet: clean up net/ipv4/igmp.c
Jianjun Kong [Mon, 3 Nov 2008 08:26:09 +0000 (00:26 -0800)]
net: clean up net/ipv4/igmp.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/fib_frontend.c fib_hash.c ip_gre.c
Jianjun Kong [Mon, 3 Nov 2008 08:25:16 +0000 (00:25 -0800)]
net: clean up net/ipv4/fib_frontend.c fib_hash.c ip_gre.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/ipip.c raw.c tcp.c tcp_minisocks.c tcp_yeah.c xfrm4_policy.c
Jianjun Kong [Mon, 3 Nov 2008 08:24:34 +0000 (00:24 -0800)]
net: clean up net/ipv4/ipip.c raw.c tcp.c tcp_minisocks.c tcp_yeah.c xfrm4_policy.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: clean up net/ipv4/ah4.c esp4.c fib_semantics.c inet_connection_sock.c inetpeer...
Jianjun Kong [Mon, 3 Nov 2008 08:23:42 +0000 (00:23 -0800)]
net: clean up net/ipv4/ah4.c esp4.c fib_semantics.c inet_connection_sock.c inetpeer.c ip_output.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosunrpc: Fix build warning due to typo in %pI4 format changes.
David S. Miller [Mon, 3 Nov 2008 07:57:06 +0000 (23:57 -0800)]
sunrpc: Fix build warning due to typo in %pI4 format changes.

Noticed by Stephen Hemminger.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoIPVS: Add IPv6 support to SH and DH schedulers
Julius Volz [Sat, 1 Nov 2008 13:13:19 +0000 (13:13 +0000)]
IPVS: Add IPv6 support to SH and DH schedulers

Add IPv6 support to SH and DH schedulers. I hope this simple IPv6 address
hashing is good enough. The 128 bit are just XORed into 32 before hashing
them like an IPv4 address.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'davem-next' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Sun, 2 Nov 2008 21:13:07 +0000 (13:13 -0800)]
Merge branch 'davem-next' of /linux/kernel/git/jgarzik/netdev-2.6

16 years agobonding: update docs to correctly reflect arp_ip_target behavior
Andy Gospodarek [Wed, 22 Oct 2008 11:19:48 +0000 (11:19 +0000)]
bonding: update docs to correctly reflect arp_ip_target behavior

This documentation patch hopes to clarify that the '+' was only needed
for Fedora 7 and Red Hat Enterprise Linux 5.0 and 5.1.  After that the
IP addreses could be added as a comma separated list just like the
module option.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosmc91x: add __init markings to smc_drv_probe()
Mike Frysinger [Fri, 31 Oct 2008 22:11:06 +0000 (22:11 +0000)]
smc91x: add __init markings to smc_drv_probe()

The smc_drv_probe() is the platform_driver probe function and it is only
called during init.  Further, it calls smc_probe() which is marked as __init
already.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoforcdeth: increase max_interrupt_work
Joe Korty [Wed, 29 Oct 2008 21:22:16 +0000 (14:22 -0700)]
forcdeth: increase max_interrupt_work

This eliminates the following often-generated warning from my 64 bit
Opteron SMP test stand:

eth0: too many iterations (6) in nv_nic_irq

According to the web, the problem is that the forcedeth driver has a
too-low value for max_interrupt_work.  Grepping the kernel I see that
forcedeth has the second lowest value of all ethernet drivers (ie, 6).
Most are in the 20-40 range.  So this patch increases this a bit, from 6
to 15 (at 15 forcedeth becomes the driver with third-lowest
max_interrupt_work value).

My test stand, which used to print out the above warnings repetitively
whenever it was under heavy net load, no longer does so.

Signed-off-by: Joe Korty <joe.korty@ccur.com>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoixgbe: add device support for 82598AT (copper 10GbE) adapters
Jesse Brandeburg [Fri, 31 Oct 2008 07:46:40 +0000 (00:46 -0700)]
ixgbe: add device support for 82598AT (copper 10GbE) adapters

Intel is currently shipping support for adapters with a phy
that does 10GBase-T (copper), which is 10 Gigabit ethernet
over standard Category 6 cabling.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoatlx: timer cleanup
Stephen Hemminger [Fri, 31 Oct 2008 23:52:04 +0000 (16:52 -0700)]
atlx: timer cleanup

Do some cleanup on timer usage in this driver:
  * Use round_jiffies to align wakeups and reduce power.
  * Remove atl1_watchdog which does nothing but rearm itself
  * Use setup_timer() function

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoatlx: use embedded net_device_stats
Stephen Hemminger [Fri, 31 Oct 2008 23:52:03 +0000 (16:52 -0700)]
atlx: use embedded net_device_stats

There is now a net_device_stats structure inside net_device that should
be used if possible by devices. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosch_netem: Replace ->requeue() method with open code
Jarek Poplawski [Sun, 2 Nov 2008 07:36:03 +0000 (00:36 -0700)]
sch_netem: Replace ->requeue() method with open code

After removing netem classful functionality we are sure its inner
qdisc is tfifo, so we can replace qdisc->ops->requeue() method with
open code. After this patch there are no more ops->requeue() users.

The idea of this patch is by Patrick McHardy.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosch_netem: Remove classful functionality
Jarek Poplawski [Sun, 2 Nov 2008 07:35:24 +0000 (00:35 -0700)]
sch_netem: Remove classful functionality

Patrick McHardy noticed that: "a lot of the functionality of netem
requires the inner tfifo anyways and rate-limiting is usually done
on top of netem. So I would suggest so either hard-wire the tfifo
qdisc or at least make the assumption that inner qdiscs are
work-conserving.", and later: "- a lot of other qdiscs still don't
work as inner qdiscs of netem [...]".

So, according to his suggestion, this patch removes classful options
of netem. The main reason of this change is to remove ops->requeue()
method, which is currently used only by netem.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP] CUBIC v2.3
Sangtae Ha [Wed, 29 Oct 2008 04:07:18 +0000 (00:07 -0400)]
[TCP] CUBIC v2.3

Signed-off-by: Sangtae Ha <sha2@ncsu.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoaf_unix: clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c
Jianjun Kong [Sun, 2 Nov 2008 04:38:31 +0000 (21:38 -0700)]
af_unix: clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c

clean up net/unix/af_unix.c garbage.c sysctl_net_unix.c

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoudp: add a missing smp_wmb() in udp_lib_get_port()
Eric Dumazet [Sun, 2 Nov 2008 04:19:18 +0000 (21:19 -0700)]
udp: add a missing smp_wmb() in udp_lib_get_port()

Corey Minyard spotted a missing memory barrier in udp_lib_get_port()

We need to make sure a reader cannot read the new 'sk->sk_next' value
and previous value of 'sk->sk_hash'. Or else, an item could be deleted
from a chain, and inserted into another chain. If new chain was empty
before the move, 'next' pointer is NULL, and lockless reader can
not detect it missed following items in original chain.

This patch is temporary, since we expect an upcoming patch
to introduce another way of handling the problem.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoxfrm6: handling fragment
Nicolas Dichtel [Sun, 2 Nov 2008 04:12:07 +0000 (21:12 -0700)]
xfrm6: handling fragment

RFC4301 Section 7.1 says:

"7.1.  Tunnel Mode SAs that Carry Initial and Non-Initial Fragments

     All implementations MUST support tunnel mode SAs that are configured
     to pass traffic without regard to port field (or ICMP type/code or
     Mobility Header type) values.  If the SA will carry traffic for
     specified protocols, the selector set for the SA MUST specify the
     port fields (or ICMP type/code or Mobility Header type) as ANY.  An
     SA defined in this fashion will carry all traffic including initial
     and non-initial fragments for the indicated Local/Remote addresses
     and specified Next Layer protocol(s)."

But for IPv6, fragment is treated as a protocol.  This change catches
protocol transported in fragmented packet.  In IPv4, there is no
problem.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomac80211: fix two kernel-doc warnings
Johannes Berg [Thu, 23 Oct 2008 06:51:20 +0000 (08:51 +0200)]
mac80211: fix two kernel-doc warnings

One parameter wasn't described and one I forgot to update when
renaming it; also update TBDs in sta_info.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: use ETH_P_PAE
Luis R. Rodriguez [Mon, 27 Oct 2008 17:17:29 +0000 (10:17 -0700)]
ath9k: use ETH_P_PAE

It was being discussed where we would put this, but now it found a home
so use its define.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: remove useless conditional
Bob Copeland [Sun, 26 Oct 2008 15:24:48 +0000 (11:24 -0400)]
ath9k: remove useless conditional

ath9k_hw_keyreset returns true in either branch.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoorinoco: cache downloadable firmware image in memory for use during resume
Andrey Borzenkov [Sun, 19 Oct 2008 08:06:11 +0000 (12:06 +0400)]
orinoco: cache downloadable firmware image in memory for use during resume

If card is using downloadable firmware (like Agere 9.x), firmware has
to be reloaded during resume. It is not possible to use request_firmware
for that, because tasks are still frozen, so request_firmware will
just timeout and fail. So cache firmware image in memory for later
reuse in ->resume method.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoorinoco: reload firmware on resume
Andrey Borzenkov [Sun, 12 Oct 2008 16:15:43 +0000 (20:15 +0400)]
orinoco: reload firmware on resume

On resume card state is likely lost so we have to reload firmware
again.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Update interrupt masking code
Nick Kossifidis [Sun, 26 Oct 2008 18:40:25 +0000 (20:40 +0200)]
ath5k: Update interrupt masking code

*Properly get/set all available ISR/IMR values and review common/uncommon bits
*Better handling of per-txq interrupts (we can now resolve what q is generating
 each interrupt -this will help in debuging wme later)
*Some minor updates from legacy-hal
*Properly handle RXNOFRM and TXNOFRM interrupt masking (even when we don't set
 them on IMR they keep showing up, so we disable them by zeroing AR5K_RXNOFRM
 and AR5K_TXNOFRM registers). This doesn't exist on legacy-hal but i've tested
 it on various cards and it works fine.

Changes-Licensed-under: ISC
Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless regulatory: move ignore_request
Johannes Berg [Fri, 24 Oct 2008 18:32:23 +0000 (20:32 +0200)]
wireless regulatory: move ignore_request

This function is only used once, move it closer to its caller.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: clean up regulatory ignore_request function
Johannes Berg [Fri, 24 Oct 2008 18:32:22 +0000 (20:32 +0200)]
wireless: clean up regulatory ignore_request function

This function has a few WARNs that may eventually trigger
when an AP sends rogue beacons, those must be removed. Some
of the comments in the function are also inappropriate as
this function is concerned with the global hint, not a per-
wiphy thing (which a multidomain flag on a wiphy would imply).

I'm convinced that we don't need to do anything to implement
multi-domain capability as 802.11-2007 specifies it because
it makes only two things mandatory:
 * starting of BSS/IBSS must have country information
   (this can easily be done with a mac80211 patch)
 * a STA must adopt the country information (we already have
   the framework for this)

But we don't have anything implemented anyway for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: remove struct regdom hinting
Johannes Berg [Fri, 24 Oct 2008 18:32:21 +0000 (20:32 +0200)]
wireless: remove struct regdom hinting

The code needs to be split out and cleaned up, so as a
first step remove the capability, to add it back in a
subsequent patch as a separate function. Also remove the
publically facing return value of the function and the
wiphy argument. A number of internal functions go from
being generic helpers to just being used for alpha2
setting.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: make regdom passing semantics simpler
Johannes Berg [Fri, 24 Oct 2008 18:32:20 +0000 (20:32 +0200)]
wireless: make regdom passing semantics simpler

The regdom struct is given to the core, so it might as well
free it in error conditions.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Update reclaim flag
Daniel Halperin [Fri, 24 Oct 2008 06:48:58 +0000 (23:48 -0700)]
iwlwifi: Update reclaim flag

The reclaim flag should include REPLY_RX_MPDU_CMD in the list of commands
issued by uCode. This is for safety in case the SEQ_RX_FRAME bit is set
incorrectly.

Signed-off-by: Daniel Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwl3945: iwl3945_mac_get_tsf() should not return zero
Fabrice Bellet [Fri, 24 Oct 2008 06:48:57 +0000 (23:48 -0700)]
iwl3945: iwl3945_mac_get_tsf() should not return zero

The problem fixed here is that iwl3945_mac_get_tsf() returns 0, as the
function is not implemented, and this is considered as a valid value by
the mac layer in mlme.c:1605. The consequence is that the STA in ad-hoc
mode is inserted/removed quite frequently due to IBSS merging.

This patch fixes :
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1781
and https://bugzilla.redhat.com/show_bug.cgi?id=459401

Signed-off-by: Fabrice Bellet <fabrice@bellet.info>
Acked-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>
16 years agoiwlwifi: run through spell checker
Tomas Winkler [Fri, 24 Oct 2008 06:48:56 +0000 (23:48 -0700)]
iwlwifi: run through spell checker

Signed-off-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>
16 years agoiwlwifi: refactor tx byte count table usage
Tomas Winkler [Fri, 24 Oct 2008 06:48:55 +0000 (23:48 -0700)]
iwlwifi: refactor tx byte count table usage

This patch drops unreadable usage of IWL_SET/GET_BITS16 in byte count
tables handling
This patch also cleans a bit the byte count table code and adds
WARN_ON traps on invalid values

This patch is pure cleanup, no functional changes.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: clear scanning bits upon failure
Mohamed Abbas [Fri, 24 Oct 2008 06:48:54 +0000 (23:48 -0700)]
iwlwifi: clear scanning bits upon failure

In iwl_bg_request_scan function, if we could not send a
scan command it will go to done.
In done it does the right thing to call mac80211 with
scan complete, but the problem is STATUS_SCAN_HW is still
set causing any future scan to fail. Fix by clearing the scanning status
bits if scan fails.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: convert correctly rate_n_flags to PLCP index for mimo3 packets
Daniel C. Halperin [Fri, 24 Oct 2008 06:48:53 +0000 (23:48 -0700)]
iwlwifi: convert correctly rate_n_flags to PLCP index for mimo3 packets

The driver does not properly convert rate_n_flags to PLCP index for mimo3
packets. This makes mac80211 drop the packets

Signed-off-by: Daniel C. Halperin <daniel.c.halperin@intel.com>
Reviewed-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>
16 years agoiwlwifi: calibration command namespace renaming
Tomas Winkler [Fri, 24 Oct 2008 06:48:52 +0000 (23:48 -0700)]
iwlwifi: calibration command namespace renaming

Since calibration framework is not HW specific remove 5000 and 4965 prefix
This patch doesn't provide any functional changes only code renaming
and movement

Signed-off-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>
16 years agoiwlwifi: parametrize eeprom versions
Tomas Winkler [Fri, 24 Oct 2008 06:48:51 +0000 (23:48 -0700)]
iwlwifi: parametrize eeprom versions

This patch uses new parameters eeprom_ver and eeprom_calib_ver
to support additional HW.

Signed-off-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>
16 years agoiwlwifi: don't update TFD free counter for invalid station
Tomas Winkler [Fri, 24 Oct 2008 06:48:50 +0000 (23:48 -0700)]
iwlwifi: don't update TFD free counter for invalid station

This patch makes sure that station table is not accessed
with invalid station id in 4965 TX response path

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: refactor TX response flow
Tomas Winkler [Fri, 24 Oct 2008 06:48:49 +0000 (23:48 -0700)]
iwlwifi: refactor TX response flow

This patch utilize 5000 new TX response command
which contains all necessary information and avoids
back referencing to the original TX frame.
It also change handling of software queue tracking
4965 flow is aligned with changes as much as possible.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-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>
16 years agomac80211: Re-enable aggregation
Sujith [Fri, 24 Oct 2008 04:25:27 +0000 (09:55 +0530)]
mac80211: Re-enable aggregation

Wireless HW without any dedicated queues for aggregation
do not need the ampdu_queues mechanism present right now
in mac80211. Since mac80211 is still incomplete wrt TX MQ
changes, do not allow aggregation sessions for drivers that
set ampdu_queues.

This is only an interim hack until Intel fixes the requeue issue.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: allow all interfaces types to handle RX action frames
Andrey Yurovsky [Thu, 23 Oct 2008 20:10:53 +0000 (13:10 -0700)]
mac80211: allow all interfaces types to handle RX action frames

Eliminate the vif.type check in ieee80211_rx_h_action.  This check is
unnecessary (these action frames can be handled by all interface types) and
currently prevents, for example, AP interfaces from handling BACK action frames
such as ADDBA and DELBA requests.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: remove write-only 'granted' variable
Johannes Berg [Thu, 23 Oct 2008 07:40:01 +0000 (09:40 +0200)]
wireless: remove write-only 'granted' variable

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Check if the STA supports HT when initializing rate control
Sujith [Thu, 23 Oct 2008 06:45:19 +0000 (12:15 +0530)]
ath9k: Check if the STA supports HT when initializing rate control

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: Change WARN_ON to WARN_ON_ONCE
Sujith [Thu, 23 Oct 2008 06:44:02 +0000 (12:14 +0530)]
mac80211: Change WARN_ON to WARN_ON_ONCE

A warning would be printed for every packet that
is transmitted if the rate control information isn't
setup. Change this to WARN_ON_ONCE.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: Allow user to change tx power when asked
Luis R. Rodriguez [Wed, 22 Oct 2008 20:28:45 +0000 (13:28 -0700)]
ath9k: Allow user to change tx power when asked

We were also changing tx power even when we were not asked to,
this enforces the change only when we are asked nicely. When
not asked we simply try to use the max power, we don't tx power
at all for rate control.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: enable RX interrupt mitigation
Luis R. Rodriguez [Wed, 22 Oct 2008 20:28:44 +0000 (13:28 -0700)]
ath9k: enable RX interrupt mitigation

This enables hardware interrupt mitigation on RX.
It should alleviate system interrupt load intelligently.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: remove pointless sc_txintrperiod and spin_lock_bh on tx prepare
Luis R. Rodriguez [Wed, 22 Oct 2008 20:28:43 +0000 (13:28 -0700)]
ath9k: remove pointless sc_txintrperiod and spin_lock_bh on tx prepare

sc_txintrperiod is currently set to 0 and never updated. We won't
be using this, if anything we will consider using TX interrupt
mitigation but that is different and not yet tested. So remove
sc_txintrperiod and the pointless spin_lock_bh() on tx prepare.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: make use of regulatory tx power settings on change of tx power
Luis R. Rodriguez [Wed, 22 Oct 2008 20:13:53 +0000 (13:13 -0700)]
mac80211: make use of regulatory tx power settings on change of tx power

We do not know what max power to allow until a device is targeting
a channel, therefore only allow changing tx power if a channel is defined.
Also make use of the channel's max power setting as defined by
regulatory rules before allowing the user to use the requested power
setting. If the user asked us to figure it out we use the max allowed
by regulatory.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: check return value of dev_alloc_skb() in ieee80211_sta_join_ibss().
Rami Rosen [Wed, 22 Oct 2008 07:58:39 +0000 (09:58 +0200)]
mac80211: check return value of dev_alloc_skb() in ieee80211_sta_join_ibss().

This patch add a check on the return value of dev_alloc_skb() in
ieee80211_sta_join_ibss() in net/mac80211/mlme.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: avoid some net/ieee80211.h vs. linux/ieee80211.h conflicts
John W. Linville [Wed, 1 Oct 2008 01:43:03 +0000 (21:43 -0400)]
wireless: avoid some net/ieee80211.h vs. linux/ieee80211.h conflicts

There is quite a lot of overlap in definitions between these headers...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: use individual buffers for printing ssid values
John W. Linville [Wed, 1 Oct 2008 00:59:05 +0000 (20:59 -0400)]
wireless: use individual buffers for printing ssid values

Also change escape_ssid to print_ssid to match print_mac semantics.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: escape_ssid should handle non-printables
John W. Linville [Tue, 30 Sep 2008 21:50:31 +0000 (17:50 -0400)]
wireless: escape_ssid should handle non-printables

Also use common backslash sequences like \t, \n, \r, and \\ as well as \0.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: remove NETWORK_EMPTY_ESSID flag
John W. Linville [Tue, 30 Sep 2008 21:17:26 +0000 (17:17 -0400)]
wireless: remove NETWORK_EMPTY_ESSID flag

It is unnecessary and of questionable value.  Also remove
is_empty_ssid, as it is also unnecessary.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: consolidate on a single escape_essid implementation
John W. Linville [Wed, 24 Sep 2008 22:13:14 +0000 (18:13 -0400)]
wireless: consolidate on a single escape_essid implementation

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: insert AP sta entry after filling it
Johannes Berg [Wed, 22 Oct 2008 09:41:38 +0000 (11:41 +0200)]
mac80211: insert AP sta entry after filling it

We never clearly defined the semantics of the sta_notify callback
and it was originally posted for iwlwifi which still doesn't use
it at all. With the recent HT rework ath9k started relying on it,
but I made a mistake there in that I made ath9k assume the HT
information has already been filled in at sta_notify time. This
isn't a hard thing to do, so do it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoFix debugfs_create_*'s error checking method for wireless/rt2x00/
Zhaolei [Wed, 22 Oct 2008 09:07:25 +0000 (17:07 +0800)]
Fix debugfs_create_*'s error checking method for wireless/rt2x00/

debugfs_create_*() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoFix debugfs_create_bool's error checking method for wireless/iwlwifi/
Zhaolei [Wed, 22 Oct 2008 09:06:12 +0000 (17:06 +0800)]
Fix debugfs_create_bool's error checking method for wireless/iwlwifi/

debugfs_create_bool() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: fix EU check
Johannes Berg [Tue, 21 Oct 2008 09:08:27 +0000 (11:08 +0200)]
wireless: fix EU check

http://en.wikipedia.org/wiki/De_Morgan%27s_laws is useful.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: get rid of pointless request list
Johannes Berg [Tue, 21 Oct 2008 09:01:33 +0000 (11:01 +0200)]
wireless: get rid of pointless request list

We really only need to know the last request at each point in time.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: remove cfg80211_reg_mutex
Johannes Berg [Tue, 21 Oct 2008 07:57:41 +0000 (09:57 +0200)]
wireless: remove cfg80211_reg_mutex

This mutex is wrong, we use cfg80211_drv_mutex (which should
possibly be renamed to just cfg80211_mutex) everywhere except
in one place, fix that and get rid of the extra mutex.

Also get rid of a spurious regulatory_requests list definition.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: don't publish __regulatory_hint
Johannes Berg [Tue, 21 Oct 2008 07:42:38 +0000 (09:42 +0200)]
wireless: don't publish __regulatory_hint

This function requires an internal lock to be held, so it cannot
be published to other modules in the kernel.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix a few typos in mac80211 kernel doc
Bob Copeland [Tue, 21 Oct 2008 01:20:27 +0000 (21:20 -0400)]
mac80211: fix a few typos in mac80211 kernel doc

Correct a handful of errors found while reading the mac80211 book.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: reduce checkpatch.pl errors
John Daiker [Fri, 17 Oct 2008 19:16:17 +0000 (12:16 -0700)]
rt2x00: reduce checkpatch.pl errors

A few changes to reduce checkpatch.pl errors in the rt2x00 driver.  For
the most part, I only fixed cosmetic things, and left the actual 'code
flow' untouched (hopefully)!

Diff is against wireless-testing HEAD.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: reduce checkpatch.pl errors
John Daiker [Fri, 17 Oct 2008 19:16:00 +0000 (12:16 -0700)]
ath5k: reduce checkpatch.pl errors

A few changes to reduce checkpatch.pl errors in the ath5k driver.  For
the most part, I only fixed cosmetic things, and left the actual 'code
flow' untouched (hopefully)!

Diff is against wireless-testing HEAD.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoAdd nl80211 commands to get and set o11s mesh networking parameters
colin@cozybit.com [Tue, 21 Oct 2008 19:03:48 +0000 (12:03 -0700)]
Add nl80211 commands to get and set o11s mesh networking parameters

The two new commands are NL80211_CMD_GET_MESH_PARAMS and
NL80211_CMD_SET_MESH_PARAMS. There is a new attribute enum,
NL80211_ATTR_MESH_PARAMS, which enumerates the various mesh configuration
parameters.

Moved struct mesh_config from mac80211/ieee80211_i.h to net/cfg80211.h.
nl80211_get_mesh_params and nl80211_set_mesh_params unpack the netlink messages
and ask the driver to get or set the configuration.  This is done via two new
function stubs, get_mesh_params and set_mesh_params, in struct cfg80211_ops.

Signed-off-by: Colin McCabe <colin@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: inform userspace of probe/auth/assoc timeout
Johannes Berg [Thu, 16 Oct 2008 19:44:44 +0000 (21:44 +0200)]
mac80211: inform userspace of probe/auth/assoc timeout

I noticed that when for some reason [1] the probe or auth times
out, wpa_supplicant doesn't realise this and only tries the next
AP when it runs into its own timeout, which is ten seconds, and
that's quite long. Fix this by making mac80211 notify userspace
that it didn't associate.

[1] my wrt350n in mixed B/G/HT mode often runs into this, maybe
it's because one of the antennas is broken off and for whatever
reason it decides to use that antenna to transmit the response
frames (auth, probe); I do see beacons fine so it's not totally
broken. Works fine in pure-G mode.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agohostap: Fix sparse warnings
Larry Finger [Thu, 16 Oct 2008 23:44:03 +0000 (16:44 -0700)]
hostap: Fix sparse warnings

A compilation with the command "make C=2 CF="-D__CHECK_ENDIAN__" \
                                drivers/net/wireless/hostap/"

 yields the following warnings:

  CHECK   drivers/net/wireless/hostap/hostap_info.c
drivers/net/wireless/hostap/hostap_info.c:156:43: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:156:43:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:156:43:    got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:294:44: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:294:44:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:294:44:    got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:487:12: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:487:12:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:487:12:    got long *<noident>
drivers/net/wireless/hostap/hostap_info.c:491:12: warning: incorrect type in
argument 2 (different signedness)
drivers/net/wireless/hostap/hostap_info.c:491:12:    expected unsigned long
volatile *addr
drivers/net/wireless/hostap/hostap_info.c:491:12:    got long *<noident>

The warnings are fixed with the following compile-tested fix:

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: remove rate_control_clear
Johannes Berg [Thu, 16 Oct 2008 09:21:49 +0000 (11:21 +0200)]
mac80211: remove rate_control_clear

"Clearing" the rate control algorithm is pointless, none of
the algorithms actually uses this operation and it's not even
invoked properly for all channel switching. Also, there's no
need to since rate control algorithms work per station.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: protect headers from double inclusion
Tomas Winkler [Wed, 15 Oct 2008 18:06:23 +0000 (11:06 -0700)]
iwlwifi: protect headers from double inclusion

This patch protects iwl-csr.h and iwl-fh.h from double inclusion
by ifndef define endif idiom

Signed-off-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>
16 years agominstrel: improve performance for non-MRR drivers
Felix Fietkau [Wed, 15 Oct 2008 17:13:59 +0000 (19:13 +0200)]
minstrel: improve performance for non-MRR drivers

This patch enhances minstrel's performance for non-MRR setups,
by preventing it from sampling slower rates with >95% success
probability and by putting at least 1 non-sample frame between
several sample frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agonl80211: fix monitor flags
Johannes Berg [Wed, 15 Oct 2008 09:54:04 +0000 (11:54 +0200)]
nl80211: fix monitor flags

NLA_NESTED attributes cannot be empty, but we want to be able to
specify "no flags" (empty attribute) vs. "no change" (no attribute).
Therefore, remove the NLA_NESTED policy so it can work as an empty
attribute.

I guess I should have used a u32 for these flags instead, but we're
stuck with it now. Haven't noticed earlier because of a bug in iw...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: integrate parts of lmac_longbow.h and other parts of stlc45xx
John W. Linville [Wed, 22 Oct 2008 20:41:55 +0000 (16:41 -0400)]
p54: integrate parts of lmac_longbow.h and other parts of stlc45xx

This patch removes most/all? of the "magic" numbers and unknown structure
variables inside the code and replaces them with meaningful prototypes.

(Plus a one line warning fix from Larry Finger <Larry.Finger@lwfinger.net>.)

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: borrow some setup code from stlc45xx
Christian Lamparter [Wed, 15 Oct 2008 02:07:56 +0000 (04:07 +0200)]
p54: borrow some setup code from stlc45xx

This patch initialize all remaining values which are necessary for
SPI firmwares.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: fix memory management
Christian Lamparter [Wed, 15 Oct 2008 02:07:16 +0000 (04:07 +0200)]
p54: fix memory management

We have to be careful if multiple "control frames" are passed in a very short intervals to
the device's firmware. As p54_assign_address always put them into same memory location.
To guarantee that this won't happen anymore, we have to treat control frames like normal
data frames in the devices own memory management.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: p54: refactor p54_rx_frame_sent
Christian Lamparter [Wed, 15 Oct 2008 02:05:51 +0000 (04:05 +0200)]
p54: p54: refactor p54_rx_frame_sent

the long names and the nesting in p54_rx_frame_sent really
became a "line longer than 80 characters" problem.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: refactor statistic timer code
Christian Lamparter [Wed, 15 Oct 2008 01:56:20 +0000 (03:56 +0200)]
p54: refactor statistic timer code

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: broken out edcf changes
Christian Lamparter [Wed, 15 Oct 2008 01:55:37 +0000 (03:55 +0200)]
p54: broken out edcf changes

This patch series hopefully increases p54's "longterm" stability.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: tx command must run on same tfd as packet
Tomas Winkler [Tue, 14 Oct 2008 19:32:49 +0000 (12:32 -0700)]
iwlwifi: tx command must run on same tfd as packet

This patch makes clear that tx command is attached to the same tfd as
the tx packet

Signed-off-by: Tomas Winkler <tomas.winkler@intel.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>
16 years agoiwlwifi: fix TX cmd dma unmapping
Tomas Winkler [Tue, 14 Oct 2008 19:32:48 +0000 (12:32 -0700)]
iwlwifi: fix TX cmd dma unmapping

This patch:
1. fixes command DMA unmapping, this might be visible only
on platforms where DMA unmapping is no noop such as PPC64 (not tested)
2. attaches correctly high memory part of the host command buffer
3. changes structure of TFD TB
instead of describing transmit buffer (TB) tuple it describes single
TB and makes code more readable on price of one unaligned access
4. eliminates using of IWL_GET/SET_BITs for TFD handling
5. renames TFD structures to mach the HW spec
6. reduces iwl_tx_info size by reserving first TB to the host command

This patch should not have any visible effect on x86 32

This patch is rework of
iwlwifi: fix DMA code and bugs from
Johannes Berg <johannes@sipsolutions.net>

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Reviewed-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>
16 years agoiwlwifi: unify tx antenna toggling
Tomas Winkler [Tue, 14 Oct 2008 19:32:45 +0000 (12:32 -0700)]
iwlwifi: unify tx antenna toggling

TX antenna toggling is requested for management frames in tx and
scanning. I addition toggling in scanning was incorrect;

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-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>
16 years agoiwlwifi: add iwl_cmd_queue_free for readability
Tomas Winkler [Tue, 14 Oct 2008 19:32:44 +0000 (12:32 -0700)]
iwlwifi: add iwl_cmd_queue_free for readability

This patch adds iwl_cmd_queue_free function and
separate cmd queue freeing from regular tx queue freeing.
This improves readability and adds one more step in
restructuring  of cmd queue handling

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-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>
16 years agoiwlwifi: remove host commands structures from iwl_cmd
Tomas Winkler [Tue, 14 Oct 2008 19:32:43 +0000 (12:32 -0700)]
iwlwifi: remove host commands structures from iwl_cmd

This patch removes host commands structures from iwl_cmd
to make more HW oblivious
tx cmd was left it needs special treatment.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: expand error lookup and align output
Jay Sternberg [Tue, 14 Oct 2008 19:32:42 +0000 (12:32 -0700)]
iwlwifi: expand error lookup and align output

change desc_lookup from hard coded switch to a simple lookup table and expand
list to include all errors.  Also corrected output using this string so info
is aligned and easier to read when debugging issues.

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>
16 years agoiwlwifi: define firmware file name once
Jay Sternberg [Tue, 14 Oct 2008 19:32:41 +0000 (12:32 -0700)]
iwlwifi: define firmware file name once

string repeated for definition of ucode firmware file and in preparation for
multiple firmware files need to consolidate location for their definition.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Acked-by: Tomas Winkler <tomas.winler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomake ieee80211 invisible
Johannes Berg [Tue, 14 Oct 2008 17:49:22 +0000 (19:49 +0200)]
make ieee80211 invisible

This makes CONFIG_IEEE80211 invisible. The drivers that require it
(ipw2100, ipw2200, hostap) select it, and everybody else really
shouldn't even think about using it. Also, since there really is
no point in compiling anything without crypto support these days,
remove the crypto options and just enable them, leaving only the
debugging option which only shows up when a driver is select that
requires it. This makes it hard to enable, but most people wouldn't
want to anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoipw2x00: change default policy for auto-associate
Tim Gardner [Tue, 14 Oct 2008 16:38:03 +0000 (10:38 -0600)]
ipw2x00: change default policy for auto-associate

Do not attempt association until directed to do so by a user space
application. In particular, this avoids race conditions with
NetworkManager association state.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54: implement MRR
Johannes Berg [Tue, 14 Oct 2008 14:56:51 +0000 (16:56 +0200)]
p54: implement MRR

This implements multi-rate retry in p54. With lots of help
and testing from Christian and the limiting idea from nbd.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211/drivers: rewrite the rate control API
Johannes Berg [Tue, 21 Oct 2008 10:40:02 +0000 (12:40 +0200)]
mac80211/drivers: rewrite the rate control API

So after the previous changes we were still unhappy with how
convoluted the API is and decided to make things simpler for
everybody. This completely changes the rate control API, now
taking into account 802.11n with MCS rates and more control,
most drivers don't support that though.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add might_sleep to hw_config
Johannes Berg [Tue, 14 Oct 2008 14:38:55 +0000 (16:38 +0200)]
mac80211: add might_sleep to hw_config

Just to catch bugs when changing mac80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoairo: Kill directly reference of netdev->priv
Wang Chen [Tue, 14 Oct 2008 05:30:33 +0000 (13:30 +0800)]
airo: Kill directly reference of netdev->priv

We have some reasons to kill netdev->priv:
1. netdev->priv is equal to netdev_priv().
2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
   netdev_priv() is more flexible than netdev->priv.
But we cann't kill netdev->priv, because so many drivers reference to it
directly.

OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug",
and I want to kill netdev->priv later, I decided to convert all the direct
reference of netdev->priv first.

In this driver, I don't simply use netdev_priv() to replace netdev->priv.

The reason is:
Pointer netdev->priv was changed in this driver, but it shouldn't.
Because the memory was allocated when alloc_netdev() and netdev->priv
should always point to that memory.

So I use netdev->ml_priv to replace netdev->priv.
After replacing, both ai and ai->wifidev->ml_priv point to the same memory.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: fix mesh point operation
Andrey Yurovsky [Tue, 14 Oct 2008 01:23:07 +0000 (18:23 -0700)]
ath5k: fix mesh point operation

This patch fixes mesh point operation (thanks to YanBo for pointing
out the problem): make mesh point interfaces start beaconing when
they come up and configure the RX filter in mesh mode so that mesh
beacons and action frames are received.  Add mesh point to the check
in ath5k_add_interface.  Tested with multiple AR5211 cards.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: correct ath5k signal quality
Luis R. Rodriguez [Mon, 13 Oct 2008 21:08:10 +0000 (14:08 -0700)]
ath5k: correct ath5k signal quality

This adjusts ath5k's signal quality reporting taking into
consideration received beacons at an RSSI of 35 should indicate
you can use of 54 Mbps on a single stream card (all ath5k cards)
reliably.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath9k: correct signal quality report
Luis R. Rodriguez [Mon, 13 Oct 2008 21:08:09 +0000 (14:08 -0700)]
ath9k: correct signal quality report

This adjusts ath9k's signal quality reporting taking into
consideration received beacons at an RSSI of 45 should indicate
you can use of MCS 15 rate (144 Mbps) reliably on dual stream card.
Keep in mind mac80211 does not yet have aggregation fixed but this
should still provide more accurate results.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k/ath9k: correct signal quality
Luis R. Rodriguez [Mon, 13 Oct 2008 21:08:07 +0000 (14:08 -0700)]
ath5k/ath9k: correct signal quality

Now that we officially are supporting ath5k I can do this
at work hours.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agortl8187: add short slot handling for 8187B
Herton Ronaldo Krzesinski [Mon, 13 Oct 2008 18:11:00 +0000 (18:11 +0000)]
rtl8187: add short slot handling for 8187B

This change adds short slot handling for 8187B variant of rtl8187 chips.
Some things to note about changes done:
* Values used are chosen to met 802.11-2007 spec. This raised a question
  about SIFS value used with 8187L: 0x22 (34) doesn't match any spec
  value. For now just don't change 8187L, but is something to be
  looked at.
* On 8187B, the location of EIFS register is at the same place as BRSR+1
  of struct rtl818x_csr. Unfortunately there is no clean way to
  accomodate 8187B differences currently, just use address of BRSR+1 and
  comment about it. The same thing happens for Ack timeout register,
  that is on CARRIER_SENSE_COUNTER location of 8187L. The eifs and ack
  timeout values are in units of 4us. All these registers information
  was gathered from references being the vendor gpl driver and 8180
  datasheet, unfortunately there is no information about this on 8187B
  datasheet. Also the ack timeout value was inspired by the same
  calculation as done on rt2x00.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agortl8187: adapt for deprecated IEEE80211_CONF_SHORT_SLOT_TIME flag
Herton Ronaldo Krzesinski [Mon, 13 Oct 2008 18:10:59 +0000 (18:10 +0000)]
rtl8187: adapt for deprecated IEEE80211_CONF_SHORT_SLOT_TIME flag

This updates 8187L handling for short slot after "mac80211: fix short
slot handling". For 8187B, there was no handling done for short slot
timing so nothing done, support for it will come in a following patch.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoAth5k: add AP mode
Jiri Slaby [Sun, 12 Oct 2008 20:54:10 +0000 (22:54 +0200)]
Ath5k: add AP mode

Add support for AP mode. This involves:
- enablement in ath5k_beacon_config -- initialize beacon timer
- add AP to the supported modes in ath5k_add_interface
- handle beacon change even for AP in ath5k_config_interface
- remove useless test for IBSS in ath5k_beacon_update

Note that it doesn't enable the AP mode for the driver. It must
be enabled by NL80211_IFTYPE_AP bit added to interface_modes.

v2:
Fixed opmode constant (IEEE80211_ to NL80211_)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agop54/rtl8187: fix up the seqno patch
Johannes Berg [Sat, 11 Oct 2008 22:39:55 +0000 (00:39 +0200)]
p54/rtl8187: fix up the seqno patch

Sorry about that, for some reason I didn't notice that I'd
left some unused variables in there.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: rewrite HT handling
Johannes Berg [Tue, 14 Oct 2008 14:58:37 +0000 (16:58 +0200)]
mac80211: rewrite HT handling

The HT handling has the following deficiencies, which I've
(partially) fixed:
 * it always uses the AP info even if there is no AP,
   hence has no chance of working as an AP
 * it pretends to be HW config, but really is per-BSS
 * channel sanity checking is left to the drivers
 * it generally lets the driver control too much

HT enabling is still wrong with this patch if you have more than
one virtual STA mode interface, but that never happens currently.
Once WDS, IBSS or AP/VLAN gets HT capabilities, it will also be
wrong, see the comment in ieee80211_enable_ht().

Additionally, this fixes a number of bugs:
 * mac80211: ieee80211_set_disassoc doesn't notify the driver any
             more since the refactoring
 * iwl-agn-rs: always uses the HT capabilities from the wrong stuff
               mac80211 gives it rather than the actual peer STA
 * ath9k: a number of bugs resulting from the broken HT API

I'm not entirely happy with putting the HT capabilities into
struct ieee80211_sta as restricted to our own HT TX capabilities,
but I see no cleaner solution for now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: move bss_conf into vif
Johannes Berg [Fri, 10 Oct 2008 23:51:51 +0000 (01:51 +0200)]
mac80211: move bss_conf into vif

Move bss_conf into the vif struct so that drivers can
access it during ->tx without having to store it in
the private data or similar. No driver updates because
this is only for when they want to start using it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>