David S. Miller [Wed, 18 Apr 2012 17:21:59 +0000 (13:21 -0400)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
Included changes:
* remove duplicated line in comment
* add htons() invocation for tt_crc as suggested by Al Viro
* OriGinator Message seqno initial value is now random
* some cleanups and fixes
batman-adv: skip the window protection test when the originator has no neighbours
When we receive an OGM from from a node for the first time, the last_real_seqno
field of the orig_node structure has not been initialised yet. The value of this
field is used to compute the current ogm-seqno window and therefore the
protection mechanism will probably drop the packet due to an out-of-window error.
To avoid this situation this patch adds a check to skip the window protection
mechanism if no neighbour nodes have already been added. When the first
neighbour node is added, the last_real_seqno field is initialised too.
Reported-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr)
Instead of using sizeof(struct ethhdr) it is strongly recommended to use the
kernel macro ETH_HLEN. This patch substitute each occurrence of the former
expressione with the latter one.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
françois romieu [Tue, 17 Apr 2012 11:11:40 +0000 (11:11 +0000)]
dmfe: enforce consistent timing delay.
The driver does not always use the same timing for what looks like
the same operations.
- DCR0
Use the same udelay everywhere for reset. Upper bound is 100 us.
- DCR9
Use 5us delay for srom clock. 1us delay for phy_write_1bit (writes
PHY_DATA_[01]) are not changed as they stay withing a 2,5MHz MDIO
clock range.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Reviewed-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
We get two timing related fields for each bss from firmware in scan
results.
1) timestamp - Actual timestamp information in probe response/beacon
2) network_tsf - firmware's TSF value at the time the beacon or probe
response was received.
Both are needed while associating by firmware.
The patch takes care of following things.
1) We should pass "timestamp" to cfg80211_inform_bss(), but currently
"network_tsf" is being provided. This error is corrected here.
2) Rename "network_tsf" to "fw_tsf"
3) Make use of u64 variable instead of an array of u8/u32 to save
parsed "timestamp" information.
4) Use timestamp provided to stack in scan results using
cfg80211_inform_bss() while associating. (bss->tsf)
5) Allocate space to save fw_tsf in "priv" of cfg80211_bss
and retrieve it while associating.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
As described at
http://article.gmane.org/gmane.linux.kernel.wireless.general/86084
libertas is taking a long time to load because it loads firmware
during module loading.
Add a new API for interface drivers to load their firmware
asynchronously. The same semantics of the firmware table are followed
like before.
Interface drivers will be converted in follow-up patches, then we can
remove the old, synchronous firmware loading function.
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Mon, 16 Apr 2012 22:53:02 +0000 (23:53 +0100)]
libertas: harden-up exit paths
These simple sanity check avoids extra complexity in error paths when
moving to asynchronous firmware loading (which means the device may fail to
init some time after its creation).
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Mon, 16 Apr 2012 22:52:42 +0000 (23:52 +0100)]
libertas: Firmware loading simplifications
Remove the ability to pass module parameters with firmware filenames
for USB and SDIO interfaces.
Remove the ability to pass custom "user" filenames to lbs_get_firmware().
Remove the ability to reprogram internal device memory with a different
firmware from the USB driver (we don't know of any users), and simplify
the OLPC firmware loading quirk to simply placing the OLPC firmware
at the top of the list (we don't know of any users other than OLPC).
Move lbs_get_firmware() into its own file.
These simplifications should have no real-life effect but make the
upcoming transition to asynchronous firmware loading considerably less
painful.
Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andreas Hartmann [Mon, 16 Apr 2012 22:25:28 +0000 (00:25 +0200)]
rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails
There are connection stalls or very poor throughputs with rt2800
hardware using 802.11n in AP mode since patch "mac80211: retry sending
failed BAR frames later instead of tearing down aggr"[1][2].
Since rt2800 hardware is not able to correctly report the tx status of
BAR frames, this patch removes as workaround the existing error handling
on AP side, which lets mac80211 send a BAR when an AMPDU subframe fails.
As a result, most wifi clients (aside from Intel STAs on Windows)
instead will timeout now the reorder buffer and request the lost frame
again.
The correct solution would be, to tear down BA session on AP side.
This patch was born on the basis of "[RFT] rt2x00: Tear down BA
session on QoS frame failure"[3].
Signed-off-by: Andreas Hartmann <andihartmann@01019freenet.de> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hayes Wang [Fri, 30 Mar 2012 06:33:00 +0000 (14:33 +0800)]
r8169: modify pll power function
Adjust r810x_pll_power_down, r810x_pll_power_up, and r8168_pll_power_up.
Always power up device during rtl_open. For r810x, turn off more power
when the WOL is disabled.
Randy Dunlap [Mon, 16 Apr 2012 15:01:33 +0000 (15:01 +0000)]
hippi: fix printk format in rrunner.c
Fix printk format warning (from i386 build):
drivers/net/hippi/rrunner.c:146:9: warning: format '%08llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Jes Sorensen <jes@trained-monkey.org>
Cc: linux-hippi@sunsite.dk Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Mon, 26 Mar 2012 15:23:39 +0000 (08:23 -0700)]
iwlwifi: remove get_cmd_string
The command strings are needed through the layers for
debug and error messages, but can differ with opmode.
As a result, we need to give the command names to the
transport layer as configuration.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Fri, 9 Mar 2012 08:16:35 +0000 (09:16 +0100)]
iwlwifi: remove uCode alternatives mechanism
We've never released firmware using the alternatives
mechanism and our build process makes that difficult
anyway. This means that in every file we have ever
built (except maybe by hand for testing) the listed
alternative was 0. Make the alternative field in the
TLVs part of the TLV number (thus expanding that to
32 bits); this gives us more TLV numbers (not really
needed) and more importantly protects against rogue
firmware files that actually do use the alternatives
mechanism -- those will now be rejected since they
don't contain any valid TLVs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Fri, 9 Mar 2012 07:58:46 +0000 (08:58 +0100)]
iwlwifi: remove no_sleep_autoadjust
My original idea with this was to adjust the sleep
pattern of the uCode based on the maximum network
latency userspace asked for. Due to nobody wanting
to test it, this logic was disabled by default. It
seems the time has come to remove it, since it's
not only always disabled but there also don't seem
to be any applications that actually request a max
network latency.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Axel Lin [Sat, 14 Apr 2012 04:38:43 +0000 (12:38 +0800)]
net/can: use module_pci_driver
This patch converts the drivers in drivers/net/can/* to use
module_pci_driver() macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-can@vger.kernel.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Daniel Baluta [Sun, 25 Mar 2012 23:05:50 +0000 (02:05 +0300)]
can: fix sparse warning for cgw_list
Make cgw_list static to remove the following sparse warning:
net/can/gw.c:69:1: warning: symbol 'cgw_list' was not declared.
Should it be static?
Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Taken from ralink driver 2011_0406_RT5390_RT5392_Linux_STA_V2.5.0.3_DPO
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The computation of the scaled power value in
various eeprom files uses identical code. Move
that code into a helper function and use that
instead of code duplication.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: use consistent value for REDUCE_SCALED_POWER_BY_THREE_CHAIN
The REDUCE_SCALED_POWER_BY_THREE_CHAIN symbol is
defined in different eeprom files, and the value
varies between the different files.
In eeprom_def.c and in ar9003_eeprom.c the value
of the symbol is 9, however the comments in these
files indicates the value should be 10*log10(3)*2
which is 9.54242509439325. Replace the the value
to 10 in these files.
Also add comments to eeprom_9287.c.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Axel Lin [Sat, 14 Apr 2012 02:38:36 +0000 (10:38 +0800)]
net/wireless: use module_pci_driver
This patch converts the drivers in drivers/net/wireless/* to use
module_pci_driver() macro which makes the code smaller and a bit simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Nick Kossifidis <mickflemm@gmail.com> Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> Cc: Simon Kelley <simon@thekelleys.org.uk> Cc: Jouni Malinen <j@w1.fi> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: linux-wireless@vger.kernel.org Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 13 Apr 2012 18:57:43 +0000 (13:57 -0500)]
rtlwifi: rtl8192ce: Remove false positives for kmemleak
When rtl8192ce is in operation, kmemleak indicates a number of leaks, yet
when the driver is removed all are gone. These false positives happen
in two locations:
The tx interrupt for beacon queue is configured only for edma chips.
As the edma chip does not support per descriptor interrupt, no need to
set INTREQ for every beacon descriptor. And also clear ps filter for
beacon frame.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
After the chip reset, the noise immunity levels are restored with
history values. If the immunity levels are lower than the defaults,
lets start with the optimal values.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The background scan completion takes more time when the station is
having heavy uplink traffic. The scan state machine decides to fall
back to home channel on every off-channel visit when there are pending
frames in tx queue. bgscan completion took ~30sec on dual band US
regulatory card.
scan period = (20 active channels * probe timeout) +
(12 passive channels * passive probe timeout) +
(32 * timeout on home channel) +
(32 * flush timeout)
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sync-up ibss beacon timer with the beacon frame's timestamp. When the
node acts as joiner, it has to sync with the received beacon timestamp
instead of reading tsf from hw. As the hw tsf wont wont be update till
bssid is configured. This patch programs hw tsf with the received beacon
timestamp if beacon timers are yet to be configured.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
tcp: restore formatting of macros for tcp_skb_cb sacked field
Commit b82d1bb4 inadvertendly placed unrelated new code between
TCPCB_EVER_RETRANS and TCPCB_RETRANS and the other macros that refer
to the sacked field in the struct tcp_skb_cb (probably because there
was a misleading empty line there). This commit fixes up the
formatting so that all macros related to the sacked field are adjacent
again.
Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Javier Cardona [Thu, 12 Apr 2012 21:32:23 +0000 (14:32 -0700)]
mac80211: Take into account TSF adjustment latency in Toffset setpoint
When testing mesh synchronization we observed a global TSF slowdown that
was dependent on the number of synchronized mesh stations. This seems
to be caused by the TSF adjustment (read/write) latency.
Adding a small margin to the Toffset setpoint solved the problem.
Signed-off-by: Shinichi Hotori <hotorinn@gmail.com> Signed-off-by: Yu Niiro <yu.niiro@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Thu, 12 Apr 2012 21:32:20 +0000 (14:32 -0700)]
mac80211: Set the correct values for hwmp (1) and airtimeLinkMetric (1)
Per sections 8.4.2.100.2 and 8.4.2.100.3 of Std 802.11-2012
Reported-by: Shinichi Hotori <hotorinn@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: check IEEE80211_HW_QUEUE_CONTROL in ieee80211_check_queues()
Commit 3a25a8c8 (mac80211: add improved HW queue control) introduced a
bug when running in AP mode without the IEEE80211_HW_QUEUE_CONTROL
flag set. The ieee80211_check_queues() function always returns
-EINVAL, preventing AP mode from starting. To fix this, check whether
this flag is set before checking if cab_queue is set properly.
Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 15 Mar 2012 09:16:16 +0000 (10:16 +0100)]
cfg80211: enforce lack of interface combinations
My grand plan to allow drivers to gradually move over
to advertising virtual interface combinations and only
enforce with drivers that do want it enforced doesn't
seem to be working out, only Christian ever added the
advertising (to carl9170), nobody else did.
Begin enforcing combinations in cfg80211 so that users
can rely on the information reported about a device.
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> Cc: Jouni Malinen <jouni@qca.qualcomm.com> Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Nick Kossifidis <mickflemm@gmail.com> Cc: Bob Copeland <me@bobcopeland.com> Cc: Bing Zhao <bzhao@marvell.com> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Amir Vadai <amirv@mellanox.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
John Fastabend [Sun, 15 Apr 2012 06:44:37 +0000 (06:44 +0000)]
macvlan: add FDB bridge ops and macvlan flags
This adds FDB bridge ops to the macvlan device passthru mode.
Additionally a flags field was added and a NOPROMISC bit to
allow users to use passthru mode without the driver calling
dev_set_promiscuity(). The flags field is a u16 placed in a
4 byte hole (consuming 2 bytes) of the macvlan_dev struct.
We want to do this so that the macvlan driver or stack
above the macvlan driver does not have to process every
packet. For the use case where we know all the MAC addresses
of the endstations above us this works well.
This patch is a result of Roopa Prabhu's work. Follow up
patches are needed for VEPA and VEB macvlan modes.
v2: Change from distinct nopromisc mode to a flags field to
configure this. This avoids the tendency to add a new
mode every time we need some slightly different behavior.
v3: fix error in dev_set_promiscuity and add change and get
link attributes for flags.
CC: Roopa Prabhu <roprabhu@cisco.com> CC: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Greg Rose [Sun, 15 Apr 2012 06:44:31 +0000 (06:44 +0000)]
ixgbe: UTA table incorrectly programmed
The UTA table was being set to the functional equivalent of promiscuous
mode. This was resulting in traffic from the virtual function being
flooded onto the wire and the PF device. This resulted in additional
overhead for VF traffic sent to the network and in the case of traffic
sent to the PF or another VF resulted in unwanted packets on the wire.
This was actually not the intended behavior. Now that we can program
the embedded switch correctly we can remove this snippit of code. Users
who want to support this should configure the FDB correctly using the
FDB ops.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
John Fastabend [Sun, 15 Apr 2012 06:44:25 +0000 (06:44 +0000)]
ixgbe: allow RAR table to be updated in promisc mode
This allows RAR table updates while in promiscuous. With
SR-IOV enabled it is valuable to allow the RAR table to
be updated even when in promisc mode to configure forwarding
Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>