* [PATCH] bluetooth: macroize two small inlines to avoid module.h
From: Paul Gortmaker @ 2011-10-01 2:12 UTC (permalink / raw)
To: marcel-kz+m5ild9QBg9hUCZPvPmw, padovan-Y3ZbgMPKUGA34EUeqzHoZw
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-bluetooth-u79uwXL29TY76Z2rM5mHXA, Paul Gortmaker
These two small inlines make calls to try_module_get() and
module_put() which would force us to keep module.h present
within yet another common include header. We can avoid this
by turning them into macros. The hci_dev_hold construct
is patterned off of raw_spin_trylock_irqsave() in spinlock.h
Signed-off-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
---
[This is something I've added to the module.h cleanup tree since
the original module.h cleanup RFC patchset; sending here just for
transparency and for any review comments.]
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 8f441b8..9a77e8a 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -498,11 +498,15 @@ static inline void __hci_dev_put(struct hci_dev *d)
d->destruct(d);
}
-static inline void hci_dev_put(struct hci_dev *d)
-{
- __hci_dev_put(d);
- module_put(d->owner);
-}
+/*
+ * hci_dev_put and hci_dev_hold are macros to avoid dragging all the
+ * overhead of all the modular infrastructure into this header.
+ */
+#define hci_dev_put(d) \
+do { \
+ __hci_dev_put(d); \
+ module_put(d->owner); \
+} while (0)
static inline struct hci_dev *__hci_dev_hold(struct hci_dev *d)
{
@@ -510,12 +514,10 @@ static inline struct hci_dev *__hci_dev_hold(struct hci_dev *d)
return d;
}
-static inline struct hci_dev *hci_dev_hold(struct hci_dev *d)
-{
- if (try_module_get(d->owner))
- return __hci_dev_hold(d);
- return NULL;
-}
+#define hci_dev_hold(d) \
+({ \
+ try_module_get(d->owner) ? __hci_dev_hold(d) : NULL; \
+})
#define hci_dev_lock(d) spin_lock(&d->lock)
#define hci_dev_unlock(d) spin_unlock(&d->lock)
--
1.7.6
^ permalink raw reply related
* [PATCH 1/2] bridge: fix ordering of NEWLINK and NEWNEIGH events
From: Stephen Hemminger @ 2011-10-01 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20111001003725.449204345@vyatta.com>
[-- Attachment #1: bridge-fix-event-order.patch --]
[-- Type: text/plain, Size: 2076 bytes --]
When port is added to a bridge, the old code would send the new neighbor
netlink message before the subsequent new link message. This bug makes
it difficult to use the monitoring API in an application.
This code changes the ordering to add the forwarding entry
after the port is setup. One of the error checks (for invalid address)
is moved earlier in the process to avoid having to do unwind.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/bridge/br_if.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
--- a/net/bridge/br_if.c 2011-09-22 21:59:11.515091624 -0700
+++ b/net/bridge/br_if.c 2011-09-30 10:31:32.877957572 -0700
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
#include <linux/netpoll.h>
#include <linux/ethtool.h>
#include <linux/if_arp.h>
@@ -322,7 +323,8 @@ int br_add_if(struct net_bridge *br, str
/* Don't allow bridging non-ethernet like devices */
if ((dev->flags & IFF_LOOPBACK) ||
- dev->type != ARPHRD_ETHER || dev->addr_len != ETH_ALEN)
+ dev->type != ARPHRD_ETHER || dev->addr_len != ETH_ALEN ||
+ !is_valid_ether_addr(dev->dev_addr))
return -EINVAL;
/* No bridging of bridges */
@@ -350,10 +352,6 @@ int br_add_if(struct net_bridge *br, str
err = kobject_init_and_add(&p->kobj, &brport_ktype, &(dev->dev.kobj),
SYSFS_BRIDGE_PORT_ATTR);
if (err)
- goto err0;
-
- err = br_fdb_insert(br, p, dev->dev_addr);
- if (err)
goto err1;
err = br_sysfs_addif(p);
@@ -394,6 +392,9 @@ int br_add_if(struct net_bridge *br, str
dev_set_mtu(br->dev, br_min_mtu(br));
+ if (br_fdb_insert(br, p, dev->dev_addr))
+ netdev_err(dev, "failed insert local address bridge forwarding table\n");
+
kobject_uevent(&p->kobj, KOBJ_ADD);
return 0;
@@ -403,11 +404,9 @@ err4:
err3:
sysfs_remove_link(br->ifobj, p->dev->name);
err2:
- br_fdb_delete_by_port(br, p, 1);
-err1:
kobject_put(&p->kobj);
p = NULL; /* kobject_put frees */
-err0:
+err1:
dev_set_promiscuity(dev, -1);
put_back:
dev_put(dev);
^ permalink raw reply
* [PATCH 2/2] bridge: allow updating existing fdb entries
From: Stephen Hemminger @ 2011-10-01 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20111001003725.449204345@vyatta.com>
[-- Attachment #1: bridge-allow-replace-fdb.patch --]
[-- Type: text/plain, Size: 1580 bytes --]
Need to allow application to update existing fdb entries that already
exist. This makes bridge netlink neighbor API have same flags and
semantics as ip neighbor table.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/bridge/br_fdb.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
--- a/net/bridge/br_fdb.c 2011-09-16 13:12:58.061369744 -0700
+++ b/net/bridge/br_fdb.c 2011-09-30 10:31:57.478241405 -0700
@@ -558,19 +558,28 @@ skip:
/* Create new static fdb entry */
static int fdb_add_entry(struct net_bridge_port *source, const __u8 *addr,
- __u16 state)
+ __u16 state, __u16 flags)
{
struct net_bridge *br = source->br;
struct hlist_head *head = &br->hash[br_mac_hash(addr)];
struct net_bridge_fdb_entry *fdb;
fdb = fdb_find(head, addr);
- if (fdb)
- return -EEXIST;
-
- fdb = fdb_create(head, source, addr);
- if (!fdb)
- return -ENOMEM;
+ if (fdb == NULL) {
+ if (!(flags & NLM_F_CREATE))
+ return -ENOENT;
+
+ fdb = fdb_create(head, source, addr);
+ if (!fdb)
+ return -ENOMEM;
+ } else {
+ if (flags & NLM_F_EXCL)
+ return -EEXIST;
+
+ if (flags & NLM_F_REPLACE)
+ fdb->updated = fdb->used = jiffies;
+ fdb->is_local = fdb->is_static = 0;
+ }
if (state & NUD_PERMANENT)
fdb->is_local = fdb->is_static = 1;
@@ -626,7 +635,7 @@ int br_fdb_add(struct sk_buff *skb, stru
}
spin_lock_bh(&p->br->hash_lock);
- err = fdb_add_entry(p, addr, ndm->ndm_state);
+ err = fdb_add_entry(p, addr, ndm->ndm_state, nlh->nlmsg_flags);
spin_unlock_bh(&p->br->hash_lock);
return err;
^ permalink raw reply
* Re: Network problem with bridge and virtualbox
From: Stephen Hemminger @ 2011-10-01 0:18 UTC (permalink / raw)
To: William Thompson; +Cc: netdev
In-Reply-To: <20110929124941.GA16567@electro-mechanical.com>
On Thu, 29 Sep 2011 08:49:41 -0400
William Thompson <wt@electro-mechanical.com> wrote:
> Please keep me in the CC as I am not subscribed.
>
> I'm using a 64-bit kernel 3.0.0 and virtualbox 4.1.2.
>
> My problem is that I cannot ping the host from a virtual machine.
>
> My bridge is configured as follows:
> # brctl addbr br0
> # brctl setfd br0 0
> # brctl stp br0 off
> # ifconfig br0 10.2.3.1 netmask 255.255.255.0
>
> In the virtual machine, it is set to use br0 as it's interface (bridge mode)
> and it's IP is 10.2.3.10.
>
> The host gets packets from the vm, but the vm does not receive packets back.
>
> I have this same setup working on a 32-bit kernel 2.6.38.6 on another
> machine with virtualbox 4.0.4.
>
> I had a thought that the bridge on the host wasn't responding due to having
> no ports configured so I added one of my spare ethernet cards to it as
> follows:
> # brctl addif br0 eth1
> # ifconfig eth1 up
>
> The card was plugged into a switch. After doing this, the vm still could not
> talk to the host. I added a physical machine to the switch that eth1 was
> connected to and configured it to 10.2.3.2. I was able to ping 10.2.3.2 but
> not 10.2.3.1
Did you add any interface to the bridge?
I think you were bit by the change in carrier behavior. No carrier on the
bridge interface tracks the union of the devices in the bridge.
Several people have been using bridge in strange way (as a dummy device)
with no physical interfaces and some applications are checking for carrier.
^ permalink raw reply
* Re: tg3: BMC stops responding in 3.0
From: Matt Carlson @ 2011-09-30 23:53 UTC (permalink / raw)
To: Arkadiusz Mi??kiewicz
Cc: Matthew Carlson, Michael Chan, netdev@vger.kernel.org
In-Reply-To: <201109301006.25590.a.miskiewicz@gmail.com>
On Fri, Sep 30, 2011 at 01:06:25AM -0700, Arkadiusz Mi??kiewicz wrote:
> On Friday 30 of September 2011, Matt Carlson wrote:
> > On Mon, Sep 26, 2011 at 11:31:33AM -0700, Arkadiusz Mi??kiewicz wrote:
> > > On Monday 26 of September 2011, Matt Carlson wrote:
> > > > On Fri, Sep 23, 2011 at 12:45:50PM -0700, Arkadiusz Mi??kiewicz wrote:
> > > > > Hi,
> > > > >
> > > > > I was using 2.6.38.8 and recently tried to switch to 3.0.4 on Tyan
> > > > > S2891 platform.
> > > > >
> > > > > This platform uses tg3:
> > > > > tg3 0000:0a:09.1: eth1: Tigon3 [partno(BCM95704) rev 2003]
> > > > > (PCIX:133MHz:64- bit) MAC address 00:e0:81:33:5e:af
> > > > > tg3 0000:0a:09.1: eth1: attached PHY is 5704 (10/100/1000Base-T
> > > > > Ethernet) (WireSpeed[1], EEE[0])
> > > > > tg3 0000:0a:09.1: eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0]
> > > > > TSOcap[1] tg3 0000:0a:09.1: eth1: dma_rwctrl[769f4000]
> > > > > dma_mask[64-bit]
> > > > >
> > > > > With 2.6.38.8 everything was working fine. With 3.0.4 there is a
> > > > > problem. As soon as tg3 module is loaded or eth0 configured (can't
> > > > > tell which one since the machine is 400km away from me and I have no
> > > > > way to play with it other than ipmi or ssh) BMC stops responding (so
> > > > > all ipmitool commands over LAN stop working). Normal tg3 activity is
> > > > > not affected - I can ssh-in without a problem etc but ipmi over lan
> > > > > doesn't work.
> > > > >
> > > > > From ssh console "ipmitool lan print" works, shows data but for
> > > > > example after "ipmitool mc reset cold" it doesn't recover - ipmitool
> > > > > returns "Invalid channel: 255". I have to reboot to 2.6.38.8 and
> > > > > then issue "ipmitool mc reset cold" to recover.
> > > > >
> > > > > Any idea which tg3 change could break this? Can't bisect this due
> > > > > remote access only.
> > > > >
> > > > > I was hoping that maybe 9e975cc291d80d5e4562d6bed15ec171e896d69b
> > > > > "tg3: Fix io failures after chip reset" will fix things for me but no
> > > > > - this doesn't help.
> > > >
> > > > What version of the tg3 driver are you working with?
> > >
> > > The one in 3.0.4 kernel. I think it's 3.119 (at least modinfo says so).
> >
> > Unfortunately there were a lot of changes between 3.117 and 3.119(+).
> > Is there any way you can narrow down the gap?
>
> The machines are 400km away from me and it's hard to debug that way then
> ipmi/network conectivity is in stake :-/ I could try some form of bisecting
> but need to know if all git versions between 3.117 and 3.119 were known to be
> safe and working? I don't want to loose any conectivity to this machine.
>
> I was going to try 2.6.39 but it looks like it also uses 3.117 driver.
O.K. Can you give me the details of your machine? Maybe we have the
exact machine or a machine similar enough to reproduce the problem with.
^ permalink raw reply
* [RFD PATCH] netdev/phy/of: Augment device tree bindings for PHYs to specify IEEE802.3-2005 Section 45 addressing.
From: David Daney @ 2011-09-30 23:09 UTC (permalink / raw)
To: devicetree-discuss, grant.likely, linux-kernel, netdev, davem; +Cc: David Daney
Many 10 gigabit Ethernet PHY devices are interfaced to the MDIO bus
using a protocol called IEEE802.3-2005 Section 45. Where as PHYS for
1G, 100M and 10M usually use IEEE802.3-2005 Section 22. These two
protocols can be present on the same MDIO bus.
If we look at the Linux PHY probing code in drivers/of/of_mdio.c and
drivers/net/phy/phy_device.c, we have the situation where we need to
read the PHY registers to get the PHY ID out so that we can use this
to bind to a compatible driver. However we can only read these
registers if we know the proper MDIO bus protocol to use.
My idea is as follows:
o Add an optional property "mdio-clause-45" to the PHY's device tree
node to indicate that clause 45 addressing is used.
o When calling get_phy_id() we will set MII_ADDR_C45 in the address
if we know that clause 45 addressing is required for the PHY.
get_phy_id() will then use the proper bus protocol and register
numbers to read PHY ID based on MII_ADDR_C45.
o of_mdiobus_register() will signal MII_ADDR_C45 for PHYs tagged with
"mdio-clause-45"
o Existing PHYs without "mdio-clause-45" are unaffected.
o If no specific driver for the probed PHY ID is present, we can still
communicate with the PHY and perhaps use a generic 10G phy driver.
If the MDIO bus protocol were just to depend on the "compatible"
property, then we could not use generic drivers for unknown PHY IDs
Comments/other ideas welcome.
Thanks,
Signed-off-by: David Daney <david.daney@cavium.com>
---
Documentation/devicetree/bindings/net/phy.txt | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index bb8c742..69fd948 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -14,6 +14,11 @@ Required properties:
- linux,phandle : phandle for this node; likely referenced by an
ethernet controller node.
+Optional properties:
+
+ - mdio-clause-45 : Optional. If present, IEEE802.3-2005 Section 45
+ protocol is used for register access (usually for 10G PHYs).
+
Example:
ethernet-phy@0 {
--
1.7.2.3
^ permalink raw reply related
* [PATCH net-next] drivers/net: Add module.h to wireless/ath/ath6kl/sdio.c
From: Paul Gortmaker @ 2011-09-30 23:07 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linville-2XuSBdqkA4R54TAoqtyWWQ,
kvalo-A+ZNKFmMK5xy9aJCnZT0Uw,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, Paul Gortmaker
This file uses various MODULE_* macros, and so needs the full
module.h header called out explicitly.
Signed-off-by: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
---
[Dave: I can't carry this in the module.h tree with all the other one
line patches, as it only exists in trees based off wireless/net-next.
It fixes a compile failure that shows up in linux-next. Thanks.]
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 3417160..ca4a93e 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -14,6 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <linux/module.h>
#include <linux/mmc/card.h>
#include <linux/mmc/mmc.h>
#include <linux/mmc/host.h>
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Re: [PATCH] netdev/phy/icplus: Use mdiobus_write() and mdiobus_read() for proper locking.
From: David Miller @ 2011-09-30 22:54 UTC (permalink / raw)
To: david.daney
Cc: netdev, linux-mips, Gregory.Dietsche, u.kleine-koenig,
peppe.cavallaro
In-Reply-To: <1317421068-27278-1-git-send-email-david.daney@cavium.com>
From: David Daney <david.daney@cavium.com>
Date: Fri, 30 Sep 2011 15:17:48 -0700
> Usually you have to take the bus lock. Why not here too?
>
> I saw this when working on something else. Not even compile tested.
>
> Signed-off-by: David Daney <david.daney@cavium.com>
> Cc: Greg Dietsche <Gregory.Dietsche@cuw.edu>
> Cc: "Uwe Kleine-Konig" <u.kleine-koenig@pengutronix.de>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied to net-next.
^ permalink raw reply
* Re: [PATCH] netdev/phy: Use mdiobus_read() so that proper locks are taken.
From: David Miller @ 2011-09-30 22:54 UTC (permalink / raw)
To: david.daney; +Cc: netdev, linux-mips
In-Reply-To: <1317419482-25655-1-git-send-email-david.daney@cavium.com>
From: David Daney <david.daney@cavium.com>
Date: Fri, 30 Sep 2011 14:51:22 -0700
> Accesses to the mdio busses must be done with the mdio_lock to ensure
> proper operation. Conveniently we have the helper function
> mdiobus_read() to do that for us. Lets use it in get_phy_id() instead
> of accessing the bus without the lock held.
>
> Signed-off-by: David Daney <david.daney@cavium.com>
Applied to net-next.
^ permalink raw reply
* [PATCH] netdev/phy/icplus: Use mdiobus_write() and mdiobus_read() for proper locking.
From: David Daney @ 2011-09-30 22:17 UTC (permalink / raw)
To: netdev, davem
Cc: linux-mips, David Daney, Greg Dietsche, Uwe Kleine-Konig,
Giuseppe Cavallaro
Usually you have to take the bus lock. Why not here too?
I saw this when working on something else. Not even compile tested.
Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Cc: "Uwe Kleine-Konig" <u.kleine-koenig@pengutronix.de>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
drivers/net/phy/icplus.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index d4cbc29..bd4c740 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -42,36 +42,36 @@ static int ip175c_config_init(struct phy_device *phydev)
if (full_reset_performed == 0) {
/* master reset */
- err = phydev->bus->write(phydev->bus, 30, 0, 0x175c);
+ err = mdiobus_write(phydev->bus, 30, 0, 0x175c);
if (err < 0)
return err;
/* ensure no bus delays overlap reset period */
- err = phydev->bus->read(phydev->bus, 30, 0);
+ err = mdiobus_read(phydev->bus, 30, 0);
/* data sheet specifies reset period is 2 msec */
mdelay(2);
/* enable IP175C mode */
- err = phydev->bus->write(phydev->bus, 29, 31, 0x175c);
+ err = mdiobus_write(phydev->bus, 29, 31, 0x175c);
if (err < 0)
return err;
/* Set MII0 speed and duplex (in PHY mode) */
- err = phydev->bus->write(phydev->bus, 29, 22, 0x420);
+ err = mdiobus_write(phydev->bus, 29, 22, 0x420);
if (err < 0)
return err;
/* reset switch ports */
for (i = 0; i < 5; i++) {
- err = phydev->bus->write(phydev->bus, i,
- MII_BMCR, BMCR_RESET);
+ err = mdiobus_write(phydev->bus, i,
+ MII_BMCR, BMCR_RESET);
if (err < 0)
return err;
}
for (i = 0; i < 5; i++)
- err = phydev->bus->read(phydev->bus, i, MII_BMCR);
+ err = mdiobus_read(phydev->bus, i, MII_BMCR);
mdelay(2);
--
1.7.2.3
^ permalink raw reply related
* [PATCH] netdev/phy: Use mdiobus_read() so that proper locks are taken.
From: David Daney @ 2011-09-30 21:51 UTC (permalink / raw)
To: netdev, davem; +Cc: linux-mips, David Daney
Accesses to the mdio busses must be done with the mdio_lock to ensure
proper operation. Conveniently we have the helper function
mdiobus_read() to do that for us. Lets use it in get_phy_id() instead
of accessing the bus without the lock held.
Signed-off-by: David Daney <david.daney@cavium.com>
---
drivers/net/phy/phy_device.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index ff109fe..83a5a5a 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -213,7 +213,7 @@ int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
/* Grab the bits from PHYIR1, and put them
* in the upper half */
- phy_reg = bus->read(bus, addr, MII_PHYSID1);
+ phy_reg = mdiobus_read(bus, addr, MII_PHYSID1);
if (phy_reg < 0)
return -EIO;
@@ -221,7 +221,7 @@ int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
*phy_id = (phy_reg & 0xffff) << 16;
/* Grab the bits from PHYIR2, and put them in the lower half */
- phy_reg = bus->read(bus, addr, MII_PHYSID2);
+ phy_reg = mdiobus_read(bus, addr, MII_PHYSID2);
if (phy_reg < 0)
return -EIO;
--
1.7.2.3
^ permalink raw reply related
* [patch] make PACKET_STATISTICS getsockopt report consistently between ring and non-ring
From: Willem de Bruijn @ 2011-09-30 20:38 UTC (permalink / raw)
To: davem, netdev
This is a minor change.
Up until kernel 2.6.32, getsockopt(fd, SOL_PACKET, PACKET_STATISTICS,
...) would return total and dropped packets since its last invocation. The
introduction of socket queue overflow reporting [1] changed drop
rate calculation in the normal packet socket path, but not when using a
packet ring. As a result, the getsockopt now returns different statistics
depending on the reception method used. With a ring, it still returns the
count since the last call, as counts are incremented in tpacket_rcv and
reset in getsockopt. Without a ring, it returns 0 if no drops occurred
since the last getsockopt and the total drops over the lifespan of
the socket otherwise. The culprit is this line in packet_rcv, executed
on a drop:
drop_n_acct:
po->stats.tp_drops = atomic_inc_return(&sk->sk_drops);
As it shows, the new drop number it taken from the socket drop counter,
which is not reset at getsockopt. I put together a small example
that demonstrates the issue [2]. It runs for 10 seconds and overflows
the queue/ring on every odd second. The reported drop rates are:
ring: 16, 0, 16, 0, 16, ...
non-ring: 0, 15, 0, 30, 0, 46, 0, 60, 0 , 74.
Note how the even ring counts monotonically increase. Because the
getsockopt adds tp_drops to tp_packets, total counts are similarly
reported cumulatively. Long story short, reinstating the original code, as
the below patch does, fixes the issue at the cost of additional per-packet
cycles. Another solution that does not introduce per-packet overhead
is be to keep the current data path, record the value of sk_drops at
getsockopt() at call N in a new field in struct packetsock and subtract
that when reporting at call N+1. I'll be happy to code that, instead,
it's just more messy.
[1] http://patchwork.ozlabs.org/patch/35665/
[2] http://kernel.googlecode.com/files/test-packetsock-getstatistics.c
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
net/packet/af_packet.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c698cec..fabb4fa 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -961,7 +961,10 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
return 0;
drop_n_acct:
- po->stats.tp_drops = atomic_inc_return(&sk->sk_drops);
+ spin_lock(&sk->sk_receive_queue.lock);
+ po->stats.tp_drops++;
+ atomic_inc(&sk->sk_drops);
+ spin_unlock(&sk->sk_receive_queue.lock);
drop_n_restore:
if (skb_head != skb->data && skb_shared(skb)) {
--
1.7.3.1
^ permalink raw reply related
* Re: [PATCH] net: sh_eth: fix build failure
From: Nobuhiro Iwamatsu @ 2011-09-30 19:36 UTC (permalink / raw)
To: David Miller; +Cc: yoshihiro.shimoda.uh, sfr, netdev, linux-sh
In-Reply-To: <20110930.035449.1012299223616580574.davem@davemloft.net>
I see.
Thanks you.
Nobuhiro
2011/9/30 David Miller <davem@davemloft.net>:
> From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Date: Fri, 30 Sep 2011 16:51:34 +0900
>
>> 2011/09/30 15:55, Nobuhiro Iwamatsu wrote:
>>> 2011/9/30 Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>:
>> < snip >
>>>> +#include <linux/kernel.h>
>>>> +#include <linux/spinlock.h>
>>> These are not required.
>>
>> The Documentation/SubmitChecklist says the following:
>>
>> ========================================================
>> 1: If you use a facility then #include the file that defines/declares
>> that facility. Don't depend on other header files pulling in ones
>> that you use.
>> ========================================================
>>
>> The sh_eth driver uses spinlock functions and some macros of kernel.h.
>> So, I think that I have to write their "#include" in the driver.
>
> Agreed.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Nobuhiro Iwamatsu
^ permalink raw reply
* Re: pull request: wireless-next 2011-09-30
From: David Miller @ 2011-09-30 19:27 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20110930191131.GC2526@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 30 Sep 2011 15:11:31 -0400
> Here is yet another big package of wireless updates for 3.2. Highlights
> include a bluetooth pull, a wl12xx pull, and a pull of the wireless tree
> to fix some merge issues. Also included is the usual big sets of
> updates to ath9k, iwlagn, b43, and others. Plus, the NFC subsystem grew
> NCI support.
>
> Please let me know if there are problems!
Pulled, thanks John.
^ permalink raw reply
* pull request: wireless-next 2011-09-30
From: John W. Linville @ 2011-09-30 19:11 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev
Dave,
Here is yet another big package of wireless updates for 3.2. Highlights
include a bluetooth pull, a wl12xx pull, and a pull of the wireless tree
to fix some merge issues. Also included is the usual big sets of
updates to ath9k, iwlagn, b43, and others. Plus, the NFC subsystem grew
NCI support.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 56fd49e399ce1d82200fad5b8924d4e35a587809:
bna: Driver Version changed to 3.0.2.2 (2011-09-29 19:36:36 -0400)
are available in the git repository at:
git://git.infradead.org/users/linville/wireless-next.git for-davem
Alexander Simon (1):
mac80211: fix indentation
Amit Beka (1):
iwlagn: remove duplicate list init
Amitkumar Karwar (4):
mwifiex: fix 5GHz association issue
mwifiex: update bss band information
mwifiex: pass correct band parameter to ieee80211_channel_to_frequency()
mwifiex: reset skb length before inserting to free queue
Anderson Briglia (1):
Bluetooth: Fix wrong memcpy size on LE start encryption
Andre Guedes (2):
Bluetooth: Reduce critical region.
Bluetooth: Check 'dev_class' in mgmt_device_found()
Antti Julku (2):
Bluetooth: Add mgmt command for fast connectable mode
Bluetooth: Add mgmt events for blacklisting
Arik Nemtsov (12):
wl12xx: don't queue a new dummy packet if one is already pending
wl12xx: don't indicate up PS-filtered dummy packets
wl12xx: AP mode - don't regulate FW blocks for non-active STAs
wl12xx: support up to 8 stations in AP-mode
wl12xx: don't regulate links when a single STA is connected
wl12xx: AP mode - enable the BA constraint event from the FW
wl12xx: AP mode - clean BA and queue state in tx_reset
wl12xx: set mac80211 flags for A-MPDU aggregation support
wl12xx: AP mode - support hidden SSID
wl12xx: correct fw_status structure for 8 sta support in AP-mode
wl12xx: report the stop_ba event to all STAs in AP-mode
mac80211: treat the WME sta flag as a bit
Dan Carpenter (4):
mwifiex: add a kfree() to an error path
mwifiex: remove unneeded NULL check
NFC: use after free on error
wl3501_cs: min_t() cast truncates high bits
Daniel Drake (1):
libertas: scan behaviour consistency improvements
David Herrmann (1):
Bluetooth: hidp: Add support for NO_INIT_REPORTS quirk
Don Fry (1):
iwlagn: replace beacon_time_fsf_bits variable with #define
Eliad Peller (20):
wl12xx: print acx id
wl12xx: print the seq_num of rx packet
wl12xx: add module_param to trigger BUG() on recovery
wl12xx: add beacon_filtering debugfs file
wl12xx: don't disconnect on recovery
wl12xx: don't use WL1271_SCAN_OPT_PRIORITY_HIGH flag
wl12xx: check for ROC on scan_complete
wl12xx: add config_hangover command
wl12xx: use kstrtoul_from_user
wl12xx: declare support for WIPHY_FLAG_AP_UAPSD
wl12xx: support p2p interfaces
cfg80211: add cfg80211_find_vendor_ie() function
wl12xx: remove TIM ie from probe response
wl12xx: remove P2P ie from probe response
wl12xx: send all pending packets on channel change
wl12xx: Use dev_hlid for auth and assoc req
wl12xx: implement set_bitrate_mask callback
mac80211: add ieee80211_vif param to tsf functions
cfg80211/mac80211: add netdev param to set_txq_params()
mac80211: save tx params per sdata
Emmanuel Grumbach (17):
iwlagn: warn about buggy fw that doesn't set SEQ_RX_FRAME
iwlagn: unmap cmd queue's tfds as BIDI
iwlagn: free the Tx cmd when a non empty Tx queue is freed
iwlagn: move iwl_stop / wake_queue to the upper layer
iwlagn: use enum iwl_rxon_context_id instead of u8
iwlagn: document the bus layer API
iwlagn: add documentation to the transport layer
iwlagn: provide data after WARN_ON
iwlagn: remove the callback in host commands
iwlagn: simplify the iwl_device_cmd layout
iwlagn: remove uneeded declaration
iwlagn: pending frames musn't be incremented if agg is on
iwlagn: remove warning in iwl_rx_handle
iwlagn: sparse warning priv->temperature is signed
iwlagn: set the sequence control from the transport layer
iwlagn: update rate scaling with BA notifications
iwlagn: use kcalloc when possible for array allocation
Felix Fietkau (7):
ath9k: fix setting the IEEE80211_TX_CTL_CLEAR_PS_FILT flag
ath9k: sync the dma buffer after changing the retry flag
ath9k_hw: clean up hardware revision checks
ath9k_hw: remove dead code in the eeprom ops
ath9k_hw: fix setting the hardware diversity flag
ath9k_hw: remove ar9100_hw_compute_pll_control
ath9k: fix a regression in ath9k_ps_restore
Fry, Donald H (2):
iwlagn: fix modinfo display for 135 ucode.
iwlagn: simplify chain_noise_num_beacons indirection
Ilan Elias (7):
NFC: Add dev_up and dev_down control operations
NFC: move nfc.h from include/net to include/net/nfc
NFC: basic NCI protocol implementation
NFC: driver for TI shared transport
NFC: improve readability of an 'if' in nci core.c
NFC: implicitly deactivate in nci_start_poll
NFC: protect nci_data_exchange transactions
Joe Perches (1):
iwlagn: Convert kzalloc to kcalloc
Johannes Berg (22):
iwlagn: move PCI-E transport files
iwlagn: generically provide iwl_trans_send_cmd_pdu
iwlagn: Makefile whitespace cleanup
iwlagn: clean up PM code
iwlagn: rename iwl-pci.h to iwl-cfg.h
iwlagn: remove unused function declarations
iwlagn: move sysfs files to debugfs
iwlagn: remove drvdata support from bus layer
iwlagn: do not use interruptible waits
cfg80211: validate IBSS BSSID
mac80211: fix AP/VLAN PS buffer race
iwlagn: move scan code to scan file
iwlagn: remove common station priv
iwlagn: split remain-on-channel
iwlagn: fix dangling scan request
iwlagn: fix dangling scan request
iwlagn: fix slot programming
iwlagn: remove Kelvin support
iwlagn: make iwl_scan_cancel_timeout void
iwlagn: refactor scan complete
iwlagn: move iwl_process_scan_complete up
iwlagn: fix scan complete processing
John W. Linville (7):
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
Revert "ath9k: do not insert padding into tx buffers on AR9380+"
Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Merge branch 'master' of git://github.com/padovan/bluetooth-next
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Jouni Malinen (4):
cfg80211/nl80211: Add PMKSA caching candidate event
cfg80211: Fix validation of AKM suites
cfg80211: Remove strict validation of AKM suites
cfg80211: Validate cipher suite against supported ciphers
Larry Finger (5):
rtlwifi: rtl8192ce: Change modinfo messages
rtlwifi: rtl8192se: Change modinfo messages
rtlwifi: rtl8192de: Change modinfo messages
rtlwifi: Combine instances of RTL_HAL_IS_CCK_RATE macros.
rtlwifi: rtl8192cu: Fix unitialized struct
Luciano Coelho (5):
wl12xx: remove deprecated CONFIG_WL12XX_HT flag
wl12xx: add support for sched_scan filters
wl12xx: increase number of allowed SSIDs in sched_scan
wl12xx: ignore sched scan match sets without SSID
wl12xx: fix forced passive scans
Luiz Augusto von Dentz (2):
Bluetooth: make use of connection number to optimize the scheduler
Bluetooth: mark l2cap_create_iframe_pdu as static
Mohammed Shafi Shajakhan (3):
rfkill: properly assign a boolean type
ath9k: Fix a dma warning/memory leak
ath9k: add Block ACK bitmap in sample debug
Peter Hurley (1):
Bluetooth: Add LE link type for debugfs output
Rafał Miłecki (10):
bcma: cc: export more control functions
b43: LCN-PHY: tweaks for channel switching
b43: LCN-PHY: set TX filters
b43: LCN-PHY: implement SPUR avoidance mode
b43: LCN-PHY: init TX power control
b43: LCN-PHY: add more init tweaks
b43: LCN-PHY: finish sense setup
b43: add missing MMIO defines
b43: update dummy transmission
b43: LCN-PHY: minor clean ups
Rajkumar Manoharan (9):
ath9k_hw: Fix magnitude/phase coeff correction
ath9k: load noise floor from history after the full chip reset
ath9k: Reset caldata on radio enable
mac80211: Fix regression on queue stop during 2040 bss change
wireless: Do not allow disabled channel in scan request
ath9k: Store noise immunity values across scanning
ath9k_hw: Fix Rx DMA stuck for AR9003 chips
nl80211/cfg80211: Add support to disable CCK rate for management frame
mac80211: Send the management frame at requested rate
Randy Dunlap (1):
nfc: NFC_WILINK depends on NFC_NCI
Shahar Levi (2):
wl12xx: fix sdio_test module functionality
wl12xx: Include OFDM rates in IBSS mode
Stanislaw Gruszka (2):
iwlegacy: fix command queue timeout
iwlegacy: do not use interruptible waits
Thomas Pedersen (1):
mac80211: notify peer when shutting down peer link
Vinicius Costa Gomes (15):
Bluetooth: Reset the security timer when a command is queued
Bluetooth: Add a flag to indicate that SMP is going on
Bluetooth: Use the same timeouts for both ACL and LE links
Bluetooth: Add support for pairing via mgmt over LE
Bluetooth: Add support for running SMP without a socket
Bluetooth: Add link_type information to the mgmt Connected event
Bluetooth: Move SMP fields to a separate structure
Bluetooth: Move SMP crypto functions to a workqueue
Bluetooth: Require authentication if MITM protection is requested
Bluetooth: Use the MEDIUM security level for pairings
Bluetooth: Fix sending wrong authentication requirements
Bluetooth: Use the LTK after receiving a LE Security Request
Revert "Bluetooth: Add support for communicating keys with userspace"
Bluetooth: Fix not setting a pending security level
Bluetooth: Remove support for other SMP keys than the LTK
Wey-Yi Guy (8):
iwlagn: New SKU for 6005 SFF
iwlagn: merge eeprom access into single file
iwlagn: add support for v2 of temperature offset calibration
iwlagn: use iwl_eeprom_calib_hdr structure
iwlagn: fix stack corruption for temperature offset v2
iwlagn: signedness bug
MAINTAINERS: update iwlwifi
iwlagn: add debugging to show probe related info in scan notification
MAINTAINERS | 4 +-
drivers/bcma/driver_chipcommon_pmu.c | 38 +-
drivers/net/wireless/adm8211.c | 3 +-
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 6 +-
drivers/net/wireless/ath/ath9k/ani.c | 10 +-
drivers/net/wireless/ath/ath9k/ani.h | 1 +
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 32 +-
drivers/net/wireless/ath/ath9k/ar9002_calib.c | 1 +
.../net/wireless/ath/ath9k/ar9003_2p2_initvals.h | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 4 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 14 +-
drivers/net/wireless/ath/ath9k/debug.c | 24 +-
drivers/net/wireless/ath/ath9k/debug.h | 2 +
drivers/net/wireless/ath/ath9k/eeprom.c | 7 +-
drivers/net/wireless/ath/ath9k/eeprom_4k.c | 108 +-
drivers/net/wireless/ath/ath9k/eeprom_9287.c | 12 +-
drivers/net/wireless/ath/ath9k/eeprom_def.c | 46 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 9 +-
drivers/net/wireless/ath/ath9k/hw-ops.h | 5 -
drivers/net/wireless/ath/ath9k/hw.h | 1 -
drivers/net/wireless/ath/ath9k/init.c | 1 -
drivers/net/wireless/ath/ath9k/mac.c | 2 +-
drivers/net/wireless/ath/ath9k/mac.h | 4 -
drivers/net/wireless/ath/ath9k/main.c | 11 +-
drivers/net/wireless/ath/ath9k/recv.c | 10 +-
drivers/net/wireless/ath/ath9k/reg.h | 4 -
drivers/net/wireless/ath/ath9k/xmit.c | 60 +-
drivers/net/wireless/ath/carl9170/main.c | 3 +-
drivers/net/wireless/b43/b43.h | 40 +-
drivers/net/wireless/b43/main.c | 54 +-
drivers/net/wireless/b43/phy_lcn.c | 428 ++++-
drivers/net/wireless/b43/phy_lcn.h | 3 +
drivers/net/wireless/b43/tables_phy_lcn.c | 25 +-
drivers/net/wireless/iwlegacy/iwl-core.c | 7 +-
drivers/net/wireless/iwlegacy/iwl-core.h | 3 +-
drivers/net/wireless/iwlegacy/iwl-hcmd.c | 2 +-
drivers/net/wireless/iwlegacy/iwl-tx.c | 4 +-
drivers/net/wireless/iwlegacy/iwl3945-base.c | 8 +-
drivers/net/wireless/iwlegacy/iwl4965-base.c | 10 +-
drivers/net/wireless/iwlwifi/Makefile | 23 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 5 +-
drivers/net/wireless/iwlwifi/iwl-2000.c | 12 +-
drivers/net/wireless/iwlwifi/iwl-5000-hw.h | 4 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 7 +-
drivers/net/wireless/iwlwifi/iwl-6000.c | 7 +-
drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 21 +-
drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c | 299 ---
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 441 +-----
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 16 +-
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn-tt.c | 22 +-
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 39 +-
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 63 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 162 +--
drivers/net/wireless/iwlwifi/iwl-agn.h | 19 +-
drivers/net/wireless/iwlwifi/iwl-bus.h | 72 +-
.../net/wireless/iwlwifi/{iwl-pci.h => iwl-cfg.h} | 5 +-
drivers/net/wireless/iwlwifi/iwl-commands.h | 8 +
drivers/net/wireless/iwlwifi/iwl-core.c | 59 +-
drivers/net/wireless/iwlwifi/iwl-core.h | 13 +-
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 87 +-
drivers/net/wireless/iwlwifi/iwl-dev.h | 19 +-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 244 +++-
drivers/net/wireless/iwlwifi/iwl-eeprom.h | 10 +-
drivers/net/wireless/iwlwifi/iwl-led.c | 1 -
drivers/net/wireless/iwlwifi/iwl-pci.c | 33 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 97 +-
drivers/net/wireless/iwlwifi/iwl-scan.c | 696 ++++++-
drivers/net/wireless/iwlwifi/iwl-shared.h | 146 +-
drivers/net/wireless/iwlwifi/iwl-sta.c | 37 +-
drivers/net/wireless/iwlwifi/iwl-sta.h | 5 +-
.../{iwl-trans-int-pcie.h => iwl-trans-pcie-int.h} | 26 +-
.../{iwl-trans-rx-pcie.c => iwl-trans-pcie-rx.c} | 36 +-
.../{iwl-trans-tx-pcie.c => iwl-trans-pcie-tx.c} | 92 +-
drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 1989 ++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-trans.c | 1926 +-------------------
drivers/net/wireless/iwlwifi/iwl-trans.h | 44 +-
drivers/net/wireless/libertas/cfg.c | 33 +-
drivers/net/wireless/libertas/dev.h | 1 -
drivers/net/wireless/mwifiex/cfg80211.c | 7 +-
drivers/net/wireless/mwifiex/cmdevt.c | 3 +
drivers/net/wireless/mwifiex/main.h | 2 +-
drivers/net/wireless/mwifiex/scan.c | 29 +-
drivers/net/wireless/mwifiex/sta_ioctl.c | 16 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 5 +-
drivers/net/wireless/rt2x00/rt2500pci.c | 3 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-
drivers/net/wireless/rt2x00/rt2800lib.h | 2 +-
drivers/net/wireless/rt2x00/rt61pci.c | 2 +-
drivers/net/wireless/rt2x00/rt73usb.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180/dev.c | 5 +-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 2 +-
drivers/net/wireless/rtlwifi/core.c | 8 +-
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 12 +-
drivers/net/wireless/rtlwifi/rtl8192ce/trx.h | 6 -
drivers/net/wireless/rtlwifi/rtl8192cu/mac.h | 6 -
drivers/net/wireless/rtlwifi/rtl8192de/sw.c | 12 +-
drivers/net/wireless/rtlwifi/rtl8192de/trx.h | 6 -
drivers/net/wireless/rtlwifi/rtl8192se/def.h | 2 +-
drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 14 +-
drivers/net/wireless/rtlwifi/rtl8192se/trx.c | 2 +-
drivers/net/wireless/rtlwifi/usb.c | 1 +
drivers/net/wireless/rtlwifi/wifi.h | 6 +
drivers/net/wireless/wl12xx/Kconfig | 10 -
drivers/net/wireless/wl12xx/Makefile | 6 +-
drivers/net/wireless/wl12xx/acx.c | 40 +
drivers/net/wireless/wl12xx/acx.h | 18 +
drivers/net/wireless/wl12xx/cmd.c | 60 +-
drivers/net/wireless/wl12xx/cmd.h | 7 +
drivers/net/wireless/wl12xx/conf.h | 29 +-
drivers/net/wireless/wl12xx/debugfs.c | 88 +-
drivers/net/wireless/wl12xx/event.c | 39 +-
drivers/net/wireless/wl12xx/init.c | 22 +-
drivers/net/wireless/wl12xx/main.c | 300 +++-
drivers/net/wireless/wl12xx/ps.c | 8 +-
drivers/net/wireless/wl12xx/rx.c | 9 +-
drivers/net/wireless/wl12xx/scan.c | 166 ++-
drivers/net/wireless/wl12xx/sdio_test.c | 15 +-
drivers/net/wireless/wl12xx/tx.c | 60 +-
drivers/net/wireless/wl12xx/tx.h | 9 +-
drivers/net/wireless/wl12xx/wl12xx.h | 13 +-
drivers/net/wireless/wl3501_cs.c | 2 +-
drivers/net/wireless/zd1211rw/zd_mac.c | 2 +-
drivers/nfc/Kconfig | 11 +
drivers/nfc/Makefile | 1 +
drivers/nfc/nfcwilink.c | 342 ++++
drivers/nfc/pn533.c | 4 +-
drivers/staging/brcm80211/brcmsmac/mac80211_if.c | 12 +-
drivers/staging/winbond/wbusb.c | 2 +-
include/linux/bcma/bcma_driver_chipcommon.h | 9 +
include/linux/ieee80211.h | 10 +
include/linux/nfc.h | 6 +
include/linux/nl80211.h | 46 +
include/net/bluetooth/hci.h | 10 +
include/net/bluetooth/hci_core.h | 25 +-
include/net/bluetooth/l2cap.h | 8 +-
include/net/bluetooth/mgmt.h | 16 +
include/net/bluetooth/smp.h | 17 +
include/net/cfg80211.h | 36 +-
include/net/mac80211.h | 13 +-
include/net/nfc/nci.h | 313 +++
include/net/nfc/nci_core.h | 184 ++
include/net/{ => nfc}/nfc.h | 4 +
net/bluetooth/hci_conn.c | 2 +-
net/bluetooth/hci_core.c | 57 +-
net/bluetooth/hci_event.c | 16 +-
net/bluetooth/hci_sock.c | 18 +-
net/bluetooth/hci_sysfs.c | 2 +
net/bluetooth/hidp/core.c | 3 +
net/bluetooth/l2cap_core.c | 18 +-
net/bluetooth/mgmt.c | 212 ++-
net/bluetooth/smp.c | 421 +++--
net/mac80211/cfg.c | 12 +-
net/mac80211/debugfs.c | 52 -
net/mac80211/debugfs_netdev.c | 48 +-
net/mac80211/driver-ops.h | 27 +-
net/mac80211/driver-trace.h | 40 +-
net/mac80211/ibss.c | 6 +-
net/mac80211/ieee80211_i.h | 5 +-
net/mac80211/iface.c | 10 +-
net/mac80211/mesh_plink.c | 8 +
net/mac80211/mlme.c | 49 +-
net/mac80211/rate.c | 29 +-
net/mac80211/scan.c | 3 +-
net/mac80211/util.c | 23 +-
net/mac80211/work.c | 2 +-
net/nfc/Kconfig | 2 +
net/nfc/Makefile | 1 +
net/nfc/core.c | 77 +
net/nfc/nci/Kconfig | 10 +
net/nfc/nci/Makefile | 7 +
net/nfc/nci/core.c | 797 ++++++++
net/nfc/nci/data.c | 247 +++
net/nfc/nci/lib.c | 94 +
net/nfc/nci/ntf.c | 258 +++
net/nfc/nci/rsp.c | 226 +++
net/nfc/netlink.c | 56 +
net/nfc/nfc.h | 6 +-
net/rfkill/core.c | 2 +-
net/wireless/core.h | 4 +-
net/wireless/mlme.c | 16 +-
net/wireless/nl80211.c | 100 +-
net/wireless/nl80211.h | 4 +
net/wireless/scan.c | 27 +
net/wireless/sme.c | 19 +-
net/wireless/util.c | 16 +-
186 files changed, 8573 insertions(+), 4415 deletions(-)
delete mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
rename drivers/net/wireless/iwlwifi/{iwl-pci.h => iwl-cfg.h} (97%)
rename drivers/net/wireless/iwlwifi/{iwl-trans-int-pcie.h => iwl-trans-pcie-int.h} (94%)
rename drivers/net/wireless/iwlwifi/{iwl-trans-rx-pcie.c => iwl-trans-pcie-rx.c} (97%)
rename drivers/net/wireless/iwlwifi/{iwl-trans-tx-pcie.c => iwl-trans-pcie-tx.c} (94%)
create mode 100644 drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
create mode 100644 drivers/nfc/nfcwilink.c
create mode 100644 include/net/nfc/nci.h
create mode 100644 include/net/nfc/nci_core.h
rename include/net/{ => nfc}/nfc.h (97%)
create mode 100644 net/nfc/nci/Kconfig
create mode 100644 net/nfc/nci/Makefile
create mode 100644 net/nfc/nci/core.c
create mode 100644 net/nfc/nci/data.c
create mode 100644 net/nfc/nci/lib.c
create mode 100644 net/nfc/nci/ntf.c
create mode 100644 net/nfc/nci/rsp.c
Omnibus patch is (or should be) available here:
http://bombadil.infradead.org/users/linville/wireless-next-2011-09-30.patch.gz
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [net-next 00/11][pull request] Intel Wired LAN Driver Updates
From: Jeff Kirsher @ 2011-09-30 18:35 UTC (permalink / raw)
To: davem@davemloft.net; +Cc: netdev@vger.kernel.org, gospo@redhat.com
In-Reply-To: <1317360291-5576-1-git-send-email-jeffrey.t.kirsher@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2427 bytes --]
On Thu, 2011-09-29 at 22:24 -0700, Kirsher, Jeffrey T wrote:
> The following series contains updates to e1000e and ixgbe. The one
> patch for e1000e makes function tables const, thanks to Stephen
> Hemminger for reporting this. The remaining patches are for ixgbe,
> and the contain the following:
>
> - minor cleanups
> - add support for 82599 device and ethtool -E support
> - removal of a PHY which is not used in production silicon
>
> The following are changes since commit 56fd49e399ce1d82200fad5b8924d4e35a587809:
> bna: Driver Version changed to 3.0.2.2
> and are available in the git repository at
> git://github.com/Jkirsher/net-next.git
>
> Emil Tantilov (8):
> ixgbe: prevent link checks while resetting
> ixgbe: clear the data field in ixgbe_read_i2c_byte_generic
> ixgbe: remove return code for functions that always return 0
> ixgbe: add support for new 82599 device
> ixgbe: send MFLCN to ethtool
> ixgbe: do not disable flow control in ixgbe_check_mac_link
> ixgbe: remove instances of ixgbe_phy_aq for 82598 and 82599
> ixgbe: allow eeprom writes via ethtool
>
> Jacob Keller (1):
> ixgbe: fix driver version initialization in firmware
>
> Jeff Kirsher (1):
> e1000e: make function tables const
>
> Mika Lansirinne (1):
> ixgbe: get pauseparam autoneg
>
> drivers/net/ethernet/intel/e1000e/80003es2lan.c | 8 +-
> drivers/net/ethernet/intel/e1000e/82571.c | 20 +++---
> drivers/net/ethernet/intel/e1000e/e1000.h | 28 ++++----
> drivers/net/ethernet/intel/e1000e/ich8lan.c | 16 +++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 8 +--
> drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 7 +--
> drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 6 --
> drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 74 +++++++++++++++++++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 +++-
> drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 33 +++-------
> drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 +
> drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 1 +
> 12 files changed, 125 insertions(+), 89 deletions(-)
>
Currently there is only 1 small change that needs to be made to patch 11
of the series, based on Ben's comments.
I will wait a bit longer before fixing up patch 11, to ensure that there
are no other changes needed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply
* Re: [PATCH next 2/7] 8139cp : removal of headers.
From: David Miller @ 2011-09-30 18:13 UTC (permalink / raw)
To: romieu; +Cc: bhutchings, netdev
In-Reply-To: <20110930162649.GA32195@electric-eye.fr.zoreil.com>
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Fri, 30 Sep 2011 18:26:49 +0200
> I am sceptical about the value in including so much headers for
> rather common things at the network device driver level. After all
> the code is supposed to be cross-platform, modular or monolithic
> built.
We are trying very hard to split out the implicit inclusions of
one set of headers into another.
So you absolutely should always include the headers for all features
you explicitly use.
^ permalink raw reply
* Re: [PATCH] net: xen-netback: correctly restart Tx after a VM restore/migrate
From: Ian Campbell @ 2011-09-30 16:45 UTC (permalink / raw)
To: David Vrabel
Cc: netdev@vger.kernel.org, xen-devel@lists.xensource.com,
David S. Miller
In-Reply-To: <1317400671-21236-1-git-send-email-david.vrabel@citrix.com>
On Fri, 2011-09-30 at 17:37 +0100, David Vrabel wrote:
> If a VM is saved and restored (or migrated) the netback driver will no
> longer process any Tx packets from the frontend. xenvif_up() does not
> schedule the processing of any pending Tx requests from the front end
> because the carrier is off. Without this initial kick the frontend
> just adds Tx requests to the ring without raising an event (until the
> ring is full).
>
> This was caused by 47103041e91794acdbc6165da0ae288d844c820b (net:
> xen-netback: convert to hw_features) which reordered the calls to
> xenvif_up() and netif_carrier_on() in xenvif_connect().
Ah, so the bit of that patch which moved "netif_carrier_on(vif->dev);"
should have actually moved the entire block
netif_carrier_on(vif->dev);
if (netif_running(vif->dev))
xenvif_up(vif);
Since it it is logically a single thing. Make sense. Thanks!
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Ian.
> ---
> drivers/net/xen-netback/interface.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index 0ca86f9..1825629 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -327,12 +327,12 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,
> xenvif_get(vif);
>
> rtnl_lock();
> - if (netif_running(vif->dev))
> - xenvif_up(vif);
> if (!vif->can_sg && vif->dev->mtu > ETH_DATA_LEN)
> dev_set_mtu(vif->dev, ETH_DATA_LEN);
> netdev_update_features(vif->dev);
> netif_carrier_on(vif->dev);
> + if (netif_running(vif->dev))
> + xenvif_up(vif);
> rtnl_unlock();
>
> return 0;
^ permalink raw reply
* [PATCH] net: xen-netback: correctly restart Tx after a VM restore/migrate
From: David Vrabel @ 2011-09-30 16:37 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, xen-devel, David Vrabel, Ian Campbell
If a VM is saved and restored (or migrated) the netback driver will no
longer process any Tx packets from the frontend. xenvif_up() does not
schedule the processing of any pending Tx requests from the front end
because the carrier is off. Without this initial kick the frontend
just adds Tx requests to the ring without raising an event (until the
ring is full).
This was caused by 47103041e91794acdbc6165da0ae288d844c820b (net:
xen-netback: convert to hw_features) which reordered the calls to
xenvif_up() and netif_carrier_on() in xenvif_connect().
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
drivers/net/xen-netback/interface.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 0ca86f9..1825629 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -327,12 +327,12 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,
xenvif_get(vif);
rtnl_lock();
- if (netif_running(vif->dev))
- xenvif_up(vif);
if (!vif->can_sg && vif->dev->mtu > ETH_DATA_LEN)
dev_set_mtu(vif->dev, ETH_DATA_LEN);
netdev_update_features(vif->dev);
netif_carrier_on(vif->dev);
+ if (netif_running(vif->dev))
+ xenvif_up(vif);
rtnl_unlock();
return 0;
--
1.7.2.5
^ permalink raw reply related
* Re: [PATCH net-next] tcp: report ECN_SEEN in tcp_info
From: Stephen Hemminger @ 2011-09-30 16:29 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev
In-Reply-To: <1317357897.3274.11.camel@edumazet-laptop>
On Fri, 30 Sep 2011 06:44:57 +0200
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Stephen are you planning to provide an alternative git tree for
> iproute2 ? Thanks !
It is on github for now.
git clone git://github.com/shemminger/iproute2.git
^ permalink raw reply
* Re: [PATCH next 2/7] 8139cp : removal of headers.
From: Francois Romieu @ 2011-09-30 16:26 UTC (permalink / raw)
To: Ben Hutchings; +Cc: davem, netdev
In-Reply-To: <1317391428.4068.36.camel@deadeye>
Ben Hutchings <bhutchings@solarflare.com> :
[...]
> > diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
> > index c77d5af..60c8de5 100644
> > --- a/drivers/net/ethernet/realtek/8139cp.c
> > +++ b/drivers/net/ethernet/realtek/8139cp.c
> > @@ -55,8 +55,6 @@
> >
> > #include <linux/module.h>
> > #include <linux/moduleparam.h>
> > -#include <linux/kernel.h>
>
> Needed for container_of.
>
> > -#include <linux/compiler.h>
>
> Needed for __packed. But it's probably safe to assume that
> <linux/kernel.h> will include it.
<linux/module.h> would include it too.
Being modular opens the doors for a lot of features. :o|
[...]
> > @@ -65,7 +63,6 @@
> > #include <linux/dma-mapping.h>
> > #include <linux/delay.h>
> > #include <linux/ethtool.h>
> > -#include <linux/gfp.h>
>
> Needed for GFP_KERNEL.
I would have assumed that <linux/dma-mapping.h> provides it as it
publicizes gfp_t dependant data.
I am sceptical about the value in including so much headers for
rather common things at the network device driver level. After all
the code is supposed to be cross-platform, modular or monolithic
built.
I can understand that even a single class of devices requires some
variation but including kernel.h, init.h, module.h and moduleparam.h
all around in drivers/net seems a bit silly. Same thing for including
both netdevice.h and etherdevice.h.
It's probably not worth the hassle. I'll drop it.
--
Ueimor
^ permalink raw reply
* Re: [RFC patch net-next-2.6] net: introduce ethernet teaming device
From: Stephen Hemminger @ 2011-09-30 16:26 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, eric.dumazet, bhutchings, fubar, andy, tgraf,
ebiederm, mirqus, kaber, greearb
In-Reply-To: <1317386643-3041-1-git-send-email-jpirko@redhat.com>
On Fri, 30 Sep 2011 14:44:03 +0200
Jiri Pirko <jpirko@redhat.com> wrote:
> +static struct rtnl_link_stats64 *team_get_stats(struct net_device *dev,
> + struct rtnl_link_stats64 *stats)
> +{
> + struct team *team = netdev_priv(dev);
> + struct rtnl_link_stats64 temp;
> + struct team_port *port;
> +
> + memset(stats, 0, sizeof(*stats));
> +
> + rcu_read_lock();
> + list_for_each_entry_rcu(port, &team->port_list, list) {
> + const struct rtnl_link_stats64 *pstats;
You need to use u64_stats_sync macros to make this safe on 32 bit
mode.
Also, I am not sure about the handling of speed and duplex.
There are people who do active backup with links of different speeds.
The team device doesn't seem to handle hardware offload features
as completely as it should. The TSO and transmit checksumming should
be the union of the teamed ports.
^ permalink raw reply
* Re: [PATCH] Fix repeatable Oops on container destroy with conntrack
From: Alex Bligh @ 2011-09-30 15:54 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: Alexey Dobriyan, netfilter-devel, linux-kernel, containers,
Linux Containers, netdev, Alex Bligh
In-Reply-To: <20110928210851.GA2761@1984>
--On 28 September 2011 23:08:51 +0200 Pablo Neira Ayuso
<pablo@netfilter.org> wrote:
>> As you can probably tell, my interest here is to get something that
>> doesn't oops into stable kernels.
>
> As said, I'm not sure that this can happen, given that the amount of
> patches that we need to fix it fine, sorry.
This is why I was suggesting the 2 line "don't oops" patch in the
interim.
--
Alex Bligh
^ permalink raw reply
* Re: Network problem with bridge and virtualbox
From: William Thompson @ 2011-09-30 14:36 UTC (permalink / raw)
To: Nicolas de Peslo?an; +Cc: netdev
In-Reply-To: <4E84E9A7.4080008@gmail.com>
On Thu, Sep 29, 2011 at 11:56:55PM +0200, Nicolas de Peslo?an wrote:
> Le 29/09/2011 14:49, William Thompson a ?crit :
> >Please keep me in the CC as I am not subscribed.
> >
> >I'm using a 64-bit kernel 3.0.0 and virtualbox 4.1.2.
> >
> >My problem is that I cannot ping the host from a virtual machine.
> >
> >My bridge is configured as follows:
> ># brctl addbr br0
> ># brctl setfd br0 0
> ># brctl stp br0 off
> ># ifconfig br0 10.2.3.1 netmask 255.255.255.0
> >
> >In the virtual machine, it is set to use br0 as it's interface (bridge mode)
> >and it's IP is 10.2.3.10.
>
> Why do you use bridge with VirtualBox?
>
> VirtualBox provide several network modes, which remove the need for bridge on the host.
>
> One of Bridged Network mode (using eth0), Internal Networking mode
> or Host-only Networking mode may suit your need well, without having
> to use a bridge.
I originally set this up as a hostonly (and routed) network. The bridge has
no other interfaces added to it. I know virtualbox has hostonly builtin, but
I did not want to use it's limited DHCP server and this was the only solution
I came up with at the time. Due to the way the vboxnet interfaces are
dynamically created, I didn't have a way at the time to start programs on
that interface when it came up.
^ permalink raw reply
* Re: [PATCH next 2/7] 8139cp : removal of headers.
From: Ben Hutchings @ 2011-09-30 14:03 UTC (permalink / raw)
To: Francois Romieu; +Cc: davem, netdev
In-Reply-To: <20110930103719.GC26727@electric-eye.fr.zoreil.com>
On Fri, 2011-09-30 at 12:37 +0200, Francois Romieu wrote:
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> ---
> drivers/net/ethernet/realtek/8139cp.c | 5 -----
> 1 files changed, 0 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
> index c77d5af..60c8de5 100644
> --- a/drivers/net/ethernet/realtek/8139cp.c
> +++ b/drivers/net/ethernet/realtek/8139cp.c
> @@ -55,8 +55,6 @@
>
> #include <linux/module.h>
> #include <linux/moduleparam.h>
> -#include <linux/kernel.h>
Needed for container_of.
> -#include <linux/compiler.h>
Needed for __packed. But it's probably safe to assume that
<linux/kernel.h> will include it.
> #include <linux/netdevice.h>
> #include <linux/etherdevice.h>
> #include <linux/init.h>
> @@ -65,7 +63,6 @@
> #include <linux/dma-mapping.h>
> #include <linux/delay.h>
> #include <linux/ethtool.h>
> -#include <linux/gfp.h>
Needed for GFP_KERNEL.
> #include <linux/mii.h>
> #include <linux/if_vlan.h>
> #include <linux/crc32.h>
> @@ -73,10 +70,8 @@
> #include <linux/ip.h>
> #include <linux/tcp.h>
> #include <linux/udp.h>
> -#include <linux/cache.h>
Needed for ____cacheline_aligned.
> #include <asm/io.h>
> #include <asm/irq.h>
> -#include <asm/uaccess.h>
>
> /* These identify the driver base version and may not be removed. */
> static char version[] =
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox