summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* netfilter: nf_ct_tcp: merge tcpv[4,6]_net_init into tcp_net_initGao feng2012-06-271-50/+21Star
| | | | | | | | | | | | Merge tcpv4_net_init and tcpv6_net_init into tcp_net_init to remove redundant code now that we have the u_int16_t proto parameter. And use nf_proto_net.users to identify if it's the first time we use the nf_proto_net, in that case, we initialize it. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nf_conntrack: fix memory leak if sysctl registration failsGao feng2012-06-271-2/+5
| | | | | | | | | | | | In nf_ct_l4proto_register_sysctl, if l4proto sysctl registration fails, we have to make sure that we release the compat sysctl table. This can happen if TCP has been registered compat for IPv4, and IPv6 compat registration fails. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nf_conntrack: use l4proto->users as refcount for per-net dataGao feng2012-06-271-30/+46
| | | | | | | | | | | | | | | | | Currently, nf_proto_net's l4proto->users meaning is quite confusing since it depends on the compilation tweaks. To resolve this, we cleanup this code to regard it as the refcount for l4proto's per-net data, since there may be two l4protos use the same per-net data. Thus, we increment pn->users when nf_conntrack_l4proto_register successfully, and decrement it for nf_conntrack_l4_unregister case. The users refcnt is not required form layer 3 protocol trackers. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nf_conntrack: add nf_ct_kfree_compat_sysctl_tableGao feng2012-06-272-2/+9
| | | | | | | | | | | | This patch is a cleanup. It adds nf_ct_kfree_compat_sysctl_table to release l4proto's compat sysctl table and set the compat sysctl table point to NULL. This new function will be used by follow-up patches. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nf_conntrack: prepare l4proto->init_net cleanupGao feng2012-06-2711-15/+16
| | | | | | | | | | l4proto->init contain quite redundant code. We can simplify this by adding a new parameter l3proto. This patch prepares that code simplification. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nf_conntrack: fix nf_conntrack_l3proto_registerGao feng2012-06-271-13/+23
| | | | | | | | | | | | | | | | | | Before commit 2c352f444ccfa966a1aa4fd8e9ee29381c467448 (netfilter: nf_conntrack: prepare namespace support for l4 protocol trackers), we register sysctl before register protocol tracker. Thus, if sysctl is registration fails, the protocol tracker will not be registered. After that commit, if sysctl registration fails, protocol registration still remains, so we leave things in intermediate state. To fix this, this patch registers sysctl before protocols. And if protocol registration fail, sysctl is unregistered. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: ctnetlink: add new messages to obtain statisticsPablo Neira Ayuso2012-06-272-1/+264
| | | | | | | | | | | | | | | | | This patch adds the following messages to ctnetlink: IPCTNL_MSG_CT_GET_STATS_CPU IPCTNL_MSG_CT_GET_STATS IPCTNL_MSG_EXP_GET_STATS_CPU To display connection tracking system per-cpu and global statistics. This provides a replacement for the following /proc interfaces: /proc/net/stat/nf_conntrack /proc/sys/net/netfilter/nf_conntrack_count Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* be2net: Fix to trim skb for padded vlan packets to workaround an ASIC BugSomnath Kotur2012-06-272-14/+47
| | | | | | | | | Fixed spelling error in a comment as pointed out by DaveM. Also refactored existing code a bit to provide placeholders for another ASIC Bug workaround that will be checked-in soon after this. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sh_eth: add support for set_ringparam/get_ringparamYoshihiro Shimoda2012-06-272-33/+112
| | | | | | | This patch supports the ethtool's set_ringparam() and get_ringparam(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sh_eth: fix up the buffer pointersYoshihiro Shimoda2012-06-271-7/+24
| | | | | | | | After freeing the buffer, the driver should change the value of the pointer to NULL. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sh_eth: remove unnecessary members/definitionsYoshihiro Shimoda2012-06-272-75/+1Star
| | | | | | | | This patch removes unnecessary members in sh_th_private. This patch also removes unnecessary definitions in sh_eth.h Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sh_eth: remove unnecessary functionYoshihiro Shimoda2012-06-272-23/+0Star
| | | | | | | | The sh_eth_timer() called mod_timer() for itself. So, this patch removes the function. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Change bnx2x_tests_str_arr to static charMerav Sicron2012-06-271-1/+1
| | | | | | | | | | This patch changes the definition of bnx2x_tests_str_arr from char to static char. This correction will also eliminate the sparse warning created in commit cf2c1df62e065bfc15e38daf2d3479a56b320f29. Signed-off-by: Merav Sicron <meravs@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities ↵Barak Witkowski2012-06-2713-139/+420
| | | | | | | | | | | | | | | | advertisement 1. When FCoE offload driver is registered, copy its capabilities to the chip scratchpad. 2. Copy FCoE/iSCSI MAC addresses in aligned manner to chip scratchpad. 3. Add FCoE/iSCSI statistics collection support Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* 6lowpan: double unlock on an error pathDan Carpenter2012-06-271-1/+1
| | | | | | | | | | We already unlocked a few lines earlier here, so we can go directly to drop without passing through unlock. This was introduced recently in c5d3687f6c ('6lowpan: read data from skb safely'). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: Delete NLMSG_PUT and NLMSG_NEW.David S. Miller2012-06-271-8/+0Star
| | | | | | | No longer used and a poor interface as they were macros with embedded gotos. Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_sched: sch_api: Move away from NLMSG_NEW().David S. Miller2012-06-271-10/+14
| | | | | | | And use nlmsg_data() while we're here too, as well as remove a useless cast. Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_sched: cls_api: Move away from NLMSG_NEW().David S. Miller2012-06-271-5/+7
| | | | | | | And use nlmsg_data() while we're here too, as well as remove a useless cast. Signed-off-by: David S. Miller <davem@davemloft.net>
* decnet: dn_table: Move away from NLMSG_NEW().David S. Miller2012-06-271-5/+6
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* decnet: dn_route: Move away from NLMSG_NEW().David S. Miller2012-06-271-5/+7
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* audit: netlink: Move away from NLMSG_NEW().David S. Miller2012-06-271-10/+13
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* infiniband: netlink: Move away from NLMSG_NEW().David S. Miller2012-06-271-4/+6
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* selinux: netlink: Move away from NLMSG_PUT().David S. Miller2012-06-271-4/+7
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* unix_diag: Move away from NLMSG_PUT().David S. Miller2012-06-271-11/+13
| | | | | | | And use nlmsg_data() while we're here too and remove useless casts. Signed-off-by: David S. Miller <davem@davemloft.net>
* pkt_sched: act_api: Move away from NLMSG_PUT().David S. Miller2012-06-271-28/+31
| | | | | | | | Move away from NLMSG_NEW() as well. And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: nfnetlink_queue_core: Move away from NLMSG_PUT().David S. Miller2012-06-271-9/+13
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: nfnetlink_log: Move away from NLMSG_PUT().David S. Miller2012-06-271-13/+16
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: ipt_ULOG: Move away from NLMSG_PUT().David S. Miller2012-06-271-7/+8
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* inet_diag: Move away from NLMSG_PUT().David S. Miller2012-06-271-19/+24
| | | | | | | And use nlmsg_data() while we're here too, and remove useless casts. Signed-off-by: David S. Miller <davem@davemloft.net>
* decnet: dn_rtmsg: Move away from NLMSG_PUT().David S. Miller2012-06-271-10/+10
| | | | | | | | And use nlmsg_data() while we're here too. Also, remove pointless kernel log message. Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: ebt_ulog: Move away from NLMSG_PUT().David S. Miller2012-06-271-13/+10Star
| | | | | | | | | And use nlmsg_data() while we're here too. Also, free and NULL out skb when nlmsg_put() fails and remove pointless kernel log message. Signed-off-by: David S. Miller <davem@davemloft.net>
* gdm72xx: Move away from NLMSG_PUT().David S. Miller2012-06-271-4/+6
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* connector: Move cn_test.c away from NLMSG_PUT().David S. Miller2012-06-271-7/+6Star
| | | | | | And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
* connector: use nlmsg_put() instead of NLMSG_PUT() macro.Javier Martinez Canillas2012-06-271-6/+6
| | | | | | | | | | | The NLMSG_PUT() macro contains a hidden goto which makes the code hard to audit and very error prone. While been there also use the inline function nlmsg_data() instead of the NLMSG_DATA() macro to do explicit type checking. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* team: remove unused rcu_head field from team_port structJiri Pirko2012-06-271-1/+0Star
| | | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* team: do not allow to map disabled portsJiri Pirko2012-06-273-4/+6
| | | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* team: fix team_adjust_ops with regard to enabled portsJiri Pirko2012-06-271-11/+19
| | | | | | | | team_adjust_ops should check for enabled ports, not all ports. This may lead to division by zero. This patch fixes this. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac802154: add monitor listener to TX datapathalex.bluesman.smirnov@gmail.com2012-06-271-0/+2
| | | | | | | | Add monitor receive callback to the TX datapath to catch all the data sent to transceivers. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/ieee802154: add support for the at86rf230/231 transceiversalex.bluesman.smirnov@gmail.com2012-06-274-0/+1003
| | | | | | | | | | | The AT86RF231 is a feature rich, low-power 2.4 GHz radio transceiver designed for industrial and consumer ZigBee/IEEE 802.15.4, 6LoWPAN, RF4CE and high data rate 2.4 GHz ISM band applications. This patch adds support for the Atmel RF230/231 radio transceivers. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac802154: mlme start requestalex.bluesman.smirnov@gmail.com2012-06-271-0/+25
| | | | | | | Basic preparations to start the interface. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac802154: page and channel setteralex.bluesman.smirnov@gmail.com2012-06-272-0/+45
| | | | | | | | A new method to set page and channel values for a transceiver was added to the MIB. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac802154: short address setteralex.bluesman.smirnov@gmail.com2012-06-272-0/+18
| | | | | | | | A method to assign the IEEE802.15.4 short address was added to the MIB implementation. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac802154: set and get PAN idalex.bluesman.smirnov@gmail.com2012-06-272-0/+33
| | | | | | | | Two methods intended to get and set the Private Area Network identifier were added to the MIB implementation. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac802154: add wpan device-class supportalex.bluesman.smirnov@gmail.com2012-06-278-13/+583
| | | | | | | | | | | | | | | | | | | | Every real 802.15.4 transceiver, which works with software MAC layer, can be classified as a wpan device in this stack. So the wpan device implementation provides missing link in datapath between the device drivers and the Linux network queue. According to the IEEE 802.15.4 standard each packet can be one of the following types: - beacon - MAC layer command - ACK - data This patch adds support for the data packet-type only, but this is enough to perform data transmission and receiving over radio. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: qmi_wwan: simplify a check in qmi_wwan_bind()Dan Carpenter2012-06-271-2/+2
| | | | | | | | | This code is easier to read if we specify which flags we want at the condition instead of at the top of the function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: Cache ip_error() routes even when not forwarding.David S. Miller2012-06-272-18/+20
| | | | | | | | | | | | And account for the fact that, when we are not forwarding, we should bump statistic counters rather than emit an ICMP response. RP-filter rejected lookups are still not cached. Since -EHOSTUNREACH and -ENETUNREACH can now no longer be seen in ip_rcv_finish(), remove those checks. Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: Remove unnecessary code from rt_check_expire().David S. Miller2012-06-261-23/+11Star
| | | | | | | | IPv4 routing cache entries no longer use dst->expires, because the metrics, PMTU, and redirect information are stored in the inetpeer cache. Signed-off-by: David S. Miller <davem@davemloft.net>
* batman-adv: fix global TT entry deletionAntonio Quartulli2012-06-261-0/+2
| | | | | | | | During the last merge involving translation-table.c something went wrong and two lines disappeared from translation-table.c. This patch recovers them. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* batman-adv: fix condition in AP isolationAntonio Quartulli2012-06-261-1/+1
| | | | | | | | | During the last conflict resolution involving translation-table.c something went wrong and a condition in the AP isolation code was reversed. This patch fixes this problem. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/sh-eth: Check return value of sh_eth_reset when chip reset failNobuhiro Iwamatsu2012-06-261-32/+56
| | | | | | | | The sh_eth_reset function resets chip, but this performs nothing when failed. This changes sh_eth_reset return an error, when this failed in reset. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>