summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mlx4_en: dont change mac_header on xmitEric Dumazet2012-02-262-13/+7
| | | | | | | | | | | | | | | | | A driver xmit function is not allowed to change skb without special care. mlx4_en_xmit() should not call skb_reset_mac_header() and instead should use skb->data to access ethernet header. This removes a dumb test : if (ethh && ethh->h_dest) Also remove this slow mlx4_en_mac_to_u64() call, we can use get_unaligned() to get faster code. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: ctnetlink: support kernel-space dump filtering by ctmarkPablo Neira Ayuso2012-02-262-1/+35
| | | | | | | | | | | | | This patch adds CTA_MARK_MASK which, together with CTA_MARK, allows you to selectively send conntrack entries to user-space by returning those that match mark & mask. With this, we can save cycles in the building and the parsing of the entries that may be later on filtered out in user-space by using the ctmark & mask. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: allow to pass data pointer to netlink_dump_start() callbackPablo Neira Ayuso2012-02-262-0/+3
| | | | | | | | | | | | | | | | | This patch allows you to pass a data pointer that can be accessed from the dump callback. Netfilter is going to use this patch to provide filtered dumps to user-space. This is specifically interesting in ctnetlink that may handle lots of conntrack entries. We can save precious cycles by skipping the conversion to TLV format of conntrack entries that are not interesting for user-space. More specifically, ctnetlink will include one operation to allow to filter the dumping of conntrack entries by ctmark values. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: add netlink_dump_control structure for netlink_dump_start()Pablo Neira Ayuso2012-02-2612-43/+87
| | | | | | | | | | | | | | | Davem considers that the argument list of this interface is getting out of control. This patch tries to address this issue following his proposal: struct netlink_dump_control c = { .dump = dump, .done = done, ... }; netlink_dump_start(..., &c); Suggested by David S. Miller. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2012-02-2511-67/+66
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
| * e1000e: rename e1000e_reload_nvm() and call as function pointerBruce Allan2012-02-246-4/+8
| | | | | | | | | | | | | | | | | | | | Rename e1000e_reload_nvm() to e1000e_reload_nvm_generic() to signify the function is used for more than one MAC-family type, and set and use it as a MAC ops function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: cleanup - remove unnecessary variableBruce Allan2012-02-241-2/+1
| | | | | | | | | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: use true/false for boolean send_xon, do not assume always trueBruce Allan2012-02-242-2/+4
| | | | | | | | | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: cleanup comment in e1000_hash_mc_addr()Bruce Allan2012-02-241-2/+1
| | | | | | | | | | | | | | | | Remove reference to non-existant function. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: rename e1000e_config_collision_dist() and call as function pointerBruce Allan2012-02-248-11/+14
| | | | | | | | | | | | | | | | | | | | | | Rename e1000e_config_collision_dist() to e1000e_config_collision_dist_generic() to signify the function is used for more than one MAC-family type, and set and use it as a MAC ops function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: comment correction in e1000e_set_kmrn_lock_loss_workaround_ich8lanBruce Allan2012-02-241-1/+1
| | | | | | | | | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: cleanup calls to setup_physical_interface function pointerBruce Allan2012-02-241-1/+1
| | | | | | | | | | | | | | | | | | Call the MAC ops setup_physical_interface function pointer instead of the MAC-family-specific function to conform to the rest of the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: cleanup use of check_reset_block function pointerBruce Allan2012-02-246-18/+16
| | | | | | | | | | | | | | | | | | Replace e1000_check_reset_block() inline function with calls to the PHY ops check_reset_block function pointer. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: cleanup use of check_mng_mode function pointerBruce Allan2012-02-243-8/+3
| | | | | | | | | | | | | | | | | | Replace e1000_check_mng_mode() inline function with calls to the MAC ops check_mng_mode function pointer. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: cleanup: rename e1000e_setup_link() and call as function pointerBruce Allan2012-02-245-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Rename e1000e_setup_link() to e1000e_setup_link_generic() to signify the function is used for more than one MAC-family type. The 82571-family has a custom setup_link function which also calls the generic function. The ich8lan-family has a custom function which should just be called via the function pointer. The 80003es2lan-family just uses the generic function. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * e1000e: cleanup: rename e1000e_id_led_init() and call as function pointerBruce Allan2012-02-245-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename e1000e_id_led_init() to e1000e_id_led_init_generic() to signify the function is used for more than one MAC-family type. For the ich8lan MAC family, some MACs use the generic function and others use the function e1000_id_led_init_pchlan(). In all cases where e1000e_id_led_init() was called directly, change to call the function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | xfrm: remove unneeded method typedef declaration in net/xfrm.h.Rami Rosen2012-02-251-5/+0
|/ | | | | | | | | The patch removes unneeded method typedef declaration (icv_update_fn_t ) and the two struct declarations which appear in its prototype (struct hash_desc and struct scatterlist) in net/xfrm.h. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Staging: wlags49_h2: print MAC via printk format specifierDanny Kukawka2012-02-241-5/+2
| | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
* Staging: ft1000-pcmcia: print MAC via printk format specifierDanny Kukawka2012-02-241-5/+2
| | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
* arch/ia64/hp/sim/simeth.c: print MAC via printk format specifierDanny Kukawka2012-02-241-7/+3
| | | | | | | Print MAC/dev_addr via printk extended format specifier %pm instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
* usb/kaweth: print MAC via printk format specifierDanny Kukawka2012-02-241-7/+1
| | | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Acked-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: David S. Miller <davem@davemloft.net>
* usb/cdc_ncm: print MAC via printk format specifierDanny Kukawka2012-02-241-5/+1
| | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* xscale/ixp2000/ixpdev: print MAC via printk format specifierDanny Kukawka2012-02-241-5/+2
| | | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Acked-by: Lennert Buytenhek <kernel@wantstofly.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sun/sunqe: print MAC via printk format specifierDanny Kukawka2012-02-241-8/+2
| | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbevf: print MAC via printk format specifierDanny Kukawka2012-02-241-7/+1
| | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* dec/tulip/de4x5: print MAC via printk format specifierDanny Kukawka2012-02-241-5/+1
| | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* cirrus/mac89x0: print MAC via printk format specifierDanny Kukawka2012-02-241-4/+8
| | | | | | | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Use memcpy to set the address to dev->dev_addr in set_mac_address, instead of mxing it up in a for loop with printing a debug msg. Check also if the given address is valid. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* amd/hplance.c: print MAC via printk format specifierDanny Kukawka2012-02-241-8/+2
| | | | | | | | Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Add missing getsockopt for SO_NOFCS.David S. Miller2012-02-241-0/+3
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* v2 e1000: Neaten e1000_dump functionTushar Dave2012-02-241-63/+50
| | | | | | | | | | | | | | | | | | | | | | Use pr_<level> for printk Use temporary instead of multiple pr_conts Coalesce formats. Save a few bytes of object code too: $ size drivers/net/ethernet/intel/e1000/e1000_main.o* text data bss dec hex filename 60507 369 14120 74996 124f4 drivers/net/ethernet/intel/e1000/e1000_main.o.new 60717 369 14176 75262 125fe drivers/net/ethernet/intel/e1000/e1000_main.o.old Removed printing of pktdata. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000: Neaten e1000_config_dsp_after_link_changeJoe Perches2012-02-241-83/+73
| | | | | | | | | | | Separate a complicated bit of e1000_config_dsp_after_link_change into a new static function e1000_1000Mb_check_cable_length. Reduces indentation and adds a bit of clarity. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000e: cosmetic comment changes to make lines less than 80 charactersBruce Allan2012-02-241-2/+2
| | | | | | Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000e: cosmetic change to boolean comparisonsBruce Allan2012-02-241-2/+2
| | | | | | | | | | Recent discussions on LKML, kernel-janitors, linux-wireless and netdev have suggested boolean comparisons should use logical operators instead of equality comparisons with true/false. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* r8169: Support RX-FCS flag.Ben Greear2012-02-241-1/+5
| | | | | | | | This allows the NIC to receive the Ethernet FCS and pass it up the stack, allowing sniffers and other interested programs to inspect the FCS. Signed-off-by: Ben Greear <greearb@candelatech.com>
* r8169: Support RX-ALL flag.Ben Greear2012-02-241-13/+38
| | | | | | | | | | | | This allows the NIC to receive packets with bad FCS and Runts, which can help when sniffing. NOTE: r8169, at least on my NIC, silently drops packets with bad FCS instead of counting them. It seems they are only received in any fashion if the RxCRC flag is set (which this patch allows). Signed-off-by: Ben Greear <greearb@candelatech.com>
* 8139too: Support RX-FCS flag.Ben Greear2012-02-241-1/+5
| | | | | | | This allows the NIC to pass the Ethernet FCS on up the stack, and is useful when sniffing networks. Signed-off-by: Ben Greear <greearb@candelatech.com>
* 8139too: Support RX-ALL logic.Ben Greear2012-02-241-0/+52
| | | | | | | | | This allows the NIC to receive Runts and frames with bad Ethernet Frame Checksums (FCS). Useful to sniffing & diagnosing bad networks. Signed-off-by: Ben Greear <greearb@candelatech.com>
* e1000: Support RX-FCS flag.Ben Greear2012-02-241-10/+11
| | | | | | | | | This allows the NIC to pass the Ethernet Frame Checksum (FCS) up the stack. Useful when sniffing packets. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000: Support sending custom Ethernet CRC.Ben Greear2012-02-241-0/+13
| | | | | | | | Good for testing the RX logic for bad CRC handling. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000e: Support RXALL feature flag.Ben Greear2012-02-242-4/+26
| | | | | | | | | | | | This allows the NIC to receive all frames available, including those with bad FCS, un-matched vlans, ethernet control frames, and more. Tested by sending frames with bad FCS. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* net: Support RX-ALL feature flag.Ben Greear2012-02-243-0/+10
| | | | | | | | | | | | This flag requests that network devices pass all received frames up the stack, even ones with errors such as invalid FCS (frame check sum). This will allow sniffers to see bad packets and perhaps give the user some idea how to fix the problem. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000e: Support sending custom Ethernet CRC.Ben Greear2012-02-241-0/+12
| | | | | | | | | This can aid with testing the RX logic for bad CRCs. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* net: Add framework to allow sending packets with customized CRC.Ben Greear2012-02-2424-6/+104
| | | | | | | | | | | | This is useful for testing RX handling of frames with bad CRCs. Requires driver support to actually put the packet on the wire properly. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* e1000e: Support RXFCS feature flag.Ben Greear2012-02-243-8/+39
| | | | | | | | | | | | | | This enables enabling/disabling reception of the Ethernet FCS. This can be useful when sniffing packets. For e1000e, enabling RXFCS can change the default behaviour for how the NIC handles CRC. Disabling RXFCS will take the NIC back to defaults, which can be configured as part of the module options. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* net: Support RXFCS feature flag.Ben Greear2012-02-243-0/+9
| | | | | | | | | | | | When set on hardware that supports the feature, this causes the Ethernet FCS to be appended to the end of the skb. Useful for sniffing packets. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* davinci_mdio: Correct bitmask for clock divider valueChristian Riesch2012-02-241-1/+1
| | | | | | | | The CLKDIV bitfield in the MDIO Control Register is a 16 bit field, therefore the CLKDIV value may range from 0 to 0xffff. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* davinci_cpdma: Fix channel number written to teardown registersChristian Riesch2012-02-241-1/+1
| | | | | | | | | | | | chan->chan_num is 0..CPDMA_MAX_CHANNELS-1 for tx channels and CPDMA_MAX_CHANNELS..2*CPDMA_MAX_CHANNELS-1 for rx channels. However, the rx and tx teardown registers expect zero based channel numbering. Since the upper bits of the registers are reserved, the teardown also worked before, this patch is cleanup only. Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: update driver versionSathya Perla2012-02-241-1/+1
| | | | | Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: enable RSS for ipv6 pktsSathya Perla2012-02-241-1/+2
| | | | | Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: reset queue address after freeingSathya Perla2012-02-241-2/+4
| | | | | | | | This will prevent double free in some cases where be_clear() is called for cleanup when be_setup() fails half-way. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud