Commit graph

263551 commits

Author SHA1 Message Date
Rafał Miłecki
87a8c8cb20 b43: HT-PHY: allow writing longer tables with a single call
Sometimes we need to write table which is 2-10 elements long. It's
easier to create such a function instead of defining array every time.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-23 16:14:19 -04:00
Ian Campbell
131ea6675c net: add APIs for manipulating skb page fragments.
The primary aim is to add skb_frag_(ref|unref) in order to remove the use of
bare get/put_page on SKB pages fragments and to isolate users from subsequent
changes to the skb_frag_t data structure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-22 16:59:54 -07:00
David S. Miller
7ae9ed8d32 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2011-08-22 14:47:43 -07:00
Jiri Pirko
0dfe178239 net: vlan: goto another_round instead of calling __netif_receive_skb
Now, when vlan tag on untagged in non-accelerated path is stripped from
skb, headers are reset right away. Benefit from that and avoid calling
__netif_receive_skb recursivelly and just use another_round.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-22 12:43:22 -07:00
Rafał Miłecki
98f8dc72ac b43: HT-PHY: init: add missing small-tables writes
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:02 -04:00
Stefan Assmann
b5be7e4c8f rtlwifi: add module parameter to set global debug level
No need to recompile the module anymore to set the debug level.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:01 -04:00
Rafał Miłecki
a4042bb093 b43: HT-PHY: init: add some AFE (Analog Frontend) operation
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:01 -04:00
Rafał Miłecki
357e24d2d0 b43: HT-PHY: init: add missing PHY mask/set ops
MMIO hacks were used to trick ndis&wl. For example following:
 phy_read(0x0280) -> 0xffff
phy_write(0x0280) <- 0xff3e
***
 phy_read(0x0280) -> 0x0000
phy_write(0x0280) <- 0x003e
was translated to mask 0xff00 and set 0x3e.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:01 -04:00
Rafał Miłecki
b50583484a b43: HT-PHY: init: init BPHY and upload 0x1a table
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:01 -04:00
Rafał Miłecki
19240f36cf b43: HT-PHY: init: copy tables and reset CCA
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:01 -04:00
Rafał Miłecki
f457f1842d b43: HT-PHY: init: implement few simple PHY writes
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:01 -04:00
Rafał Miłecki
15222b582d b43: HT-PHY: init: zero EXTG registers
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:00 -04:00
Nishant Sarmukadam
a63d7e67fc mwl8k: Traffic to clients gets affected when one client leaves a cyrpto bss
When a client disassociates from a crypto enabled bss, data traffic to
other clients connected to the bss is stalled. This was due to a boolean
variable used to keep track if HW crypto is enabled i.e. if set key has
been called to add a key.  This flag was being reset every time delete
key was called e.g when a station leaves the bss. Once the flag is
reset, rx status flags were not being set for connected clients which
disrupts traffic to these clients. Fix this issue by not resetting the
flag since we do not need to reset this flag during the life time of the
bss.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:00 -04:00
Thomas Pedersen
25d49e4d63 mac80211: update mesh path selection frame format
Make mesh path selection frames Mesh Action category, remove outdated
Mesh Path Selection category and defines, use updated reason codes, add
mesh_action_is_path_sel for readability, and update/correct path
selection IEs.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:00 -04:00
Thomas Pedersen
36c704fded ieee80211: add mesh action codes
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:00 -04:00
Thomas Pedersen
8db098507c mac80211: update mesh peering frame format
This patch updates the mesh peering frames to the format specified in
the recently ratified 802.11s standard. Several changes took place to
make this happen:

	- Change RX path to handle new self-protected frames
	- Add new Peering management IE
	- Remove old Peer Link IE
	- Remove old plink_action field in ieee80211_mgmt header

These changes by themselves would either break peering, or work by
coincidence, so squash them all into this patch.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:00 -04:00
Thomas Pedersen
54ef656b05 mac80211: update mesh peering frame codes
Have the mesh peering frames use the self-protected action and reason codes
specified in 802.11s and defined in ieee80211.h. Remove the local enums.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:46:00 -04:00
Thomas Pedersen
6709a6d96e ieee80211: introduce Self Protected Action codes
802.11s introduces a new action frame category, add action codes as well
as an entry in ieee80211_mgmt.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:59 -04:00
Thomas Pedersen
082ebb0c25 mac80211: fix mesh beacon format
Correct ordering of IEs in the mesh beacon while removing unneeded IEs
from mesh peering frames. Set privacy bit in capability info if security
is enabled. Add utility functions to aid in construction
of IEs and reduce code duplication.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:59 -04:00
Rafał Miłecki
f6a3e99da8 b43: make forcing clock common (HT-PHY also uses that)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:59 -04:00
Rafał Miłecki
6a461c23e7 b43: include HT-PHY in some common code
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:59 -04:00
Rafał Miłecki
984e5befba bcma: implement BCM4331 workaround for external PA lines
We need to disable ext. PA lines for reading SPROM. It's disabled by
default, but this patch allows using bcma after loading wl, which leaves
workaround enabled.

Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:59 -04:00
Rafał Miłecki
17030f48e3 b43: support new RX header, noticed to be used in 598.314+ fw
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:59 -04:00
Rafał Miłecki
5d85290556 b43: support new TX header, noticed to be used by 598.314+ fw
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:58 -04:00
Rafał Miłecki
efe0249b0f b43: use enum for firmware header format
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:58 -04:00
Rafał Miłecki
2391b7e8d4 b43: rename TX header formats
Replace "old" and "new" with number of the first firmware known to use
the given format.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:58 -04:00
Helmut Schaa
e69deded2b mac80211: Tear down BA session on BAR tx failure
As described at [1] some STAs (i.e. Intel 5100 Windows) can end up
correctly BlockAcking incoming frames without delivering them to user
space if a AMPDU subframe got lost and we don't flush the receipients
reorder buffer with a BlockAckReq. This in turn results in stuck
connections.

According to 802.11n-2009 it is not necessary to send a BAR to flush
the recepients RX reorder buffer but we still do that to be polite.

However, assume the following frame exchange:

AP -> STA, AMPDU (failed)
AP -> STA, BAR (failed)

The client in question then ends up in the same situation and won't
deliver frames to userspace anymore since we weren't able to flush
its reorder buffer.

This is not a hypothetical situation but I was able to observe this
exact behavior during a stress test between a rt2800pci AP and a Intel
5100 Windows client.

In order to work around this issue just tear down the BA session as
soon as a BAR failed to be TX'ed.

