Hannes Eder [Fri, 26 Dec 2008 08:06:28 +0000 (00:06 -0800)]
drivers/net/skfp: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/skfp/skfddi.c:620:13: warning: symbol 'skfp_interrupt' was not declared. Should it be static?
drivers/net/skfp/skfddi.c:687:25: warning: symbol 'skfp_ctl_get_stats' was not declared. Should it be static?
drivers/net/skfp/skfddi.c:1232:6: warning: symbol 'CheckSourceAddress' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 08:04:53 +0000 (00:04 -0800)]
drivers/net/qlge: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/qlge/qlge_ethtool.c:100:6: warning: symbol 'ql_update_stats' was not declared. Should it be static?
drivers/net/qlge/qlge_mpi.c:22:5: warning: symbol 'ql_get_mb_sts' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 08:04:26 +0000 (00:04 -0800)]
drivers/net/netxen: fix sparse warnings: use NULL pointer instead of plain integer
Fix this sparse warnings:
drivers/net/netxen/netxen_nic_hw.c:1462:18: warning: Using plain integer as NULL pointer
drivers/net/netxen/netxen_nic_hw.c:1536:18: warning: Using plain integer as NULL pointer
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 08:03:59 +0000 (00:03 -0800)]
drivers/net/ixgbe: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/ixgbe/ixgbe_82598.c:180:5: warning: symbol 'ixgbe_get_copper_link_capabilities_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_82598.c:245:5: warning: symbol 'ixgbe_setup_fc_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_82598.c:729:5: warning: symbol 'ixgbe_set_vmdq_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_82598.c:773:5: warning: symbol 'ixgbe_set_vfta_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_82598.c:897:5: warning: symbol 'ixgbe_read_analog_reg8_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_82598.c:919:5: warning: symbol 'ixgbe_write_analog_reg8_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_82598.c:940:5: warning: symbol 'ixgbe_read_i2c_eeprom_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_82598.c:1000:5: warning: symbol 'ixgbe_get_supported_physical_layer_82598' was not declared. Should it be static?
drivers/net/ixgbe/ixgbe_dcb_82598.c:100:5: warning: symbol 'ixgbe_dcb_config_packet_buffers_82598' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 08:03:19 +0000 (00:03 -0800)]
drivers/net/irda: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/irda/ma600-sir.c:239:5: warning: symbol 'ma600_reset' was not declared. Should it be static?
drivers/net/irda/smsc-ircc2.c:875:5: warning: symbol 'smsc_ircc_hard_xmit_sir' was not declared. Should it be static?
drivers/net/irda/smsc-ircc2.c:1131:6: warning: symbol 'smsc_ircc_set_sir_speed' was not declared. Should it be static?
drivers/net/irda/smsc-ircc2.c:1897:6: warning: symbol 'smsc_ircc_sir_start' was not declared. Should it be static?
drivers/net/irda/w83977af_ir.c:150:5: warning: symbol 'w83977af_open' was not declared. Should it be static?
drivers/net/irda/w83977af_ir.c:313:5: warning: symbol 'w83977af_probe' was not declared. Should it be static?
drivers/net/irda/w83977af_ir.c:412:6: warning: symbol 'w83977af_change_speed' was not declared. Should it be static?
drivers/net/irda/w83977af_ir.c:492:5: warning: symbol 'w83977af_hard_xmit' was not declared. Should it be static?
drivers/net/irda/w83977af_ir.c:734:5: warning: symbol 'w83977af_dma_receive' was not declared. Should it be static?
drivers/net/irda/w83977af_ir.c:806:5: warning: symbol 'w83977af_dma_receive_complete' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 08:02:49 +0000 (00:02 -0800)]
drivers/net/igb: remove dead code (function 'igb_read_pci_cfg')
Fix this warning:
drivers/net/igb/e1000_mac.c:54: warning: 'igb_read_pci_cfg' defined but not used
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Mon, 22 Dec 2008 09:16:13 +0000 (09:16 +0000)]
drivers/net/e1000e: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/e1000e/es2lan.c:1265:5: warning: symbol 'e1000_read_kmrn_reg_80003es2lan' was not declared. Should it be static?
drivers/net/e1000e/es2lan.c:1298:5: warning: symbol 'e1000_write_kmrn_reg_80003es2lan' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 07:59:28 +0000 (23:59 -0800)]
drivers/net/cxgb3: comment out dead code
The function 'vsc8211_set_speed_duplex' is not used, so comment it
out. For 'vsc8211_set_automdi' the function 'vsc8211_set_speed_duplex'
is the only caller, so comment it out as well.
Fix this (sparse) warning:
drivers/net/cxgb3/vsc8211.c:269: warning: 'vsc8211_set_automdi' defined but not used
drivers/net/cxgb3/vsc8211.c:295:5: warning: symbol 'vsc8211_set_speed_duplex' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 07:58:57 +0000 (23:58 -0800)]
drivers/net/bonding: fix sparse warnings: move decls to header file
Fix this sparse warnings:
drivers/net/bonding/bond_main.c:104:20: warning: symbol 'bonding_defaults' was not declared. Should it be static?
drivers/net/bonding/bond_main.c:204:22: warning: symbol 'ad_select_tbl' was not declared. Should it be static?
drivers/net/bonding/bond_sysfs.c:60:21: warning: symbol 'bonding_rwsem' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 07:58:35 +0000 (23:58 -0800)]
drivers/net/atlx: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/atlx/atl1.c:198:16: warning: symbol 'atl1_check_options' was not declared. Should it be static?
drivers/net/atlx/atl1.c:526:5: warning: symbol 'atl1_read_mac_addr' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 07:57:21 +0000 (23:57 -0800)]
drivers/net/arcnet: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/arcnet/capmode.c:64:6: warning: symbol 'arcnet_cap_init' was not declared. Should it be static?
drivers/net/arcnet/com90xx.c:586:5: warning: symbol 'com90xx_reset' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 07:56:45 +0000 (23:56 -0800)]
drivers/net: fix sparse warnings: make symbols static
Fix this sparse warnings:
drivers/net/3c523.c:350:6: warning: symbol 'alloc586' was not declared. Should it be static?
drivers/net/cs89x0.c:1029:14: warning: symbol 'reset_chip' was not declared. Should it be static?
drivers/net/eepro.c:1399:1: warning: symbol 'read_eeprom' was not declared. Should it be static?
drivers/net/plip.c:1020:5: warning: symbol 'plip_hard_header_cache' was not declared. Should it be static?
drivers/net/s2io.c:5116:6: warning: symbol 'do_s2io_store_unicast_mc' was not declared. Should it be static?
drivers/net/smc9194.c:767:12: warning: symbol 'smc_findirq' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Fri, 26 Dec 2008 07:55:35 +0000 (23:55 -0800)]
drivers/net: fix sparse warnings: make do-while a compound statement
While at it insert some extra curly braces and fix formatting.
Fix this sparse warnings:
drivers/net/atp.c:811:8: warning: do-while statement is not a compound statement
drivers/net/atp.c:813:8: warning: do-while statement is not a compound statement
drivers/net/atp.c:815:11: warning: do-while statement is not a compound statement
drivers/net/atp.c:817:11: warning: do-while statement is not a compound statement
drivers/net/plip.c:642:4: warning: do-while statement is not a compound statement
drivers/net/plip.c:647:4: warning: do-while statement is not a compound statement
drivers/net/plip.c:820:4: warning: do-while statement is not a compound statement
drivers/net/plip.c:825:4: warning: do-while statement is not a compound statement
drivers/net/starfire.c:886:3: warning: do-while statement is not a compound statement
Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
PAGE_SIZE allocations via slab are not guaranteed to be page-aligned;
use get_zeroed_page for the 'pt' buffer (I don't really know what this
is, only that it is passed to firmware and that the first error
message complains about its alignment). This allows the system to
boot.
Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yevgeny Petrilin [Fri, 26 Dec 2008 02:13:45 +0000 (18:13 -0800)]
mlx4_en: Removed TX locking when polling TX cq
There is no need to synchronize the polling with the transmit
function. The only place to synchronize is when we process
the cq from the transmit function. Also removed spin_lock_irq,
and using spin_trylock, if somebody else is already processing the cq,
no need to wait for it to finish.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Brice Goglin [Fri, 26 Dec 2008 02:08:59 +0000 (18:08 -0800)]
myri10ge: update firmware headers to 1.4.37
Update myri10ge firmware headers to 1.4.37:
* Make each member of the error/cmd enum an initialized one, so there
is a convenient numerical reference to look for reverse conversion.
* Add new MXGEFW_CMD_RELAX_RXBUFFER_ALIGNMENT command.
* Add new "features" field to mcp_header.
Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Johannes Berg [Fri, 26 Dec 2008 02:07:50 +0000 (18:07 -0800)]
forcedeth: don't poll NV event 36
Polling doesn't seem to be necessary on my hardware, at
least I haven't seen any bad effects testing it a while.
Remove the polling so the CPU doesn't have to wake up a
hundred times per second.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Fri, 26 Dec 2008 02:04:51 +0000 (18:04 -0800)]
net/appletalk: Remove redundant test
atif is tested for being NULL twice, with the same effect in each case. I
have kept the second test, as it seems to fit well with the comment above it.
A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@
if (x@p1 == NULL || ...) { ... when forall
return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)
// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@
... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)
@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@
Roel Kluin [Fri, 26 Dec 2008 01:23:50 +0000 (17:23 -0800)]
qlge: ql_adapter_down() typo
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
In short, nlmsg_next() can make "remaining" go negative, and the
remaining >= sizeof(...) comparison will promote "remaining" to an
unsigned type, which means that the expression will evaluate to
true for negative numbers, even though it was not intended.
I put "theoretical" in the title because I have no evidence that
this can actually happen, but I suspect that a crafted netlink
packet can trigger some badness.
Note that the last test, which seemingly has the exact same
problem (also true for nla_ok()), is perfectly OK, since we
already know that remaining is positive.
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Fri, 26 Dec 2008 01:12:58 +0000 (17:12 -0800)]
tcp: Always set urgent pointer if it's beyond snd_nxt
Our TCP stack does not set the urgent flag if the urgent pointer
does not fit in 16 bits, i.e., if it is more than 64K from the
sequence number of a packet.
This behaviour is different from the BSDs, and clearly contradicts
the purpose of urgent mode, which is to send the notification
(though not necessarily the associated data) as soon as possible.
Our current behaviour may in fact delay the urgent notification
indefinitely if the receiver window does not open up.
Simply matching BSD however may break legacy applications which
incorrectly rely on the out-of-band delivery of urgent data, and
conversely the in-band delivery of non-urgent data.
Alexey Kuznetsov suggested a safe solution of following BSD only
if the urgent pointer itself has not yet been transmitted. This
way we guarantee that when the remote end sees the packet with
non-urgent data marked as urgent due to wrap-around we would have
advanced the urgent pointer beyond, either to the actual urgent
data or to an as-yet untransmitted packet.
The only potential downside is that applications on the remote
end may see multiple SIGURG notifications. However, this would
occur anyway with other TCP stacks. More importantly, the outcome
of such a duplicate notification is likely to be harmless since
the signal itself does not carry any information other than the
fact that we're in urgent mode.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Fri, 26 Dec 2008 00:59:03 +0000 (16:59 -0800)]
sctp: Add validity check for SCTP_PARTIAL_DELIVERY_POINT socket option
The latest ietf socket extensions API draft said:
8.1.21. Set or Get the SCTP Partial Delivery Point
Note also that the call will fail if the user attempts to set
this value larger than the socket receive buffer size.
This patch add this validity check for SCTP_PARTIAL_DELIVERY_POINT
socket option.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Fri, 26 Dec 2008 00:58:11 +0000 (16:58 -0800)]
sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID
If FWD-TSN chunk is received with bad stream ID, the sctp will not do the
validity check, this may cause memory overflow when overwrite the TSN of
the stream ID.
This patch fix this problem by discard the chunk if stream ID is not
less than MIS.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Implement socket option SCTP_GET_ASSOC_NUMBER of the latest ietf socket
extensions API draft.
8.2.5. Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)
This option gets the current number of associations that are attached
to a one-to-many style socket. The option value is an uint32_t.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Fri, 26 Dec 2008 00:56:45 +0000 (16:56 -0800)]
sctp: Fix a typo in socket.c
Just fix a typo in socket.c.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Fri, 26 Dec 2008 00:54:58 +0000 (16:54 -0800)]
sctp: Bring SCTP_MAXSEG socket option into ietf API extension compliance
Brings maxseg socket option set/get into line with the latest ietf socket
extensions API draft, while maintaining backwards compatibility.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Krzysztof Halasa [Fri, 26 Dec 2008 00:50:41 +0000 (16:50 -0800)]
net: PHYLIB mdio fixes #2
The PHYLIB mdio code has more problems in error paths:
- mdiobus_release can be called before bus->state is set to
MDIOBUS_REGISTERED
- mdiobus_scan allocates resources which need to be freed
- the comment is wrong, the resistors used are actually pull-ups.
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Fri, 26 Dec 2008 00:42:51 +0000 (16:42 -0800)]
netns: igmp: make /proc/net/{igmp,mcfilter} per netns
This patch makes the followinf proc entries per-netns:
/proc/net/igmp
/proc/net/mcfilter
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Fri, 26 Dec 2008 00:42:23 +0000 (16:42 -0800)]
netns: igmp: allow IPPROTO_IGMP sockets in netns
Looks like everything is already ready.
Required for ebtables(8) for one thing.
Also, required for ipmr per-netns (coming soon). (Benjamin)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
smsc911x: fix BUG if module is removed while interface is up
If the module is removed while its interface is up, smsc911x_stop is not
called until after smsc911x_drv_remove has disposed of phy_dev. This
patch changes the stop method to handle this situation.
This is a different problem to the one reported by dfoley@telus.net.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Neil Horman [Tue, 23 Dec 2008 04:43:12 +0000 (20:43 -0800)]
net: Remove unused netdev arg from some NAPI interfaces.
When the napi api was changed to separate its 1:1 binding to the net_device
struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
vestigual net_device structure parameter. This patch cleans up that api by
properly removing it..
Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Tue, 23 Dec 2008 03:44:13 +0000 (19:44 -0800)]
pkt_sched: Remove smp_wmb() in qdisc_watchdog()
While implementing a TCQ_F_THROTTLED flag there was used an smp_wmb()
in qdisc_watchdog(), but since this flag is practically used only in
sch_netem(), and since it's not even clear what reordering is avoided
here (TCQ_F_THROTTLED vs. __QDISC_STATE_SCHED?) it seems the barrier
could be safely removed.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Chou [Tue, 23 Dec 2008 03:40:02 +0000 (19:40 -0800)]
r6040: save and restore MIER correctly in the interrupt routine
This patch saves the MIER register contents before treating
interrupts, then restores them correcty at the end of the
interrupt routine.
Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Chou [Tue, 23 Dec 2008 03:38:17 +0000 (19:38 -0800)]
r6040: fix wrong logic in mdio code
This patch fixes a reverse logic in the MDIO code.
Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Tue, 23 Dec 2008 03:35:28 +0000 (19:35 -0800)]
net: Fix oops in dev_ifsioc()
A command like this: "brctl addif br1 eth1" issued as a user gave me
an oops when bridge module wasn't loaded. It's caused by using a dev
pointer before checking for NULL.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 22 Dec 2008 04:21:52 +0000 (20:21 -0800)]
tg3: Update version to 3.97
This patch updates the version number to 3.97.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 22 Dec 2008 04:21:18 +0000 (20:21 -0800)]
tg3: tg3.h cleanups
This patch cleans up the tg3 header file by removing the preprocessor
definitions for standard PCI configuration space registers. The driver
should be using the standard definitions when needed. The patch
continues by removing redundant PHY related definitions and reorganizes
some of the remaining entries.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 22 Dec 2008 04:19:57 +0000 (20:19 -0800)]
tg3: Remove unused cfgspc device members
This patch removes the pci_bist and pci_hdr_type members from the
device structure and removes the code that references them. They are
not really used.
The patch rounds out the changes by moving the pci_cmd member to plug
a structure hole that would have been created. On 32-bit systems, this
movement removes a subsequent structure hole later in the structure. On
64-bit systems though, the movement merely consolidates two holes into
one larger hole.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 22 Dec 2008 04:19:30 +0000 (20:19 -0800)]
tg3: Cleanup IPV6 LSO
This patch attempts to make the relationship between IPV6 checksum
offload and IPV6 LSO more obvious. The patch also toggles a bit
needed for IPV6 LSO on 5785 and 57780 devices.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 22 Dec 2008 04:18:56 +0000 (20:18 -0800)]
tg3: WOL fixes
The first hunk of this patch inverts a flag that was accidentally
toggled as part of commit 0a459aac9d151c2e36ec65723b9b845b24c5cbc3
("tg3: Allow WOL for phylib controlled Broadcom phys").
The second hunk of the patch removes the call to
device_may_wakeup() in the 5906 config detection path. At the
point of the call, the driver shouldn't be querying for WOL
capability. It should be detecting and setting it.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Don Skidmore [Mon, 22 Dec 2008 04:11:04 +0000 (20:11 -0800)]
ixgbe: fix the display of DCB control stats in ethtool
Priority flow contol statistics for Data Center Bridging (DCB) weren't
included in ethtool. This patch adds them.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Don Skidmore [Mon, 22 Dec 2008 04:10:29 +0000 (20:10 -0800)]
net: add DCNA attribute to the BCN interface for DCB
Adds the Backward Congestion Notification Address (BCNA) attribute to the
Backward Congestion Notification (BCN) interface for Data Center Bridging
(DCB), which was missing. Receive the BCNA attribute in the ixgbe driver.
The BCNA attribute is for a switch to inform the endstation about the physical
port identification in order to support BCN on aggregated links.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Don Skidmore [Mon, 22 Dec 2008 04:09:50 +0000 (20:09 -0800)]
net: fix DCB setstate to return success/failure
Data Center Bridging (DCB) had no way to know if setstate had failed in the
driver. This patch enables dcb netlink code to handle the status for the DCB
setstate interface. Likewise it allows the driver to return a failed status
if MSI-X isn't enabled.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Buesch [Fri, 19 Dec 2008 17:40:00 +0000 (18:40 +0100)]
b43: Suspend MAC while killing the radio
We should suspend the MAC, before we kill the radio. This gives
the MAC a chance to leave any TX/RX state and it avoids races on
the PHY/RADIO registers.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Fri, 19 Dec 2008 04:23:05 +0000 (23:23 -0500)]
ath5k: correct packet length in tx descriptors
Packet length calculation (which includes frame check sequence)
should take into account whether we add a pad field or not.
Extract the calculation into a helper and use it in both places.
Changes to desc.c
Changes-licensed-under: ISC
Changes to ath5k.h, base.c
Changes-licensed-under: 3-Clause-BSD
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Thu, 18 Dec 2008 21:35:27 +0000 (23:35 +0200)]
mac80211: implement dynamic power save
This patch implements dynamic power save for mac80211. Basically it
means enabling power save mode after an idle period. Implementing it
dynamically gives a good compromise of low power consumption and low
latency. Some hardware have support for this in firmware, but some
require the host to do it.
The dynamic power save is implemented by adding an timeout to
ieee80211_subif_start_xmit(). The timeout can be enabled from userspace
with Wireless Extensions. For example, the command below enables the
dynamic power save and sets the time timeout to 500 ms:
iwconfig wlan0 power timeout 500m
Power save now only works with devices which handle power save in firmware.
It's also disabled by default and the heuristics when and how to enable is
considered as a policy decision and will be left for the userspace to handle.
In case the firmware has support for this, drivers can disable this feature
with IEEE80211_HW_NO_STACK_DYNAMIC_PS.
Big thanks to Johannes Berg for the help with the design and code.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Thu, 18 Dec 2008 21:35:20 +0000 (23:35 +0200)]
mac80211: track master queue status
This is a preparation for the dynamic power save support. In future there are
two paths to stop the master queues and we need to track this properly to
avoid starting queues incorrectly. Implement this by adding a status
array for each queue.
The original idea and design is from Johannes Berg, I just did
the implementation based on his notes. All the bugs are mine, of course.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Thu, 18 Dec 2008 21:35:13 +0000 (23:35 +0200)]
mac80211: enable IEEE80211_CONF_PS only when associated
Also disable power save when disassociated. It makes no sense to have
power save enabled while disassociated.
iwlwifi seems to have this check in the driver, but it's better to do this
in mac80211 instead.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Buesch [Thu, 18 Dec 2008 21:13:39 +0000 (22:13 +0100)]
b43: Fix some MAC locking
This fixes some locking w.r.t. the lower MAC (firmware).
It also removes a lot of ancient IRQ-locking that's not needed anymore.
We simply suspend the MAC. That's easier and causes less trouble.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Thu, 18 Dec 2008 12:33:00 +0000 (14:33 +0200)]
ath9k: Fixed RX decryption status reporting
The RX code in ath9k uses sc_keymap to figure out whether a default
key was used. However, the default key entries in sc_keymap were
always set and as such, frames could have been claimed to be decrypted
by hardware when they were not. This can cause problems especially
with TKIP since mac80211 is validating the Michael MIC in the frame
and this will result in MIC failure and potentially TKIP
countermeasures if the frame was not decrypted correctly.
Change key cache slot allocation to mark only the keys that really
have been used in sc_keymap to avoid the issue. The key cache slot
selection routines are now internally avoiding the slots that may be
needed for TKIP group keys.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Thu, 18 Dec 2008 12:31:10 +0000 (14:31 +0200)]
ath9k: Fix key cache slot selection for splitmic
ath_reserve_key_cache_slot() was obviously supposed to return an index
to a free slot, not reserved one. This could have caused problems with
hardware revisions that use splitmic.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Wed, 17 Dec 2008 20:26:59 +0000 (14:26 -0600)]
mac80211: Print unknown packet type in tasklet_handler
In stress testing p54usb, the WARN_ON() in ieee80211_tasklet_handler() was
triggered; however, there is no logging of the received value for packet
type. Adding that feature will improve the warning.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
p54usb: bring first generation devices back to life
This patch fixes a serious regression (introduced by:
"p54: fix memory management")
that affected isl3886+net2280 usb devices operation.
Signed-off-by: Christian Lamparter <chunkeey@web.de> Tested-by: Artur Skawina <art.08.09@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Wed, 17 Dec 2008 11:30:31 +0000 (13:30 +0200)]
ath9k: Fix a NULL pointer dereference in ath_rate_get
It looks like mac80211 may try to send unicast frames to a STA that
does not have a STA entry. We need to make sure that that is caught in
the rate control code before dereferencing STA data.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jay Sternberg [Wed, 17 Dec 2008 08:52:34 +0000 (16:52 +0800)]
iwlwifi: indicate txpower is off in sysfs
The patch checks if the radio is disabled before displaying the tx power
level. Previously when the txpower was set off show_tx_power still
returned the prior power level. Now it will indicate the power has been
turned off.
Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhu Yi [Wed, 17 Dec 2008 08:52:33 +0000 (16:52 +0800)]
iwlwifi: use GFP_KERNEL to allocate Rx SKB memory
Previously we allocate Rx SKB with GFP_ATOMIC flag. This is because we need
to hold a spinlock to protect the two rx_used and rx_free lists operation
in the rxq.
After spliting the rx_used delete and rx_free insert into two operations,
we don't require the skb allocation in an atomic context any more (the
function itself is scheduled in a workqueue).
This patch should fix the "iwlagn: Can not allocate SKB buffers" warning
we see recently.
Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wu, Fengguang [Wed, 17 Dec 2008 08:52:29 +0000 (16:52 +0800)]
iwlwifi: update comments on the debug interface
Bring up-to-date some comments on the location of debug files.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>