[1] http://comments.gmane.org/gmane.linux.kernel.wireless.general/66867

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:58 -04:00
Helmut Schaa
c1407b6cb2 wireless: Introduce defines for BAR TID_INFO & MULTI_TID fields
While at it also fix the indention of the other IEEE80211_BAR_CTRL_ defines.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:58 -04:00
Felix Fietkau
2a190322d4 b43: reload phy and bss settings after core restarts
b43_op_config and b43_op_bss_info_changed apply many settings by directly
writing to hardware registers. These settings are lost as soon as the core
is restarted and the initvals are reloaded. This was discovered because
restarting hostapd led to the beacon interval getting set to ~33s (see
https://dev.openwrt.org/ticket/8033 for more information).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:57 -04:00
Stanislaw Gruszka
69ce674bfa ath9k: do btcoex ASPM disabling at initialization time
Disable ASPM in pci ->probe on upstream (device) and downstream
(PCIe port) component. According to e1000e driver authors this is
required. I did not find that requirement in PCIe spec, but it seems
to be logical for me.

This need to be fixed for CONFIG_PCIEASPM, that will be done later ...

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:57 -04:00
Stanislaw Gruszka
3b9cf1be8c ath9k: merge common ->config_pci_powersave() checks
Move common checks into wrapper function. Since ASPM can be only enabled
on PCIe devices ->is_pciexpress check is unneeded.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:57 -04:00
Stanislaw Gruszka
84c87dc86e ath9k: remove ->config_pci_powersave() redundant argument
We always call ->config_pci_powersave() with both restore and power_off
arguments equal to 0 or both equal to 1, so merge them into one
argument.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22 14:45:57 -04:00
Jesper Juhl
c8d755b59a net/wan/hdlc_ppp: use break in switch
We'll either hit one of the case labels or the default in the switch
and in all cases do we then 'goto out' and we also have a 'goto out'
after the switch that is redundant. Change to just use break in the
case statements and leave the 'goto out' after the lop for everyone to
hit.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-22 11:30:38 -07:00
John W. Linville
b38d355eaa Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
	drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
	drivers/staging/ath6kl/os/linux/ar6000_drv.c
2011-08-22 14:28:50 -04:00
Marek Lindner
a943cac144 batman-adv: merge update_transtable() into tt related code
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-08-22 15:16:22 +02:00
Marek Lindner
267151cdfd batman-adv: reuse tt_len() to calculate tt buffer length
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
2011-08-22 15:16:22 +02:00
Antonio Quartulli
df6edb9e69 batman-adv: print client flags in the local/global transtables output
Since clients can have several flags on or off, this patches make them
appear in the local/global transtable output so that they can be checked
for debugging purposes.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-08-22 15:16:22 +02:00
Antonio Quartulli
3d393e4732 batman-adv: implement AP-isolation on the sender side
If a node has to send a packet issued by a WIFI client to another WIFI client,
the packet is dropped.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-08-22 15:16:21 +02:00
Antonio Quartulli
59b699cdee batman-adv: implement AP-isolation on the receiver side
When a node receives a unicast packet it checks if the source and the
destination client can communicate or not due to the AP isolation

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-08-22 15:16:20 +02:00
Antonio Quartulli
bc2790808a batman-adv: detect clients connected through a 802.11 device
Clients connected through a 802.11 device are now marked with the
TT_CLIENT_WIFI flag. This flag is also advertised with the tt
announcement.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-08-22 15:16:20 +02:00
Antonio Quartulli
015758d002 batman-adv: correct several typ0s in the comments
Several typos have been corrected and some sentences have been rephrased

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-08-22 15:16:19 +02:00
Antonio Quartulli
1a1f37d925 batman-adv: hash_add() has to discriminate on the return value
hash_add() returns 0 on success while returns -1 either on error and on
entry already present. The caller could use such information to select
its behaviour. For this reason it is useful that hash_add() returns -1
in case on error and returns 1 in case of entry already present.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
2011-08-22 15:16:19 +02:00
David S. Miller
ca1ba7caa6 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next
Conflicts:
	drivers/net/ethernet/intel/e1000e/netdev.c
2011-08-20 17:25:36 -07:00
Changli Gao
6461be3a54 net: Preserve ooo_okay when copying skb header
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-20 14:20:49 -07:00
Vladimir Zapolskiy
2e025c71ce dm9000: define debug level as a module parameter
This change allows to get driver specific debug messages output
providing a module parameter. As far as the maximum level of verbosity
is too high, it is demoted by default.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-20 14:15:55 -07:00
David S. Miller
823dcd2506 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-08-20 10:39:12 -07:00
Matt Carlson
eaa36660de tg3: Update version to 3.120
This patch updates the tg3 version to 3.120.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-20 10:34:27 -07:00
Matt Carlson
941ec90f35 tg3: Add external loopback support to selftest
This patch adds external loopback support to tg3's ethtool selftest.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-20 10:34:27 -07:00
Matt Carlson
28a4595786 tg3: Restructure tg3_test_loopback
The tg3_test_loopback() function is starting to get more complicated as
more loopback tests are added.  This patch cleans up the code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-20 10:34:27 -07:00
Matt Carlson
5e5a7f371f tg3: Pull phy int lpbk setup into separate func
This patch pulls out the internal phy loopback setup code into a
separate function.  This cleans up the loopback test code and makes it
available for NETIF_F_LOOPBACK support later.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-20 10:34:27 -07:00