* Re: [PATCH 4/5] mac80211: Add more ethtools stats: survey, rates, etc
From: Jan Ceuleers @ 2012-04-12 17:56 UTC (permalink / raw)
To: Ben Greear; +Cc: Florian Fainelli, linux-wireless, netdev
In-Reply-To: <4F870828.4020708@candelatech.com>
Ben Greear wrote:
> Ethtool stats only supports u64. I think it's easy enough for
> humans or programs to add the negative sign. Can signal or noise
> ever be > 0? If so, that could actually break something that depends
> on flipping the value to negative....
The unit of these quantities is dBm, right? So if the {signal|noise} is
greater than 1mW the corresponding value in dBm would be positive.
^ permalink raw reply
* [PATCH net 0/3] CAIF Bug-fixes.
From: Sjur Brændeland @ 2012-04-12 18:18 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren
Some simple bug fixes: plugging memory leaks and fixing the
log-level from err to dbg. I suppose these should go into v3.4.
Regards,
Sjur
--
Kim Lilliestierna (1):
caif_hsi: use dev_dbg not dev_err for reporting
Sjur Brændeland (1):
caif-hsi: Free flip_buffer at shutdown
Tomasz Gregorek (1):
caif: Fix memory leakage in the chnl_net.c.
drivers/net/caif/caif_hsi.c | 9 +++++----
net/caif/chnl_net.c | 9 ++++++---
2 files changed, 11 insertions(+), 7 deletions(-)
--
1.7.5.4
^ permalink raw reply
* [PATCH net 2/3] caif-hsi: Free flip_buffer at shutdown
From: Sjur Brændeland @ 2012-04-12 18:18 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren
In-Reply-To: <1334254689-2843-1-git-send-email-sjur.brandeland@stericsson.com>
Fix memory leak of RX flip-buffer.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
drivers/net/caif/caif_hsi.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 9a66e2a..d0d9a6f 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -1210,7 +1210,7 @@ int cfhsi_probe(struct platform_device *pdev)
static void cfhsi_shutdown(struct cfhsi *cfhsi)
{
- u8 *tx_buf, *rx_buf;
+ u8 *tx_buf, *rx_buf, *flip_buf;
/* Stop TXing */
netif_tx_stop_all_queues(cfhsi->ndev);
@@ -1234,7 +1234,7 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi)
/* Store bufferes: will be freed later. */
tx_buf = cfhsi->tx_buf;
rx_buf = cfhsi->rx_buf;
-
+ flip_buf = cfhsi->rx_flip_buf;
/* Flush transmit queues. */
cfhsi_abort_tx(cfhsi);
@@ -1247,6 +1247,7 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi)
/* Free buffers. */
kfree(tx_buf);
kfree(rx_buf);
+ kfree(flip_buf);
}
int cfhsi_remove(struct platform_device *pdev)
--
1.7.5.4
^ permalink raw reply related
* [PATCH net 1/3] caif: Fix memory leakage in the chnl_net.c.
From: Sjur Brændeland @ 2012-04-12 18:18 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren
In-Reply-To: <1334254689-2843-1-git-send-email-sjur.brandeland@stericsson.com>
From: Tomasz Gregorek <tomasz.gregorek@stericsson.com>
Added kfree_skb() calls in the chnk_net.c file on
the error paths.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
net/caif/chnl_net.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index 93e9c6d..69771c0 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -103,6 +103,7 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
skb->protocol = htons(ETH_P_IPV6);
break;
default:
+ kfree_skb(skb);
priv->netdev->stats.rx_errors++;
return -EINVAL;
}
@@ -220,14 +221,16 @@ static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb->len > priv->netdev->mtu) {
pr_warn("Size of skb exceeded MTU\n");
+ kfree_skb(skb);
dev->stats.tx_errors++;
- return -ENOSPC;
+ return NETDEV_TX_OK;
}
if (!priv->flowenabled) {
pr_debug("dropping packets flow off\n");
+ kfree_skb(skb);
dev->stats.tx_dropped++;
- return NETDEV_TX_BUSY;
+ return NETDEV_TX_OK;
}
if (priv->conn_req.protocol == CAIFPROTO_DATAGRAM_LOOP)
@@ -242,7 +245,7 @@ static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
result = priv->chnl.dn->transmit(priv->chnl.dn, pkt);
if (result) {
dev->stats.tx_dropped++;
- return result;
+ return NETDEV_TX_OK;
}
/* Update statistics. */
--
1.7.5.4
^ permalink raw reply related
* [PATCH net 3/3] caif_hsi: use dev_dbg not dev_err for reporting
From: Sjur Brændeland @ 2012-04-12 18:18 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren
In-Reply-To: <1334254689-2843-1-git-send-email-sjur.brandeland@stericsson.com>
From: Kim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com>
Use dev_dbg instead of dev_err for reporting in cfhsi_wakeup_cb.
Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
---
drivers/net/caif/caif_hsi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index d0d9a6f..9c1c8cd 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -744,14 +744,14 @@ static void cfhsi_wake_up(struct work_struct *work)
size_t fifo_occupancy = 0;
/* Wakeup timeout */
- dev_err(&cfhsi->ndev->dev, "%s: Timeout.\n",
+ dev_dbg(&cfhsi->ndev->dev, "%s: Timeout.\n",
__func__);
/* Check FIFO to check if modem has sent something. */
WARN_ON(cfhsi->dev->cfhsi_fifo_occupancy(cfhsi->dev,
&fifo_occupancy));
- dev_err(&cfhsi->ndev->dev, "%s: Bytes in FIFO: %u.\n",
+ dev_dbg(&cfhsi->ndev->dev, "%s: Bytes in FIFO: %u.\n",
__func__, (unsigned) fifo_occupancy);
/* Check if we misssed the interrupt. */
--
1.7.5.4
^ permalink raw reply related
* [PATCH net-next 0/4] New CAIF features
From: Sjur Brændeland @ 2012-04-12 18:27 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren, Sjur Brændeland
Add feature to aggregate CAIF HSI frames into one large HSI-transfer.
The triggers for starting a HSI transfer are:
Max transfer size reached, timeout or reception of low-latency traffic.
As long as none of these triggers are met, CAIF-frames will be aggregated.
In order to be able to support aggregation and detect low-latency traffic,
CAIF packets are assigned a TC class.
In addition we are now allowing other kernel modules to use the HSI interface
while the CAIF interface is closed. The CAIF-HSI interface is changed so that
reference to the HSI interface is held only when CAIF-HSI is in state UP.
Initialization/de-initialization of the HSI HW is performed when the interface
is opened/closed instead of at module load time.
NOTE: This patch-set depends on the patch "caif-hsi: Free flip_buffer at shutdown",
sent in the Bug-fix patch-set.
Regards,
Sjur
--
Dmitry Tarnyagin (2):
caif: set traffic class for caif packets
caif-hsi: robust frame aggregation for HSI
Sjur Brændeland (2):
caif-hsi: Remove stop/start of queue.
caif-hsi: Postpone init of HSI until open()
drivers/net/caif/caif_hsi.c | 350 ++++++++++++++++++++++++++++--------------
include/net/caif/caif_hsi.h | 19 ++-
include/net/caif/cfpkt.h | 9 +-
net/caif/caif_socket.c | 16 ++-
net/caif/cfctrl.c | 4 +
net/caif/cfpkt_skbuff.c | 7 +
net/caif/cfsrvl.c | 3 +
7 files changed, 286 insertions(+), 122 deletions(-)
--
1.7.5.4
^ permalink raw reply
* [PATCH net-next 1/4] caif: set traffic class for caif packets
From: Sjur Brændeland @ 2012-04-12 18:27 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren, Dmitry Tarnyagin
In-Reply-To: <1334255247-3372-1-git-send-email-sjur.brandeland@stericsson.com>
From: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Set traffic class for CAIF packets, based on socket
priority, CAIF protocol type, or type of message.
Traffic class mapping for different packet types:
- control: TC_PRIO_CONTROL;
- flow control: TC_PRIO_CONTROL;
- at: TC_PRIO_CONTROL;
- rfm: TC_PRIO_INTERACTIVE_BULK;
- other sockets: equals to socket's TC;
- network data: no change.
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
---
include/net/caif/cfpkt.h | 9 ++++++++-
net/caif/caif_socket.c | 16 ++++++++++++++--
net/caif/cfctrl.c | 4 ++++
net/caif/cfpkt_skbuff.c | 7 +++++++
net/caif/cfsrvl.c | 3 +++
5 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/include/net/caif/cfpkt.h b/include/net/caif/cfpkt.h
index 6bd200a..83a89ba 100644
--- a/include/net/caif/cfpkt.h
+++ b/include/net/caif/cfpkt.h
@@ -188,11 +188,18 @@ struct cfpkt *cfpkt_fromnative(enum caif_direction dir, void *nativepkt);
*/
void *cfpkt_tonative(struct cfpkt *pkt);
-
/*
* Returns packet information for a packet.
* pkt Packet to get info from;
* @return Packet information
*/
struct caif_payload_info *cfpkt_info(struct cfpkt *pkt);
+
+/** cfpkt_set_prio - set priority for a CAIF packet.
+ *
+ * @pkt: The CAIF packet to be adjusted.
+ * @prio: one of TC_PRIO_ constants.
+ */
+void cfpkt_set_prio(struct cfpkt *pkt, int prio);
+
#endif /* CFPKT_H_ */
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index 5016fa5..ce47ee9 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -19,7 +19,7 @@
#include <linux/uaccess.h>
#include <linux/debugfs.h>
#include <linux/caif/caif_socket.h>
-#include <linux/atomic.h>
+#include <linux/pkt_sched.h>
#include <net/sock.h>
#include <net/tcp_states.h>
#include <net/caif/caif_layer.h>
@@ -505,6 +505,7 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk,
pkt = cfpkt_fromnative(CAIF_DIR_OUT, skb);
memset(skb->cb, 0, sizeof(struct caif_payload_info));
+ cfpkt_set_prio(pkt, cf_sk->sk.sk_priority);
if (cf_sk->layer.dn == NULL) {
kfree_skb(skb);
@@ -1062,6 +1063,18 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
/* Store the protocol */
sk->sk_protocol = (unsigned char) protocol;
+ /* Initialize default priority for well-known cases */
+ switch (protocol) {
+ case CAIFPROTO_AT:
+ sk->sk_priority = TC_PRIO_CONTROL;
+ break;
+ case CAIFPROTO_RFM:
+ sk->sk_priority = TC_PRIO_INTERACTIVE_BULK;
+ break;
+ default:
+ sk->sk_priority = TC_PRIO_BESTEFFORT;
+ }
+
/*
* Lock in order to try to stop someone from opening the socket
* too early.
@@ -1081,7 +1094,6 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
set_rx_flow_on(cf_sk);
/* Set default options on configuration */
- cf_sk->sk.sk_priority = CAIF_PRIO_NORMAL;
cf_sk->conn_req.link_selector = CAIF_LINK_LOW_LATENCY;
cf_sk->conn_req.protocol = protocol;
release_sock(&cf_sk->sk);
diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
index 5cf5222..047cd0e 100644
--- a/net/caif/cfctrl.c
+++ b/net/caif/cfctrl.c
@@ -9,6 +9,7 @@
#include <linux/stddef.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
+#include <linux/pkt_sched.h>
#include <net/caif/caif_layer.h>
#include <net/caif/cfpkt.h>
#include <net/caif/cfctrl.h>
@@ -189,6 +190,7 @@ void cfctrl_enum_req(struct cflayer *layer, u8 physlinkid)
cfctrl->serv.dev_info.id = physlinkid;
cfpkt_addbdy(pkt, CFCTRL_CMD_ENUM);
cfpkt_addbdy(pkt, physlinkid);
+ cfpkt_set_prio(pkt, TC_PRIO_CONTROL);
dn->transmit(dn, pkt);
}
@@ -281,6 +283,7 @@ int cfctrl_linkup_request(struct cflayer *layer,
* might arrive with the newly allocated channel ID.
*/
cfpkt_info(pkt)->dev_info->id = param->phyid;
+ cfpkt_set_prio(pkt, TC_PRIO_CONTROL);
ret =
dn->transmit(dn, pkt);
if (ret < 0) {
@@ -314,6 +317,7 @@ int cfctrl_linkdown_req(struct cflayer *layer, u8 channelid,
cfpkt_addbdy(pkt, CFCTRL_CMD_LINK_DESTROY);
cfpkt_addbdy(pkt, channelid);
init_info(cfpkt_info(pkt), cfctrl);
+ cfpkt_set_prio(pkt, TC_PRIO_CONTROL);
ret =
dn->transmit(dn, pkt);
#ifndef CAIF_NO_LOOP
diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c
index e335ba8..863dedd 100644
--- a/net/caif/cfpkt_skbuff.c
+++ b/net/caif/cfpkt_skbuff.c
@@ -381,6 +381,7 @@ struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos)
memcpy(skb2->data, split, len2nd);
skb2->tail += len2nd;
skb2->len += len2nd;
+ skb2->priority = skb->priority;
return skb_to_pkt(skb2);
}
@@ -394,3 +395,9 @@ struct caif_payload_info *cfpkt_info(struct cfpkt *pkt)
return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb;
}
EXPORT_SYMBOL(cfpkt_info);
+
+void cfpkt_set_prio(struct cfpkt *pkt, int prio)
+{
+ pkt_to_skb(pkt)->priority = prio;
+}
+EXPORT_SYMBOL(cfpkt_set_prio);
diff --git a/net/caif/cfsrvl.c b/net/caif/cfsrvl.c
index 4aa33d4..dd485f6 100644
--- a/net/caif/cfsrvl.c
+++ b/net/caif/cfsrvl.c
@@ -11,6 +11,7 @@
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
+#include <linux/pkt_sched.h>
#include <net/caif/caif_layer.h>
#include <net/caif/cfsrvl.h>
#include <net/caif/cfpkt.h>
@@ -120,6 +121,7 @@ static int cfservl_modemcmd(struct cflayer *layr, enum caif_modemcmd ctrl)
info->channel_id = service->layer.id;
info->hdr_len = 1;
info->dev_info = &service->dev_info;
+ cfpkt_set_prio(pkt, TC_PRIO_CONTROL);
return layr->dn->transmit(layr->dn, pkt);
}
case CAIF_MODEMCMD_FLOW_OFF_REQ:
@@ -140,6 +142,7 @@ static int cfservl_modemcmd(struct cflayer *layr, enum caif_modemcmd ctrl)
info->channel_id = service->layer.id;
info->hdr_len = 1;
info->dev_info = &service->dev_info;
+ cfpkt_set_prio(pkt, TC_PRIO_CONTROL);
return layr->dn->transmit(layr->dn, pkt);
}
default:
--
1.7.5.4
^ permalink raw reply related
* [PATCH net-next 2/4] caif-hsi: robust frame aggregation for HSI
From: Sjur Brændeland @ 2012-04-12 18:27 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren, Dmitry Tarnyagin
In-Reply-To: <1334255247-3372-1-git-send-email-sjur.brandeland@stericsson.com>
From: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Implement aggregation algorithm, combining more data into a single
HSI transfer. 4 different traffic categories are supported:
1. TC_PRIO_CONTROL .. TC_PRIO_MAX (CTL)
2. TC_PRIO_INTERACTIVE (VO)
3. TC_PRIO_INTERACTIVE_BULK (VI)
4. TC_PRIO_BESTEFFORT, TC_PRIO_BULK, TC_PRIO_FILLER (BEBK)
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
---
drivers/net/caif/caif_hsi.c | 243 +++++++++++++++++++++++++++++++++----------
include/net/caif/caif_hsi.h | 19 +++-
2 files changed, 205 insertions(+), 57 deletions(-)
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 9c1c8cd..9849a23 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -19,6 +19,7 @@
#include <linux/if_arp.h>
#include <linux/timer.h>
#include <linux/rtnetlink.h>
+#include <linux/pkt_sched.h>
#include <net/caif/caif_layer.h>
#include <net/caif/caif_hsi.h>
@@ -34,6 +35,10 @@ static int inactivity_timeout = 1000;
module_param(inactivity_timeout, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(inactivity_timeout, "Inactivity timeout on HSI, ms.");
+static int aggregation_timeout = 1;
+module_param(aggregation_timeout, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(aggregation_timeout, "Aggregation timeout on HSI, ms.");
+
/*
* HSI padding options.
* Warning: must be a base of 2 (& operation used) and can not be zero !
@@ -86,24 +91,84 @@ static void cfhsi_inactivity_tout(unsigned long arg)
queue_work(cfhsi->wq, &cfhsi->wake_down_work);
}
+static void cfhsi_update_aggregation_stats(struct cfhsi *cfhsi,
+ const struct sk_buff *skb,
+ int direction)
+{
+ struct caif_payload_info *info;
+ int hpad, tpad, len;
+
+ info = (struct caif_payload_info *)&skb->cb;
+ hpad = 1 + PAD_POW2((info->hdr_len + 1), hsi_head_align);
+ tpad = PAD_POW2((skb->len + hpad), hsi_tail_align);
+ len = skb->len + hpad + tpad;
+
+ if (direction > 0)
+ cfhsi->aggregation_len += len;
+ else if (direction < 0)
+ cfhsi->aggregation_len -= len;
+}
+
+static bool cfhsi_can_send_aggregate(struct cfhsi *cfhsi)
+{
+ int i;
+
+ if (cfhsi->aggregation_timeout < 0)
+ return true;
+
+ for (i = 0; i < CFHSI_PRIO_BEBK; ++i) {
+ if (cfhsi->qhead[i].qlen)
+ return true;
+ }
+
+ /* TODO: Use aggregation_len instead */
+ if (cfhsi->qhead[CFHSI_PRIO_BEBK].qlen >= CFHSI_MAX_PKTS)
+ return true;
+
+ return false;
+}
+
+static struct sk_buff *cfhsi_dequeue(struct cfhsi *cfhsi)
+{
+ struct sk_buff *skb;
+ int i;
+
+ for (i = 0; i < CFHSI_PRIO_LAST; ++i) {
+ skb = skb_dequeue(&cfhsi->qhead[i]);
+ if (skb)
+ break;
+ }
+
+ return skb;
+}
+
+static int cfhsi_tx_queue_len(struct cfhsi *cfhsi)
+{
+ int i, len = 0;
+ for (i = 0; i < CFHSI_PRIO_LAST; ++i)
+ len += skb_queue_len(&cfhsi->qhead[i]);
+ return len;
+}
+
static void cfhsi_abort_tx(struct cfhsi *cfhsi)
{
struct sk_buff *skb;
for (;;) {
spin_lock_bh(&cfhsi->lock);
- skb = skb_dequeue(&cfhsi->qhead);
+ skb = cfhsi_dequeue(cfhsi);
if (!skb)
break;
cfhsi->ndev->stats.tx_errors++;
cfhsi->ndev->stats.tx_dropped++;
+ cfhsi_update_aggregation_stats(cfhsi, skb, -1);
spin_unlock_bh(&cfhsi->lock);
kfree_skb(skb);
}
cfhsi->tx_state = CFHSI_TX_STATE_IDLE;
if (!test_bit(CFHSI_SHUTDOWN, &cfhsi->bits))
- mod_timer(&cfhsi->timer,
+ mod_timer(&cfhsi->inactivity_timer,
jiffies + cfhsi->inactivity_timeout);
spin_unlock_bh(&cfhsi->lock);
}
@@ -169,7 +234,7 @@ static int cfhsi_tx_frm(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
struct sk_buff *skb;
u8 *pfrm = desc->emb_frm + CFHSI_MAX_EMB_FRM_SZ;
- skb = skb_dequeue(&cfhsi->qhead);
+ skb = cfhsi_dequeue(cfhsi);
if (!skb)
return 0;
@@ -196,11 +261,16 @@ static int cfhsi_tx_frm(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
pemb += hpad;
/* Update network statistics. */
+ spin_lock_bh(&cfhsi->lock);
cfhsi->ndev->stats.tx_packets++;
cfhsi->ndev->stats.tx_bytes += skb->len;
+ cfhsi_update_aggregation_stats(cfhsi, skb, -1);
+ spin_unlock_bh(&cfhsi->lock);
/* Copy in embedded CAIF frame. */
skb_copy_bits(skb, 0, pemb, skb->len);
+
+ /* Consume the SKB */
consume_skb(skb);
skb = NULL;
}
@@ -214,7 +284,7 @@ static int cfhsi_tx_frm(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
int tpad = 0;
if (!skb)
- skb = skb_dequeue(&cfhsi->qhead);
+ skb = cfhsi_dequeue(cfhsi);
if (!skb)
break;
@@ -233,8 +303,11 @@ static int cfhsi_tx_frm(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
pfrm += hpad;
/* Update network statistics. */
+ spin_lock_bh(&cfhsi->lock);
cfhsi->ndev->stats.tx_packets++;
cfhsi->ndev->stats.tx_bytes += skb->len;
+ cfhsi_update_aggregation_stats(cfhsi, skb, -1);
+ spin_unlock_bh(&cfhsi->lock);
/* Copy in CAIF frame. */
skb_copy_bits(skb, 0, pfrm, skb->len);
@@ -244,6 +317,8 @@ static int cfhsi_tx_frm(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
/* Update frame pointer. */
pfrm += skb->len + tpad;
+
+ /* Consume the SKB */
consume_skb(skb);
skb = NULL;
@@ -258,8 +333,7 @@ static int cfhsi_tx_frm(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
}
/* Check if we can piggy-back another descriptor. */
- skb = skb_peek(&cfhsi->qhead);
- if (skb)
+ if (cfhsi_can_send_aggregate(cfhsi))
desc->header |= CFHSI_PIGGY_DESC;
else
desc->header &= ~CFHSI_PIGGY_DESC;
@@ -267,61 +341,71 @@ static int cfhsi_tx_frm(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
return CFHSI_DESC_SZ + pld_len;
}
-static void cfhsi_tx_done(struct cfhsi *cfhsi)
+static void cfhsi_start_tx(struct cfhsi *cfhsi)
{
- struct cfhsi_desc *desc = NULL;
- int len = 0;
- int res;
+ struct cfhsi_desc *desc = (struct cfhsi_desc *)cfhsi->tx_buf;
+ int len, res;
dev_dbg(&cfhsi->ndev->dev, "%s.\n", __func__);
if (test_bit(CFHSI_SHUTDOWN, &cfhsi->bits))
return;
- desc = (struct cfhsi_desc *)cfhsi->tx_buf;
-
do {
- /*
- * Send flow on if flow off has been previously signalled
- * and number of packets is below low water mark.
- */
- spin_lock_bh(&cfhsi->lock);
- if (cfhsi->flow_off_sent &&
- cfhsi->qhead.qlen <= cfhsi->q_low_mark &&
- cfhsi->cfdev.flowctrl) {
-
- cfhsi->flow_off_sent = 0;
- cfhsi->cfdev.flowctrl(cfhsi->ndev, ON);
- }
- spin_unlock_bh(&cfhsi->lock);
-
/* Create HSI frame. */
- do {
- len = cfhsi_tx_frm(desc, cfhsi);
- if (!len) {
- spin_lock_bh(&cfhsi->lock);
- if (unlikely(skb_peek(&cfhsi->qhead))) {
- spin_unlock_bh(&cfhsi->lock);
- continue;
- }
- cfhsi->tx_state = CFHSI_TX_STATE_IDLE;
- /* Start inactivity timer. */
- mod_timer(&cfhsi->timer,
- jiffies + cfhsi->inactivity_timeout);
+ len = cfhsi_tx_frm(desc, cfhsi);
+ if (!len) {
+ spin_lock_bh(&cfhsi->lock);
+ if (unlikely(cfhsi_tx_queue_len(cfhsi))) {
spin_unlock_bh(&cfhsi->lock);
- goto done;
+ res = -EAGAIN;
+ continue;
}
- } while (!len);
+ cfhsi->tx_state = CFHSI_TX_STATE_IDLE;
+ /* Start inactivity timer. */
+ mod_timer(&cfhsi->inactivity_timer,
+ jiffies + cfhsi->inactivity_timeout);
+ spin_unlock_bh(&cfhsi->lock);
+ break;
+ }
/* Set up new transfer. */
res = cfhsi->dev->cfhsi_tx(cfhsi->tx_buf, len, cfhsi->dev);
- if (WARN_ON(res < 0)) {
+ if (WARN_ON(res < 0))
dev_err(&cfhsi->ndev->dev, "%s: TX error %d.\n",
__func__, res);
- }
} while (res < 0);
+}
+
+static void cfhsi_tx_done(struct cfhsi *cfhsi)
+{
+ dev_dbg(&cfhsi->ndev->dev, "%s.\n", __func__);
+
+ if (test_bit(CFHSI_SHUTDOWN, &cfhsi->bits))
+ return;
+
+ /*
+ * Send flow on if flow off has been previously signalled
+ * and number of packets is below low water mark.
+ */
+ spin_lock_bh(&cfhsi->lock);
+ if (cfhsi->flow_off_sent &&
+ cfhsi_tx_queue_len(cfhsi) <= cfhsi->q_low_mark &&
+ cfhsi->cfdev.flowctrl) {
+
+ cfhsi->flow_off_sent = 0;
+ cfhsi->cfdev.flowctrl(cfhsi->ndev, ON);
+ }
+
+ if (cfhsi_can_send_aggregate(cfhsi)) {
+ spin_unlock_bh(&cfhsi->lock);
+ cfhsi_start_tx(cfhsi);
+ } else {
+ mod_timer(&cfhsi->aggregation_timer,
+ jiffies + cfhsi->aggregation_timeout);
+ spin_unlock_bh(&cfhsi->lock);
+ }
-done:
return;
}
@@ -560,7 +644,7 @@ static void cfhsi_rx_done(struct cfhsi *cfhsi)
/* Update inactivity timer if pending. */
spin_lock_bh(&cfhsi->lock);
- mod_timer_pending(&cfhsi->timer,
+ mod_timer_pending(&cfhsi->inactivity_timer,
jiffies + cfhsi->inactivity_timeout);
spin_unlock_bh(&cfhsi->lock);
@@ -793,12 +877,12 @@ wake_ack:
spin_lock_bh(&cfhsi->lock);
- /* Resume transmit if queue is not empty. */
- if (!skb_peek(&cfhsi->qhead)) {
+ /* Resume transmit if queues are not empty. */
+ if (!cfhsi_tx_queue_len(cfhsi)) {
dev_dbg(&cfhsi->ndev->dev, "%s: Peer wake, start timer.\n",
__func__);
/* Start inactivity timer. */
- mod_timer(&cfhsi->timer,
+ mod_timer(&cfhsi->inactivity_timer,
jiffies + cfhsi->inactivity_timeout);
spin_unlock_bh(&cfhsi->lock);
return;
@@ -934,20 +1018,53 @@ static void cfhsi_wake_down_cb(struct cfhsi_drv *drv)
wake_up_interruptible(&cfhsi->wake_down_wait);
}
+static void cfhsi_aggregation_tout(unsigned long arg)
+{
+ struct cfhsi *cfhsi = (struct cfhsi *)arg;
+
+ dev_dbg(&cfhsi->ndev->dev, "%s.\n",
+ __func__);
+
+ cfhsi_start_tx(cfhsi);
+}
+
static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct cfhsi *cfhsi = NULL;
int start_xfer = 0;
int timer_active;
+ int prio;
if (!dev)
return -EINVAL;
cfhsi = netdev_priv(dev);
+ switch (skb->priority) {
+ case TC_PRIO_BESTEFFORT:
+ case TC_PRIO_FILLER:
+ case TC_PRIO_BULK:
+ prio = CFHSI_PRIO_BEBK;
+ break;
+ case TC_PRIO_INTERACTIVE_BULK:
+ prio = CFHSI_PRIO_VI;
+ break;
+ case TC_PRIO_INTERACTIVE:
+ prio = CFHSI_PRIO_VO;
+ break;
+ case TC_PRIO_CONTROL:
+ default:
+ prio = CFHSI_PRIO_CTL;
+ break;
+ }
+
spin_lock_bh(&cfhsi->lock);
- skb_queue_tail(&cfhsi->qhead, skb);
+ /* Update aggregation statistics */
+ cfhsi_update_aggregation_stats(cfhsi, skb, 1);
+
+ /* Queue the SKB */
+ skb_queue_tail(&cfhsi->qhead[prio], skb);
/* Sanity check; xmit should not be called after unregister_netdev */
if (WARN_ON(test_bit(CFHSI_SHUTDOWN, &cfhsi->bits))) {
@@ -958,7 +1075,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
/* Send flow off if number of packets is above high water mark. */
if (!cfhsi->flow_off_sent &&
- cfhsi->qhead.qlen > cfhsi->q_high_mark &&
+ cfhsi_tx_queue_len(cfhsi) > cfhsi->q_high_mark &&
cfhsi->cfdev.flowctrl) {
cfhsi->flow_off_sent = 1;
cfhsi->cfdev.flowctrl(cfhsi->ndev, OFF);
@@ -970,12 +1087,18 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
}
if (!start_xfer) {
+ /* Send aggregate if it is possible */
+ bool aggregate_ready =
+ cfhsi_can_send_aggregate(cfhsi) &&
+ del_timer(&cfhsi->aggregation_timer) > 0;
spin_unlock_bh(&cfhsi->lock);
+ if (aggregate_ready)
+ cfhsi_start_tx(cfhsi);
return 0;
}
/* Delete inactivity timer if started. */
- timer_active = del_timer_sync(&cfhsi->timer);
+ timer_active = del_timer_sync(&cfhsi->inactivity_timer);
spin_unlock_bh(&cfhsi->lock);
@@ -1026,6 +1149,7 @@ static const struct net_device_ops cfhsi_ops = {
static void cfhsi_setup(struct net_device *dev)
{
+ int i;
struct cfhsi *cfhsi = netdev_priv(dev);
dev->features = 0;
dev->netdev_ops = &cfhsi_ops;
@@ -1034,7 +1158,8 @@ static void cfhsi_setup(struct net_device *dev)
dev->mtu = CFHSI_MAX_CAIF_FRAME_SZ;
dev->tx_queue_len = 0;
dev->destructor = free_netdev;
- skb_queue_head_init(&cfhsi->qhead);
+ for (i = 0; i < CFHSI_PRIO_LAST; ++i)
+ skb_queue_head_init(&cfhsi->qhead[i]);
cfhsi->cfdev.link_select = CAIF_LINK_HIGH_BANDW;
cfhsi->cfdev.use_frag = false;
cfhsi->cfdev.use_stx = false;
@@ -1111,6 +1236,9 @@ int cfhsi_probe(struct platform_device *pdev)
cfhsi->inactivity_timeout = NEXT_TIMER_MAX_DELTA;
}
+ /* Initialize aggregation timeout */
+ cfhsi->aggregation_timeout = aggregation_timeout;
+
/* Initialize recieve vaiables. */
cfhsi->rx_ptr = cfhsi->rx_buf;
cfhsi->rx_len = CFHSI_DESC_SZ;
@@ -1150,13 +1278,17 @@ int cfhsi_probe(struct platform_device *pdev)
init_waitqueue_head(&cfhsi->flush_fifo_wait);
/* Setup the inactivity timer. */
- init_timer(&cfhsi->timer);
- cfhsi->timer.data = (unsigned long)cfhsi;
- cfhsi->timer.function = cfhsi_inactivity_tout;
+ init_timer(&cfhsi->inactivity_timer);
+ cfhsi->inactivity_timer.data = (unsigned long)cfhsi;
+ cfhsi->inactivity_timer.function = cfhsi_inactivity_tout;
/* Setup the slowpath RX timer. */
init_timer(&cfhsi->rx_slowpath_timer);
cfhsi->rx_slowpath_timer.data = (unsigned long)cfhsi;
cfhsi->rx_slowpath_timer.function = cfhsi_rx_slowpath;
+ /* Setup the aggregation timer. */
+ init_timer(&cfhsi->aggregation_timer);
+ cfhsi->aggregation_timer.data = (unsigned long)cfhsi;
+ cfhsi->aggregation_timer.function = cfhsi_aggregation_tout;
/* Add CAIF HSI device to list. */
spin_lock(&cfhsi_list_lock);
@@ -1222,8 +1354,9 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi)
flush_workqueue(cfhsi->wq);
/* Delete timers if pending */
- del_timer_sync(&cfhsi->timer);
+ del_timer_sync(&cfhsi->inactivity_timer);
del_timer_sync(&cfhsi->rx_slowpath_timer);
+ del_timer_sync(&cfhsi->aggregation_timer);
/* Cancel pending RX request (if any) */
cfhsi->dev->cfhsi_rx_cancel(cfhsi->dev);
diff --git a/include/net/caif/caif_hsi.h b/include/net/caif/caif_hsi.h
index 6db8ecf..439dadc 100644
--- a/include/net/caif/caif_hsi.h
+++ b/include/net/caif/caif_hsi.h
@@ -123,12 +123,21 @@ struct cfhsi_rx_state {
bool piggy_desc;
};
+/* Priority mapping */
+enum {
+ CFHSI_PRIO_CTL = 0,
+ CFHSI_PRIO_VI,
+ CFHSI_PRIO_VO,
+ CFHSI_PRIO_BEBK,
+ CFHSI_PRIO_LAST,
+};
+
/* Structure implemented by CAIF HSI drivers. */
struct cfhsi {
struct caif_dev_common cfdev;
struct net_device *ndev;
struct platform_device *pdev;
- struct sk_buff_head qhead;
+ struct sk_buff_head qhead[CFHSI_PRIO_LAST];
struct cfhsi_drv drv;
struct cfhsi_dev *dev;
int tx_state;
@@ -151,8 +160,14 @@ struct cfhsi {
wait_queue_head_t wake_up_wait;
wait_queue_head_t wake_down_wait;
wait_queue_head_t flush_fifo_wait;
- struct timer_list timer;
+ struct timer_list inactivity_timer;
struct timer_list rx_slowpath_timer;
+
+ /* TX aggregation */
+ unsigned long aggregation_timeout;
+ int aggregation_len;
+ struct timer_list aggregation_timer;
+
unsigned long bits;
};
--
1.7.5.4
^ permalink raw reply related
* [PATCH net-next 3/4] caif-hsi: Remove stop/start of queue.
From: Sjur Brændeland @ 2012-04-12 18:27 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren, Sjur Brændeland
In-Reply-To: <1334255247-3372-1-git-send-email-sjur.brandeland@stericsson.com>
CAIF HSI is currently a virtual device. Stopping/starting the
queues is wrong on a virtual device.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
drivers/net/caif/caif_hsi.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 9849a23..4253991 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -1129,15 +1129,11 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
static int cfhsi_open(struct net_device *dev)
{
- netif_wake_queue(dev);
-
return 0;
}
static int cfhsi_close(struct net_device *dev)
{
- netif_stop_queue(dev);
-
return 0;
}
@@ -1319,9 +1315,6 @@ int cfhsi_probe(struct platform_device *pdev)
__func__, res);
goto err_net_reg;
}
-
- netif_stop_queue(ndev);
-
return res;
err_net_reg:
@@ -1344,9 +1337,6 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi)
{
u8 *tx_buf, *rx_buf, *flip_buf;
- /* Stop TXing */
- netif_tx_stop_all_queues(cfhsi->ndev);
-
/* going to shutdown driver */
set_bit(CFHSI_SHUTDOWN, &cfhsi->bits);
--
1.7.5.4
^ permalink raw reply related
* [PATCH net-next 4/4] caif-hsi: Postpone init of HSI until open()
From: Sjur Brændeland @ 2012-04-12 18:27 UTC (permalink / raw)
To: netdev, davem; +Cc: sjurbren, Sjur Brændeland
In-Reply-To: <1334255247-3372-1-git-send-email-sjur.brandeland@stericsson.com>
Do the initialization of the HSI interface when the
interface is opened, instead of upon registration.
When the interface is closed the HSI interface is
de-initialized, allowing other modules to use the
HSI interface.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
Hi Dave,
This patch does not apply cleanly on net-next,
but depends on the bug-fix patch intended for 3.4:
caif-hsi: Free flip_buffer at shutdown
I hope this don't cause trouble for you.
Thanks,
Sjur
drivers/net/caif/caif_hsi.c | 97 ++++++++++++++++++++-----------------------
1 files changed, 45 insertions(+), 52 deletions(-)
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 4253991..1520814 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -6,6 +6,8 @@
* License terms: GNU General Public License (GPL) version 2.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME fmt
+
#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
@@ -1127,21 +1129,7 @@ static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
return 0;
}
-static int cfhsi_open(struct net_device *dev)
-{
- return 0;
-}
-
-static int cfhsi_close(struct net_device *dev)
-{
- return 0;
-}
-
-static const struct net_device_ops cfhsi_ops = {
- .ndo_open = cfhsi_open,
- .ndo_stop = cfhsi_close,
- .ndo_start_xmit = cfhsi_xmit
-};
+static const struct net_device_ops cfhsi_ops;
static void cfhsi_setup(struct net_device *dev)
{
@@ -1167,7 +1155,7 @@ int cfhsi_probe(struct platform_device *pdev)
{
struct cfhsi *cfhsi = NULL;
struct net_device *ndev;
- struct cfhsi_dev *dev;
+
int res;
ndev = alloc_netdev(sizeof(struct cfhsi), "cfhsi%d", cfhsi_setup);
@@ -1178,6 +1166,34 @@ int cfhsi_probe(struct platform_device *pdev)
cfhsi->ndev = ndev;
cfhsi->pdev = pdev;
+ /* Assign the HSI device. */
+ cfhsi->dev = pdev->dev.platform_data;
+
+ /* Assign the driver to this HSI device. */
+ cfhsi->dev->drv = &cfhsi->drv;
+
+ /* Register network device. */
+ res = register_netdev(ndev);
+ if (res) {
+ dev_err(&ndev->dev, "%s: Registration error: %d.\n",
+ __func__, res);
+ free_netdev(ndev);
+ }
+ /* Add CAIF HSI device to list. */
+ spin_lock(&cfhsi_list_lock);
+ list_add_tail(&cfhsi->list, &cfhsi_list);
+ spin_unlock(&cfhsi_list_lock);
+
+ return res;
+}
+
+static int cfhsi_open(struct net_device *ndev)
+{
+ struct cfhsi *cfhsi = netdev_priv(ndev);
+ int res;
+
+ clear_bit(CFHSI_SHUTDOWN, &cfhsi->bits);
+
/* Initialize state vaiables. */
cfhsi->tx_state = CFHSI_TX_STATE_IDLE;
cfhsi->rx_state.state = CFHSI_RX_STATE_DESC;
@@ -1187,12 +1203,6 @@ int cfhsi_probe(struct platform_device *pdev)
cfhsi->q_low_mark = LOW_WATER_MARK;
cfhsi->q_high_mark = HIGH_WATER_MARK;
- /* Assign the HSI device. */
- dev = (struct cfhsi_dev *)pdev->dev.platform_data;
- cfhsi->dev = dev;
-
- /* Assign the driver to this HSI device. */
- dev->drv = &cfhsi->drv;
/*
* Allocate a TX buffer with the size of a HSI packet descriptors
@@ -1260,9 +1270,9 @@ int cfhsi_probe(struct platform_device *pdev)
clear_bit(CFHSI_AWAKE, &cfhsi->bits);
/* Create work thread. */
- cfhsi->wq = create_singlethread_workqueue(pdev->name);
+ cfhsi->wq = create_singlethread_workqueue(cfhsi->pdev->name);
if (!cfhsi->wq) {
- dev_err(&ndev->dev, "%s: Failed to create work queue.\n",
+ dev_err(&cfhsi->ndev->dev, "%s: Failed to create work queue.\n",
__func__);
res = -ENODEV;
goto err_create_wq;
@@ -1286,11 +1296,6 @@ int cfhsi_probe(struct platform_device *pdev)
cfhsi->aggregation_timer.data = (unsigned long)cfhsi;
cfhsi->aggregation_timer.function = cfhsi_aggregation_tout;
- /* Add CAIF HSI device to list. */
- spin_lock(&cfhsi_list_lock);
- list_add_tail(&cfhsi->list, &cfhsi_list);
- spin_unlock(&cfhsi_list_lock);
-
/* Activate HSI interface. */
res = cfhsi->dev->cfhsi_up(cfhsi->dev);
if (res) {
@@ -1303,15 +1308,7 @@ int cfhsi_probe(struct platform_device *pdev)
/* Flush FIFO */
res = cfhsi_flush_fifo(cfhsi);
if (res) {
- dev_err(&ndev->dev, "%s: Can't flush FIFO: %d.\n",
- __func__, res);
- goto err_net_reg;
- }
-
- /* Register network device. */
- res = register_netdev(ndev);
- if (res) {
- dev_err(&ndev->dev, "%s: Registration error: %d.\n",
+ dev_err(&cfhsi->ndev->dev, "%s: Can't flush FIFO: %d.\n",
__func__, res);
goto err_net_reg;
}
@@ -1328,13 +1325,12 @@ int cfhsi_probe(struct platform_device *pdev)
err_alloc_rx:
kfree(cfhsi->tx_buf);
err_alloc_tx:
- free_netdev(ndev);
-
return res;
}
-static void cfhsi_shutdown(struct cfhsi *cfhsi)
+static int cfhsi_close(struct net_device *ndev)
{
+ struct cfhsi *cfhsi = netdev_priv(ndev);
u8 *tx_buf, *rx_buf, *flip_buf;
/* going to shutdown driver */
@@ -1364,15 +1360,19 @@ static void cfhsi_shutdown(struct cfhsi *cfhsi)
/* Deactivate interface */
cfhsi->dev->cfhsi_down(cfhsi->dev);
- /* Finally unregister the network device. */
- unregister_netdev(cfhsi->ndev);
-
/* Free buffers. */
kfree(tx_buf);
kfree(rx_buf);
kfree(flip_buf);
+ return 0;
}
+static const struct net_device_ops cfhsi_ops = {
+ .ndo_open = cfhsi_open,
+ .ndo_stop = cfhsi_close,
+ .ndo_start_xmit = cfhsi_xmit
+};
+
int cfhsi_remove(struct platform_device *pdev)
{
struct list_head *list_node;
@@ -1389,10 +1389,6 @@ int cfhsi_remove(struct platform_device *pdev)
/* Remove from list. */
list_del(list_node);
spin_unlock(&cfhsi_list_lock);
-
- /* Shutdown driver. */
- cfhsi_shutdown(cfhsi);
-
return 0;
}
}
@@ -1423,8 +1419,7 @@ static void __exit cfhsi_exit_module(void)
list_del(list_node);
spin_unlock(&cfhsi_list_lock);
- /* Shutdown driver. */
- cfhsi_shutdown(cfhsi);
+ unregister_netdevice(cfhsi->ndev);
spin_lock(&cfhsi_list_lock);
}
@@ -1449,8 +1444,6 @@ static int __init cfhsi_init_module(void)
goto err_dev_register;
}
- return result;
-
err_dev_register:
return result;
}
--
1.7.5.4
^ permalink raw reply related
* Re: [RFC PATCH 1/2] net: ethtool: Add capability to retrieve plug-in module EEPROM
From: Ben Hutchings @ 2012-04-12 18:41 UTC (permalink / raw)
To: Stuart Hodgson
Cc: netdev, bruce.w.allan, mirq-linux, decot, amit.salecha,
alexander.h.duyck, davem, linux-kernel
In-Reply-To: <4F869DF0.1000709@solarflare.com>
On Thu, 2012-04-12 at 10:18 +0100, Stuart Hodgson wrote:
> On 12/04/12 00:42, Ben Hutchings wrote:
[...]
> > Maybe we should start by refactoring ethtool_get_eeprom() so we can
> > reuse most of its code in ethtool_get_module_eeprom(), rather than
> > having to worry about what the maximum size of a module EEPROM might be
> > and whether we need a loop:
> >
> > Subject: ethtool: Split ethtool_get_eeprom() to allow for additional EEPROM accessors
[...]
> > @@ -771,7 +770,7 @@ static int ethtool_get_eeprom(struct net_device *dev, void __user *useraddr)
> > return -EINVAL;
> >
> > /* Check for exceeding total eeprom len */
> > - if (eeprom.offset + eeprom.len> ops->get_eeprom_len(dev))
> > + if (eeprom.offset + eeprom.len> total_len)
> > return -EINVAL;
> >
> > data = kmalloc(PAGE_SIZE, GFP_USER);
>
> Should this not be eeprom.len?
[...]
No, because this function loops over PAGE_SIZE chunks. That's
presumably necessary for large NIC EEPROMs, and if we reuse it we won't
have to wory about whether it's ever necessary for large module EEPROMs.
Ben.
--
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
* [PATCH] wiznet: Add missing #include <linux/irq.h>
From: Geert Uytterhoeven @ 2012-04-12 19:19 UTC (permalink / raw)
To: Mike Sinkovsky, David S. Miller
Cc: Paul Gortmaker, netdev, linux-kernel, Geert Uytterhoeven
m68k/allmodconfig:
drivers/net/ethernet/wiznet/w5100.c: In function ‘w5100_hw_probe’:
drivers/net/ethernet/wiznet/w5100.c:680: error: ‘IRQ_TYPE_LEVEL_LOW’ undeclared (first use in this function)
drivers/net/ethernet/wiznet/w5300.c: In function ‘w5300_hw_probe’:
drivers/net/ethernet/wiznet/w5300.c:594: error: ‘IRQ_TYPE_LEVEL_LOW’ undeclared (first use in this function)
Include <linux/irq.h>, which provides the declaration for IRQ_TYPE_LEVEL_LOW.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
--
Or should these drivers use IRQF_TRIGGER_LOW (from <linux/interrupt.h>)
instead?
http://kisskb.ellerman.id.au/kisskb/buildresult/6095757/
---
drivers/net/ethernet/wiznet/w5100.c | 1 +
drivers/net/ethernet/wiznet/w5300.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index c28e1d5..ecc6820 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -24,6 +24,7 @@
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <linux/gpio.h>
#define DRV_NAME "w5100"
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
index 88afde9..0a20797 100644
--- a/drivers/net/ethernet/wiznet/w5300.c
+++ b/drivers/net/ethernet/wiznet/w5300.c
@@ -25,6 +25,7 @@
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <linux/gpio.h>
#define DRV_NAME "w5300"
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH] Fix missing mutex_lock/unlock
From: Flavio Leitner @ 2012-04-12 19:23 UTC (permalink / raw)
To: mjr; +Cc: davem, sboyd, ben, netdev
In-Reply-To: <1334244396-6978-1-git-send-email-mjr@cs.wisc.edu>
On Thu, 12 Apr 2012 10:26:36 -0500 mjr@cs.wisc.edu wrote:
> From: Matt Renzelmann <mjr@cs.wisc.edu>
>
> All calls to ks8851_rdreg* and ks8851_wrreg* should be protected
> with the driver's lock mutex. A spurious interrupt may otherwise cause a
> crash.
>
> Signed-off-by: Matt Renzelmann <mjr@cs.wisc.edu>
> ---
> Hello,
>
> I'm new to the kernel development process so I hope I've not screwed
> this up with this extra text. We found a potential issue using a new
> driver testing tool called SymDrive. It looks legitimate to me, so
> I'm reporting it. We hope to make this tool available in the future.
> Please let me know if I should modify the patch or re-send without
> this commentary. Thanks in advance for your patience.
>
It is recommended to put the driver name in the subject,
for instance:
[PATCH] ks8851: Fix missing mutex_lock/unlock
See the driver log for more examples.
> drivers/net/ethernet/micrel/ks8851.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
> index c722aa6..fa2001a 100644
> --- a/drivers/net/ethernet/micrel/ks8851.c
> +++ b/drivers/net/ethernet/micrel/ks8851.c
> @@ -1515,11 +1515,15 @@ static int __devinit ks8851_probe(struct spi_device *spi)
> goto err_netdev;
> }
>
> + mutex_lock(&ks->lock);
> +
> netdev_info(ndev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n",
> CIDER_REV_GET(ks8851_rdreg16(ks, KS_CIDER)),
> ndev->dev_addr, ndev->irq,
> ks->rc_ccr & CCR_EEPROM ? "has" : "no");
>
> + mutex_unlock(&ks->lock);
> +
> return 0;
It's weird to look a mutex being hold to call netdev_info().
Perhaps change it to look like below as the netdev_info()
does a lot more things and holding the lock during that
seems to be a waste.
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index c722aa6..20237dc 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1417,6 +1417,7 @@ static int __devinit ks8851_probe(struct spi_device *spi)
{
struct net_device *ndev;
struct ks8851_net *ks;
+ int result;
int ret;
ndev = alloc_etherdev(sizeof(struct ks8851_net));
@@ -1515,9 +1516,12 @@ static int __devinit ks8851_probe(struct spi_device *spi)
goto err_netdev;
}
+ mutex_lock(&ks->lock);
+ result = CIDER_REV_GET(ks8851_rdreg16(ks, KS_CIDER));
+ mutex_unlock(&ks->lock);
+
netdev_info(ndev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n",
- CIDER_REV_GET(ks8851_rdreg16(ks, KS_CIDER)),
- ndev->dev_addr, ndev->irq,
+ result, ndev->dev_addr, ndev->irq,
ks->rc_ccr & CCR_EEPROM ? "has" : "no");
return 0;
fbl
^ permalink raw reply related
* [PATCH] net/core: simple_strtoul cleanup
From: Shuah Khan @ 2012-04-12 19:28 UTC (permalink / raw)
To: davem; +Cc: shuahkhan, netdev, LKML
Changed net/core/net-sysfs.c: netdev_store() to use kstrtoul()
instead of obsolete simple_strtoul().
>From 84371b0ed8b277ec8005fd0efbc73165a8bd72b9 Mon Sep 17 00:00:00 2001
From: Shuah Khan <shuahkhan@gmail.com>
Date: Thu, 12 Apr 2012 10:36:10 -0600
Subject: [PATCH] net/core: simple_strtoul cleanup
Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
---
net/core/net-sysfs.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 4955862..97d0f24 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -74,15 +74,14 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr,
int (*set)(struct net_device *, unsigned long))
{
struct net_device *net = to_net_dev(dev);
- char *endp;
unsigned long new;
int ret = -EINVAL;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
- new = simple_strtoul(buf, &endp, 0);
- if (endp == buf)
+ ret = kstrtoul(buf, 0, &new);
+ if (ret)
goto err;
if (!rtnl_trylock())
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH 4/5] mac80211: Add more ethtools stats: survey, rates, etc
From: Ben Hutchings @ 2012-04-12 19:30 UTC (permalink / raw)
To: Ben Greear
Cc: Florian Fainelli, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4F870828.4020708-my8/4N5VtI7c+919tysfdA@public.gmane.org>
On Thu, 2012-04-12 at 09:51 -0700, Ben Greear wrote:
> On 04/12/2012 09:42 AM, Florian Fainelli wrote:
> > Hi,
> >
> > Le 04/12/12 18:32, greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org a écrit :
> >> From: Ben Greear<greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>
> >>
> >> The signal and noise are forced to be positive since ethtool
> >> deals in unsigned 64-bit values and this number should be human
> >> readable. This gives easy access to some of the data formerly
> >> exposed in the deprecated /proc/net/wireless file.
> >
> > Uh, that's misleading, the signal and noise values are typically negative, so one needs to think about mentally adding a minus sign if he/she wants to
> > understand it. Does not ethtool know about 32-bits signed integers?
>
> Ethtool stats only supports u64. I think it's easy enough for
> humans or programs to add the negative sign. Can signal or noise
> ever be > 0? If so, that could actually break something that depends
> on flipping the value to negative....
So far as I can see, the ethtool stats were expected to be counters,
which obviously cannot become negative (or fractional). Maybe it's time
to define another command and string-set to cover other types of status
information. The ethtool utility could ask for those typed statistics
as well, so 'ethtool -S' would get all of them.
Ben.
--
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.
--
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
* [GIT] Networking
From: David Miller @ 2012-04-12 19:39 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Fix bluetooth userland regression reported by Keith Packard,
from Gustavo Padovan.
2) Revert ath9k PS idle change, from Sujith Manoharan.
3) Correct default TCP memory limits (again), from Eric
Dumazet.
4) Fix tcp_rcv_rtt_update() accidental use of unscaled RTT, from
Neal Cardwell.
5) We made a facility for layers like wireless to say how much
tailroom they need in the SKB for link layer stuff such as
wireless encryption etc., but TCP works hard to fill every SKB
out to the end defeating this specification.
This leads to every TCP packet getting reallocated by the wireless
code in order to have the right amount of tailroom available.
Fix TCP to only fill SKBs out to the real amount of data area it
asked for during the allocation, this way it won't eat into the
slack added for the device's tailroom needs.
Reported by Marc Merlin and fixed by Eric Dumazet.
6) Leaks, endian bugs, and new device IDs in bluetooth from Santosh
Nayak, João Paulo Rechi Vita, Cho, Yu-Chen, Andrei Emeltchenko,
AceLan Kao, and Andrei Emeltchenko.
7) OOPS on tty_close fix in bluetooth's hci_ldisc from Johan Hovold.
8) netfilter erroneously scales TCP window twice, fix from Changli Gao.
9) Memleak fix in wext-core from Julia Lawall.
10) Consistently handle invalid TCP packets in ipv4 vs. ipv6 conntrack,
from Jozsef Kadlecsik.
11) Validate IP header length properly in netfilter conntrack's
ipv4_get_l4proto().
Please pull, thanks a lot!
The following changes since commit f68e556e23d1a4176b563bcb25d8baf2c5313f91:
Make the "word-at-a-time" helper functions more commonly usable (2012-04-06 13:54:56 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
for you to fetch changes up to 5d949944229b0a08e218723be231731cd86b94f3:
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem (2012-04-12 09:55:22 -0400)
----------------------------------------------------------------
AceLan Kao (1):
Bluetooth: Add support for Atheros [04ca:3005]
Andrei Emeltchenko (3):
Bluetooth: Fix memory leaks due to chan refcnt
Bluetooth: mgmt: Add missing endian conversion
Bluetooth: mgmt: Fix timeout type
Brian Gix (1):
Bluetooth: mgmt: Fix corruption of device_connected pkt
Changli Gao (1):
netfilter: nf_ct_tcp: don't scale the size of the window up twice
Chen, Chien-Chia (1):
rt2x00: Fix rfkill_polling register function.
Cho, Yu-Chen (1):
Bluetooth: Add Atheros maryann PIDVID support
David S. Miller (2):
Merge branch 'master' of git://1984.lsi.us.es/net
MAINTAINERS: Mark NATSEMI driver as orphan'd.
Don Zickus (1):
Bluetooth: btusb: typo in Broadcom SoftSailing id
Eric Dumazet (3):
tcp: restore correct limit
net: allow pskb_expand_head() to get maximum tailroom
tcp: avoid order-1 allocations on wifi and tx path
Gao feng (1):
netfilter: nf_conntrack: fix incorrect logic in nf_conntrack_init_net
Gustavo Padovan (1):
Bluetooth: Fix userspace compatibility issue with mgmt interface
Hemant Gupta (1):
Bluetooth: Use correct flags for checking HCI_SSP_ENABLED bit
Herbert Xu (1):
bridge: Do not send queries on multicast group leaves
Johan Hedberg (2):
Bluetooth: Don't increment twice in eir_has_data_type()
Bluetooth: Check for minimum data length in eir_has_data_type()
Johan Hovold (2):
Bluetooth: hci_ldisc: fix NULL-pointer dereference on tty_close
Bluetooth: hci_core: fix NULL-pointer dereference at unregister
Johannes Berg (2):
mac80211: fix association beacon wait timeout
nl80211: ensure interface is up in various APIs
John W. Linville (2):
Merge branch 'master' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
Jozsef Kadlecsik (2):
netfilter: nf_ct_ipv4: handle invalid IPv4 and IPv6 packets consistently
netfilter: nf_ct_ipv4: packets with wrong ihl are invalid
João Paulo Rechi Vita (1):
Bluetooth: btusb: Add USB device ID "0a5c 21e8"
Julia Lawall (1):
net/wireless/wext-core.c: add missing kfree
Larry Finger (5):
rtlwifi: rtl8192de: Fix firmware initialization
mac80211: Convert WARN_ON to WARN_ON_ONCE
rtlwifi: Fix oops on rate-control failure
rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
rtlwifi: Add missing DMA buffer unmapping for PCI drivers
Marcel Holtmann (1):
MAINTAINERS: update Bluetooth tree locations
Neal Cardwell (1):
tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sample
Pablo Neira Ayuso (1):
netfilter: ip6_tables: ip6t_ext_hdr is now static inline
Paul Gortmaker (1):
bcma: fix build error on MIPS; implicit pcibios_enable_device
Samuel Ortiz (1):
NFC: Fix the LLCP Tx fragmentation loop
Santosh Nayak (1):
Bluetooth: Fix Endian Bug.
Sujith Manoharan (1):
Revert "ath9k: fix going to full-sleep on PS idle"
MAINTAINERS | 11 ++++---
drivers/bcma/Kconfig | 2 +-
drivers/bcma/driver_pci_host.c | 1 +
drivers/bluetooth/ath3k.c | 4 +++
drivers/bluetooth/btusb.c | 5 +++-
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/net/wireless/ath/ath9k/main.c | 8 ++----
drivers/net/wireless/rt2x00/rt2x00dev.c | 6 +---
drivers/net/wireless/rtlwifi/base.c | 5 +++-
drivers/net/wireless/rtlwifi/pci.c | 7 ++++-
drivers/net/wireless/rtlwifi/rtl8192de/sw.c | 6 ----
drivers/net/wireless/rtlwifi/usb.c | 34 +++++++++++-----------
drivers/net/wireless/rtlwifi/wifi.h | 6 +++-
include/linux/netfilter_ipv6/ip6_tables.h | 12 +++++++-
include/linux/skbuff.h | 13 +++++++++
include/net/bluetooth/hci.h | 3 +-
include/net/bluetooth/hci_core.h | 12 ++++----
include/net/bluetooth/mgmt.h | 2 +-
include/net/mac80211.h | 2 +-
net/bluetooth/hci_core.c | 7 +++++
net/bluetooth/l2cap_core.c | 3 ++
net/bluetooth/l2cap_sock.c | 5 ++--
net/bluetooth/mgmt.c | 13 ++++++---
net/bridge/br_multicast.c | 81 ----------------------------------------------------
net/bridge/br_private.h | 4 ---
net/core/skbuff.c | 4 ++-
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 12 ++++++--
net/ipv4/tcp.c | 11 ++++---
net/ipv4/tcp_input.c | 7 +++--
net/ipv4/tcp_output.c | 2 +-
net/ipv6/netfilter/ip6_tables.c | 14 ---------
net/mac80211/mlme.c | 3 +-
net/netfilter/nf_conntrack_core.c | 2 +-
net/netfilter/nf_conntrack_proto_tcp.c | 4 +--
net/nfc/llcp/commands.c | 4 +--
net/wireless/nl80211.c | 31 +++++++++++---------
net/wireless/wext-core.c | 6 ++--
37 files changed, 160 insertions(+), 194 deletions(-)
^ permalink raw reply
* Re: [PATCH] drivers/net: Remove CONFIG_WIZNET_TX_FLOW option
From: David Miller @ 2012-04-12 19:46 UTC (permalink / raw)
To: msink; +Cc: netdev, linux-kernel
In-Reply-To: <1334211288-7682-1-git-send-email-msink@permonline.ru>
From: Mike Sinkovsky <msink@permonline.ru>
Date: Thu, 12 Apr 2012 12:14:48 +0600
> This option was there for debugging race conditions,
> just remove it, and assume TX_FLOW is always enabled.
>
> Signed-off-by: Mike Sinkovsky <msink@permonline.ru>
Applied.
^ permalink raw reply
* Re: [PATCH] wiznet: Add missing #include <linux/irq.h>
From: David Miller @ 2012-04-12 19:46 UTC (permalink / raw)
To: geert; +Cc: msink, paul.gortmaker, netdev, linux-kernel
In-Reply-To: <1334258363-17617-1-git-send-email-geert@linux-m68k.org>
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 12 Apr 2012 21:19:23 +0200
> m68k/allmodconfig:
>
> drivers/net/ethernet/wiznet/w5100.c: In function ‘w5100_hw_probe’:
> drivers/net/ethernet/wiznet/w5100.c:680: error: ‘IRQ_TYPE_LEVEL_LOW’ undeclared (first use in this function)
> drivers/net/ethernet/wiznet/w5300.c: In function ‘w5300_hw_probe’:
> drivers/net/ethernet/wiznet/w5300.c:594: error: ‘IRQ_TYPE_LEVEL_LOW’ undeclared (first use in this function)
>
> Include <linux/irq.h>, which provides the declaration for IRQ_TYPE_LEVEL_LOW.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Applied.
^ permalink raw reply
* Re: [PATCH 4/5] mac80211: Add more ethtools stats: survey, rates, etc
From: Georgiewskiy Yuriy @ 2012-04-12 19:53 UTC (permalink / raw)
To: Ben Greear
Cc: Florian Fainelli, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4F870828.4020708-my8/4N5VtI7c+919tysfdA@public.gmane.org>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2181 bytes --]
On 2012-04-12 09:51 -0700, Ben Greear wrote Florian Fainelli:
BG>On 04/12/2012 09:42 AM, Florian Fainelli wrote:
BG>> Hi,
BG>>
BG>> Le 04/12/12 18:32, greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org a ?crit :
BG>> > From: Ben Greear<greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>
BG>> >
BG>> > The signal and noise are forced to be positive since ethtool
BG>> > deals in unsigned 64-bit values and this number should be human
BG>> > readable. This gives easy access to some of the data formerly
BG>> > exposed in the deprecated /proc/net/wireless file.
BG>>
BG>> Uh, that's misleading, the signal and noise values are typically negative,
BG>> so one needs to think about mentally adding a minus sign if he/she wants to
BG>> understand it. Does not ethtool know about 32-bits signed integers?
BG>
BG>Ethtool stats only supports u64. I think it's easy enough for
BG>humans or programs to add the negative sign. Can signal or noise
BG>ever be > 0? If so, that could actually break something that depends
BG>on flipping the value to negative....
Don't know is this is a bug or it's reaaly can be positive, but:
iw dev mp0 station dump
Station 00:02:6f:b8:94:d3 (on mp0)
inactive time: 49 ms
rx bytes: 36318341
rx packets: 271741
tx bytes: 4180152
tx packets: 35445
tx retries: 7724
tx failed: 123
signal: 1 dBm
signal avg: -2 dBm
tx bitrate: 240.0 MBit/s MCS 13 40Mhz short GI
rx bitrate: 180.0 MBit/s MCS 12 40Mhz short GI
mesh llid: 8349
mesh plid: 49801
mesh plink: ESTAB
authorized: yes
authenticated: yes
preamble: long
WMM/WME: yes
FP: no
TDLS peer: no
C уважением With Best Regards
Георгиевский Юрий. Georgiewskiy Yuriy
+7 4872 711666 +7 4872 711666
факс +7 4872 711143 fax +7 4872 711143
Компания ООО "Ай Ти Сервис" IT Service Ltd
http://nkoort.ru http://nkoort.ru
JID: GHhost-k/kvQgNDeKovJsYlp49lxw@public.gmane.org JID: GHhost-k/kvQgNDeKovJsYlp49lxw@public.gmane.org
YG129-RIPE YG129-RIPE
^ permalink raw reply
* Re: [PATCH] [IPv6]: Treat ND option 31 as userland (DNSSL support)
From: David Miller @ 2012-04-12 19:57 UTC (permalink / raw)
To: raorn; +Cc: netdev
In-Reply-To: <1333727458-28438-1-git-send-email-raorn@raorn.name>
From: "Alexey I. Froloff" <raorn@raorn.name>
Date: Fri, 6 Apr 2012 19:50:58 +0400
> As specified in RFC6106, DNSSL option contains one or more domain names
> of DNS suffixes. 8-bit identifier of the DNSSL option type as assigned
> by the IANA is 31. This option should also be treated as userland.
>
> Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH] net/ipv6/exthdrs.c et al: Optional strict PadN option checking
From: David Miller @ 2012-04-12 20:00 UTC (permalink / raw)
To: eldad; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel
In-Reply-To: <1333811774-3219-1-git-send-email-eldad@fogrefinery.com>
From: Eldad Zack <eldad@fogrefinery.com>
Date: Sat, 7 Apr 2012 17:16:14 +0200
> Added strict checking of PadN. PadN can be used to increase header
> size and thus push the protocol header into the 2nd fragment.
>
> PadN is used to align the options within the Hop-by-Hop or
> Destination Options header to 64-bit boundaries. The maximum valid
> size is thus 7 bytes.
> RFC 4942 recommends to actively check the "payload" itself and
> ensure that it contains only zeroes.
>
> See also RFC 4942 section 2.1.9.5.
>
> Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
I think you should do away with the sysctl and always perform these
checks.
At the very leat, the optlen > 7 check should always be performed.
And frankly the pad byte being zero check makes sense to do all the
time as far as I can tell too.
^ permalink raw reply
* Re: [PATCH net-next] ixp4xx_eth: Fix up the get_ts_info ethtool method.
From: David Miller @ 2012-04-12 20:01 UTC (permalink / raw)
To: richardcochran; +Cc: netdev
In-Reply-To: <1333814170-30940-1-git-send-email-richardcochran@gmail.com>
From: Richard Cochran <richardcochran@gmail.com>
Date: Sat, 7 Apr 2012 17:56:10 +0200
> Commit e77bd1ec121ee4163a6b42a44e87b2e382c39e04 added support for a
> new ethtool function, but that cannot compile due to a misnamed global
> variable. Not that it really matters (since the IXP4xx does compile
> either, as of about Linux 3.1) but just in case, this patch fixes the
> misnamed variable in the PHC driver.
>
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Applied, thanks Richard.
^ permalink raw reply
* [PATCH] bonding: start slaves with link down for ARP monitor
From: Michal Kubecek @ 2012-04-12 18:38 UTC (permalink / raw)
To: netdev; +Cc: Jay Vosburgh, Andy Gospodarek
Initialize slave device link state as down if ARP monitor
is active. Also shift initial value of its last_arp_tx so that
it doesn't immediately cause fake detection of "up" state.
When ARP monitoring is used, initializing the slave device with
up link state can cause ARP monitor to detect link failure
before the device is really up (with igb driver, this can take
more than two seconds).
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
---
When MII monitoring is active for a bond, initial link state of slaves
is set according to real link state of the corresponding device,
otherwise it is always set to UP. This makes sense if no monitoring is
active but with ARP monitoring, it can lead to situations like this:
[ 1280.431383] bonding: bond0: setting mode to active-backup (1).
[ 1280.443305] bonding: bond0: adding ARP target 10.11.0.8.
[ 1280.454079] bonding: bond0: setting arp_validate to all (3).
[ 1280.465561] bonding: bond0: Setting ARP monitoring interval to 500.
[ 1280.480366] ADDRCONF(NETDEV_UP): bond0: link is not ready
[ 1280.491471] bonding: bond0: Adding slave eth1.
[ 1280.584158] bonding: bond0: making interface eth1 the new active one.
[ 1280.597274] bonding: bond0: first active interface up!
[ 1280.607675] bonding: bond0: enslaving eth1 as an active interface with an up link.
[ 1280.623567] ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[ 1280.635511] bonding: bond0: Adding slave eth2.
[ 1280.726423] bonding: bond0: enslaving eth2 as a backup interface with an up link.
[ 1281.976030] bonding: bond0: link status definitely down for interface eth1, disabling it
[ 1281.992350] bonding: bond0: making interface eth2 the new active one.
[ 1282.639276] igb: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 1283.002282] bonding: bond0: link status definitely down for interface eth2, disabling it
[ 1283.018713] bonding: bond0: now running without any active interface !
[ 1283.529415] bonding: bond0: link status definitely up for interface eth1.
[ 1283.543075] bonding: bond0: making interface eth1 the new active one.
[ 1283.556614] bonding: bond0: first active interface up!
Here eth1 is enslaved with link state UP but before the device is really
UP, ARP monitor detects it is actually down (it takes more than two
seconds and arp_interval was set to 500). This causes a spurious failure
in logs and in statistics.
I propose to initialize slaves with DOWN link state if ARP monitor is
active so that the ARP monitor can switch it to UP when appropriate.
This also requires adjusting the initial value of last_arp_rx as setting
it to current jiffies would pretend a packet arrived when slave was
initialized, leading to DOWN -> UP -> DOWN -> UP sequence.
---
drivers/net/bonding/bond_main.c | 36 ++++++++++++++++++++++--------------
1 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 62d2409..c1eda74 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1727,6 +1727,9 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
read_lock(&bond->lock);
new_slave->last_arp_rx = jiffies;
+ if (bond->params.arp_interval)
+ new_slave->last_arp_rx -=
+ (msecs_to_jiffies(bond->params.arp_interval) + 1);
if (bond->params.miimon && !bond->params.use_carrier) {
link_reporting = bond_check_dev_link(bond, slave_dev, 1);
@@ -1751,21 +1754,26 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
}
/* check for initial state */
- if (!bond->params.miimon ||
- (bond_check_dev_link(bond, slave_dev, 0) == BMSR_LSTATUS)) {
- if (bond->params.updelay) {
- pr_debug("Initial state of slave_dev is BOND_LINK_BACK\n");
- new_slave->link = BOND_LINK_BACK;
- new_slave->delay = bond->params.updelay;
- } else {
- pr_debug("Initial state of slave_dev is BOND_LINK_UP\n");
- new_slave->link = BOND_LINK_UP;
- }
- new_slave->jiffies = jiffies;
- } else {
- pr_debug("Initial state of slave_dev is BOND_LINK_DOWN\n");
- new_slave->link = BOND_LINK_DOWN;
+ if (bond->params.miimon) {
+ if (bond_check_dev_link(bond, slave_dev, 0) == BMSR_LSTATUS) {
+ if (bond->params.updelay) {
+ new_slave->link = BOND_LINK_BACK;
+ new_slave->delay = bond->params.updelay;
+ } else
+ new_slave->link = BOND_LINK_UP;
+ } else
+ new_slave->link = BOND_LINK_DOWN;
}
+ else if (bond->params.arp_interval)
+ new_slave->link = BOND_LINK_DOWN;
+ else
+ new_slave->link = BOND_LINK_UP;
+
+ if (new_slave->link != BOND_LINK_DOWN)
+ new_slave->jiffies = jiffies;
+ pr_debug("Initial state of slave_dev is BOND_LINK_%s\n",
+ new_slave->link == BOND_LINK_DOWN ? "DOWN" :
+ (new_slave->link == BOND_LINK_UP ? "UP" : "BACK"));
bond_update_speed_duplex(new_slave);
--
1.7.7
^ permalink raw reply related
* pull request: wireless-next 2012-04-12
From: John W. Linville @ 2012-04-12 19:55 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 21692 bytes --]
commit 7eab0f64a9eba5405222fdef0ede2468bf495efd
Dave,
Welcome to the first wireless pull request for the 3.5 era! :-)
Highlights of this batch include some mac80211 refactoring and
enhancements, a number of iwlwifi updates, some ath9k updates
(including a DFS pattern detector), and various other updates to
rtlwifi, mwifiex, and various other drivers. Overall, nothing too
unusual...
Please let me know if there are problems!
Thanks,
John
P.S. This also includes a pull from the wireless tree, to provide
a prerequisite fix for the NFC updates.
---
The following changes since commit cade455596504fae8e134a27189713ddf7c6d04d:
team: add missed "statics" (2012-04-11 10:03:52 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem
AceLan Kao (1):
Bluetooth: Add support for Atheros [04ca:3005]
Amitkumar Karwar (5):
mwifiex: update signal strength in mBm units
mwifiex: add cfg80211 dump_station handler
mwifiex: remove redundant signal handling code
mwifiex: support STATION_INFO_SIGNAL_AVG
mwifiex: add set_cqm_rssi_config handler support
Andrei Emeltchenko (3):
Bluetooth: Fix memory leaks due to chan refcnt
Bluetooth: mgmt: Add missing endian conversion
Bluetooth: mgmt: Fix timeout type
Antonio Quartulli (1):
b43: claim support for IBSS RSN
Ashok Nagarajan (4):
mac80211: Use mandatory rates as basic rates when starting mesh
mac80211: Indicate basic rates when adding rate IEs
mac80211: Modify sta_get_rates to give basic rates
mac80211: Check basic rates when peering
Ben Greear (3):
mac80211: Add iface name when calling WARN-ON.
ath9k: Add tx-failed counter.
ath9k: Add more recv stats.
Brian Gix (1):
Bluetooth: mgmt: Fix corruption of device_connected pkt
Chen, Chien-Chia (1):
rt2x00: Fix rfkill_polling register function.
Cho, Yu-Chen (1):
Bluetooth: Add Atheros maryann PIDVID support
Christian Lamparter (1):
p54: only unregister ieee80211_hw when it has been registered
Chun-Yeow Yeoh (2):
mac80211: fix the sparse warnings on endian handling in RANN propagation
mac80211: fix the RANN propagation issues
David Spinadel (1):
iwlwifi: phy_db structure
Don Fry (2):
iwlwifi: move FW_ERROR to priv
iwlwifi: split POWER_PMI status bit
Don Zickus (1):
Bluetooth: btusb: typo in Broadcom SoftSailing id
Felix Fietkau (3):
cfg80211: use compare_ether_addr on MAC addresses instead of memcmp
mac80211: reduce code duplication in debugfs code
mac80211: optimize aggregation session timeout handling
Gustavo Padovan (1):
Bluetooth: Fix userspace compatibility issue with mgmt interface
Hemant Gupta (1):
Bluetooth: Use correct flags for checking HCI_SSP_ENABLED bit
Jakub Kicinski (1):
rt2x00: increase led's name buffer length
Javier Cardona (4):
mac80211_hwsim: Fill timestamp beacon at the time it is transmitted
mac80211: Allow tsf increments via debugfs
mac80211: Implement mesh synchronization framework
{nl,cfg}80211: Support for mesh synchronization
Joe Perches (6):
rtlwifi: Use is_zero_ether_addr, remove line continuation
rtlwifi: Simplify rtl_get/set inline functions
ath: Add and use pr_fmt, convert printks to pr_<level>
ath5k: Introduce _ath5k_printk to reduce code/text
iwlwifi: Add pr_fmt
wireless: Remove unnecessary ; from while (0) macros
Johan Hedberg (2):
Bluetooth: Don't increment twice in eir_has_data_type()
Bluetooth: Check for minimum data length in eir_has_data_type()
Johan Hovold (2):
Bluetooth: hci_ldisc: fix NULL-pointer dereference on tty_close
Bluetooth: hci_core: fix NULL-pointer dereference at unregister
Johannes Berg (37):
mac80211: fix association beacon wait timeout
nl80211: ensure interface is up in various APIs
wireless: rename ht_info to ht_operation
iwlwifi: process multiple frames per RXB
iwlwifi: extend notification wait
iwlwifi: simplify calibration collection
iwlwifi: add trailing newline to various messages
iwlwifi: clarify config struct comments
iwlwifi: remove support_wimax_coexist
iwlwifi: remove iq_invert config param
iwlwifi: remove scan_rx_antennas
iwlwifi: use scan while idle
iwlwifi: move queue mapping out of transport
iwlwifi: move valid_contexts to priv
mac80211: don't always advertise remain-on-channel
mwifiex: don't use IEEE80211_MAX_QUEUES
mac80211: fix mesh TX coding style
mac80211: clean up uAPSD TX code
mac80211: make ieee80211_downgrade_queue static
mac80211: inline ieee80211_add_pending_skbs
mac80211: use AC constants
mac80211: set HT channel before association
mac80211: remove channel type argument from rate_update
mac80211: remove queue stop on rate control update
mac80211: notify driver of rate control updates
mac80211: remove antenna_sel_tx TX info field
cfg80211/nl80211: clarify TX queue API
mac80211: refuse TX queue configuration on non-QoS HW
mac80211: decouple # of netdev queues from HW queues
mac80211: debounce queue stop/wake
mac80211: lazily stop queues in add_pending
mac80211: use IEEE80211_NUM_ACS
mac80211: manage AP netdev carrier state
mac80211: add explicit monitor interface if needed
mac80211: add improved HW queue control
mac80211: clean up an ieee80211_do_open error path
cfg80211/mac80211: enable proper device_set_wakeup_enable handling
John W. Linville (3):
Merge branch 'master' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'master' into for-davem
João Paulo Rechi Vita (1):
Bluetooth: btusb: Add USB device ID "0a5c 21e8"
Julia Lawall (1):
net/wireless/wext-core.c: add missing kfree
Larry Finger (8):
rtlwifi: rtl8192de: Fix firmware initialization
mac80211: Convert WARN_ON to WARN_ON_ONCE
rtlwifi: Fix oops on rate-control failure
p54usb: Load firmware asynchronously
rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
rtlwifi: Add missing DMA buffer unmapping for PCI drivers
rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
rtlwifi: Add missing DMA buffer unmapping for PCI drivers
Luis R. Rodriguez (1):
cfg80211: warn if db.txt is empty with CONFIG_CFG80211_INTERNAL_REGDB
Marcel Holtmann (1):
MAINTAINERS: update Bluetooth tree locations
Marco Porsch (1):
mac80211: end service period only after sending last buffered frame
Meenakshi Venkataraman (11):
iwlwifi: use iwlagn_fw_error instead of iwl_nic_error
iwlwifi: make iwl_nic_error static
iwlwifi: move ucode error log reporting to op_mode
iwlwifi: move ucode_type from shared to op_mode
iwlwifi: move iwl_init_geos to iwl-agn.c
iwlwifi: Move iwl_send_rxon_timing and make it static
iwlwifi: move iwl_set_rxon_hwcrypto and mark it static
iwlwifi: move iwl_check_rxon_cmd and mark it static
iwlwifi: move iwl_full_rxon_required and mark it static
iwlwifi: move iwl_get_single_channel_number and mark it static
iwlwifi: remove firmware info from iwl_shared
Oliver Hartkopp (1):
iwlwifi: fix unused variable warning
Paul Gortmaker (1):
bcma: fix build error on MIPS; implicit pcibios_enable_device
Qasim Javed (1):
ath5k: Remove extraneous statements from ath5k_hw_proc_4word_tx_status and ath5k_hw_proc_2word_status.
Rajkumar Manoharan (5):
ath9k_hw: improve ANI processing and rx desensitizing parameters
ath9k: recover ar9380 chips from rare stuck state
mac80211: do not send pspoll when powersave is disabled
mac80211: flush to get the tx status of nullfunc frame immediately
ath9k_hw: Update rx gain initval to improve rx sensitivity
Ronald Wahl (1):
mac80211: when receiving DTIM disable power-save mode only if it was enabled
Samuel Ortiz (1):
NFC: Fix the LLCP Tx fragmentation loop
Santosh Nayak (1):
Bluetooth: Fix Endian Bug.
Stanislav Yakovlev (2):
net/wireless: ipw2x00: remove unused libipw_measurement_report struct
net/wireless: ipw2x00: remove ssid_context struct
Stanislaw Gruszka (3):
mac80211: sanity check for null SSID
rt2x00: configure different txdesc parameters for non HT channel
rt2x00: do not generate seqno in h/w if QOS is disabled
Sujith Manoharan (1):
Revert "ath9k: fix going to full-sleep on PS idle"
Thomas Pedersen (1):
cfg80211: add channel switch notify event
Wey-Yi Guy (1):
iwlwifi: remove un-needed parameter
Zefir Kurtisi (3):
ath9k: add DFS pattern detector
ath9k: add DFS pattern detector instance to ath_softc
ath9k: update to DFS pattern detector interface
Documentation/DocBook/80211.tmpl | 2 +-
.../networking/mac80211-auth-assoc-deauth.txt | 10 +-
MAINTAINERS | 8 +-
drivers/bcma/Kconfig | 2 +-
drivers/bcma/driver_pci_host.c | 1 +
drivers/bluetooth/ath3k.c | 4 +
drivers/bluetooth/btusb.c | 5 +-
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/net/wireless/ath/ath5k/ani.c | 44 +-
drivers/net/wireless/ath/ath5k/ath5k.h | 29 +-
drivers/net/wireless/ath/ath5k/attach.c | 2 +
drivers/net/wireless/ath/ath5k/base.c | 22 +
drivers/net/wireless/ath/ath5k/debug.c | 17 +-
drivers/net/wireless/ath/ath5k/desc.c | 6 +-
drivers/net/wireless/ath/ath5k/dma.c | 2 +
drivers/net/wireless/ath/ath5k/eeprom.c | 2 +
drivers/net/wireless/ath/ath5k/initvals.c | 5 +-
drivers/net/wireless/ath/ath5k/led.c | 2 +
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +
drivers/net/wireless/ath/ath5k/pci.c | 4 +-
drivers/net/wireless/ath/ath5k/phy.c | 2 +
drivers/net/wireless/ath/ath5k/qcu.c | 2 +
drivers/net/wireless/ath/ath5k/reset.c | 2 +
drivers/net/wireless/ath/ath5k/sysfs.c | 2 +
drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 +
drivers/net/wireless/ath/ath6kl/init.c | 2 +
drivers/net/wireless/ath/ath6kl/main.c | 2 +
drivers/net/wireless/ath/ath6kl/txrx.c | 2 +
drivers/net/wireless/ath/ath9k/Makefile | 5 +-
drivers/net/wireless/ath/ath9k/ani.c | 49 +-
drivers/net/wireless/ath/ath9k/ani.h | 6 +-
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 38 -
.../net/wireless/ath/ath9k/ar9003_2p2_initvals.h | 10 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 49 --
drivers/net/wireless/ath/ath9k/ath9k.h | 5 +
drivers/net/wireless/ath/ath9k/debug.c | 24 +-
drivers/net/wireless/ath/ath9k/debug.h | 21 +
drivers/net/wireless/ath/ath9k/dfs.c | 80 +--
drivers/net/wireless/ath/ath9k/dfs.h | 8 +-
.../net/wireless/ath/ath9k/dfs_pattern_detector.c | 300 ++++++++
.../net/wireless/ath/ath9k/dfs_pattern_detector.h | 104 +++
drivers/net/wireless/ath/ath9k/dfs_pri_detector.c | 390 ++++++++++
drivers/net/wireless/ath/ath9k/dfs_pri_detector.h | 52 ++
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 11 +-
drivers/net/wireless/ath/ath9k/htc_hst.c | 4 +-
drivers/net/wireless/ath/ath9k/hw.c | 73 ++
drivers/net/wireless/ath/ath9k/init.c | 19 +-
drivers/net/wireless/ath/ath9k/main.c | 57 ++-
drivers/net/wireless/ath/ath9k/pci.c | 9 +-
drivers/net/wireless/ath/ath9k/rc.c | 7 +-
drivers/net/wireless/ath/ath9k/recv.c | 39 +-
drivers/net/wireless/ath/carl9170/cmd.h | 6 +-
drivers/net/wireless/ath/carl9170/fw.c | 2 +
drivers/net/wireless/ath/main.c | 4 +-
drivers/net/wireless/ath/regd.c | 4 +-
drivers/net/wireless/b43/main.c | 16 +
drivers/net/wireless/b43/xmit.c | 2 +-
drivers/net/wireless/b43legacy/xmit.c | 14 +-
drivers/net/wireless/brcm80211/brcmsmac/d11.h | 2 +-
drivers/net/wireless/ipw2x00/ipw2100.h | 9 -
drivers/net/wireless/ipw2x00/libipw.h | 55 --
drivers/net/wireless/iwlegacy/4965-mac.c | 4 +-
drivers/net/wireless/iwlegacy/4965-rs.c | 2 +-
drivers/net/wireless/iwlwifi/Kconfig | 8 +
drivers/net/wireless/iwlwifi/Makefile | 2 +
drivers/net/wireless/iwlwifi/iwl-1000.c | 1 -
drivers/net/wireless/iwlwifi/iwl-2000.c | 19 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 1 -
drivers/net/wireless/iwlwifi/iwl-6000.c | 3 -
drivers/net/wireless/iwlwifi/iwl-agn-hw.h | 3 -
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 24 +-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 7 +-
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 261 +++++++-
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 144 +++-
drivers/net/wireless/iwlwifi/iwl-agn.c | 786 +++++++++++++++++++-
drivers/net/wireless/iwlwifi/iwl-agn.h | 23 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 484 +------------
drivers/net/wireless/iwlwifi/iwl-core.h | 15 -
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 58 ++-
drivers/net/wireless/iwlwifi/iwl-dev.h | 24 +-
drivers/net/wireless/iwlwifi/iwl-mac80211.c | 14 +-
drivers/net/wireless/iwlwifi/iwl-notif-wait.c | 44 +-
drivers/net/wireless/iwlwifi/iwl-notif-wait.h | 21 +-
drivers/net/wireless/iwlwifi/iwl-op-mode.h | 17 +-
drivers/net/wireless/iwlwifi/iwl-pci.c | 3 +
drivers/net/wireless/iwlwifi/iwl-phy-db.c | 273 +++++++
drivers/net/wireless/iwlwifi/iwl-phy-db.h | 123 +++
drivers/net/wireless/iwlwifi/iwl-power.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-scan.c | 53 ++-
drivers/net/wireless/iwlwifi/iwl-shared.h | 32 +-
drivers/net/wireless/iwlwifi/iwl-testmode.c | 9 +-
drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h | 148 +----
drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | 514 ++-----------
drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 218 +-----
drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 270 ++------
drivers/net/wireless/iwlwifi/iwl-trans.h | 95 ++--
drivers/net/wireless/iwlwifi/iwl-ucode.c | 133 ++--
drivers/net/wireless/mac80211_hwsim.c | 32 +-
drivers/net/wireless/mwifiex/11n.c | 17 +-
drivers/net/wireless/mwifiex/cfg80211.c | 81 ++-
drivers/net/wireless/mwifiex/fw.h | 23 +-
drivers/net/wireless/mwifiex/ioctl.h | 49 +-
drivers/net/wireless/mwifiex/join.c | 14 +-
drivers/net/wireless/mwifiex/main.h | 14 +-
drivers/net/wireless/mwifiex/scan.c | 17 +-
drivers/net/wireless/mwifiex/sdio.h | 8 +-
drivers/net/wireless/mwifiex/sta_cmd.c | 98 +++
drivers/net/wireless/mwifiex/sta_cmdresp.c | 80 ++-
drivers/net/wireless/mwifiex/sta_event.c | 15 +-
drivers/net/wireless/mwifiex/sta_ioctl.c | 33 -
drivers/net/wireless/p54/main.c | 11 +-
drivers/net/wireless/p54/p54.h | 1 +
drivers/net/wireless/p54/p54usb.c | 195 ++++--
drivers/net/wireless/p54/p54usb.h | 3 +
drivers/net/wireless/p54/txrx.c | 3 +-
drivers/net/wireless/rt2x00/rt2x00.h | 2 +
drivers/net/wireless/rt2x00/rt2x00config.c | 5 +
drivers/net/wireless/rt2x00/rt2x00dev.c | 6 +-
drivers/net/wireless/rt2x00/rt2x00leds.c | 16 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 10 +
drivers/net/wireless/rt2x00/rt2x00queue.c | 41 +-
drivers/net/wireless/rtlwifi/base.c | 5 +-
drivers/net/wireless/rtlwifi/cam.c | 5 +-
drivers/net/wireless/rtlwifi/pci.c | 7 +-
drivers/net/wireless/rtlwifi/rc.c | 3 +-
drivers/net/wireless/rtlwifi/rtl8192ce/trx.h | 7 +-
drivers/net/wireless/rtlwifi/rtl8192de/sw.c | 6 -
drivers/net/wireless/rtlwifi/rtl8192de/trx.h | 8 +-
drivers/net/wireless/rtlwifi/rtl8192se/def.h | 7 +-
drivers/net/wireless/rtlwifi/rtl8192se/fw.h | 6 +-
drivers/net/wireless/rtlwifi/usb.c | 34 +-
drivers/net/wireless/rtlwifi/wifi.h | 30 +-
drivers/net/wireless/wl12xx/main.c | 5 +-
include/linux/ieee80211.h | 32 +-
include/linux/nl80211.h | 41 +-
include/net/bluetooth/hci.h | 3 +-
include/net/bluetooth/hci_core.h | 12 +-
include/net/bluetooth/mgmt.h | 2 +-
include/net/cfg80211.h | 33 +-
include/net/mac80211.h | 144 +++-
net/bluetooth/hci_core.c | 7 +
net/bluetooth/l2cap_core.c | 3 +
net/bluetooth/l2cap_sock.c | 5 +-
net/bluetooth/mgmt.c | 13 +-
net/mac80211/Kconfig | 11 +
net/mac80211/Makefile | 3 +-
net/mac80211/agg-rx.c | 18 +-
net/mac80211/agg-tx.c | 57 +-
net/mac80211/cfg.c | 60 ++-
net/mac80211/chan.c | 26 -
net/mac80211/debugfs_netdev.c | 83 +--
net/mac80211/debugfs_sta.c | 5 +-
net/mac80211/driver-ops.h | 41 +-
net/mac80211/driver-trace.h | 55 ++-
net/mac80211/ht.c | 9 -
net/mac80211/ibss.c | 22 +-
net/mac80211/ieee80211_i.h | 66 ++-
net/mac80211/iface.c | 150 ++++-
net/mac80211/main.c | 12 +-
net/mac80211/mesh.c | 53 +-
net/mac80211/mesh.h | 25 +-
net/mac80211/mesh_hwmp.c | 28 +-
net/mac80211/mesh_plink.c | 17 +-
net/mac80211/mesh_sync.c | 296 ++++++++
net/mac80211/mlme.c | 306 ++++----
net/mac80211/pm.c | 4 +
net/mac80211/rate.h | 7 +-
net/mac80211/rc80211_minstrel_ht.c | 15 +-
net/mac80211/rx.c | 10 +-
net/mac80211/sta_info.c | 16 +-
net/mac80211/sta_info.h | 11 +
net/mac80211/tx.c | 79 ++-
net/mac80211/util.c | 193 ++++--
net/mac80211/wme.c | 46 +-
net/mac80211/wme.h | 3 -
net/nfc/llcp/commands.c | 4 +-
net/wireless/core.c | 5 +-
net/wireless/mesh.c | 3 +
net/wireless/mlme.c | 59 ++-
net/wireless/nl80211.c | 92 ++-
net/wireless/nl80211.h | 4 +
net/wireless/reg.c | 10 +
net/wireless/scan.c | 2 +-
net/wireless/wext-core.c | 6 +-
185 files changed, 5524 insertions(+), 3085 deletions(-)
create mode 100644 drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c
create mode 100644 drivers/net/wireless/ath/ath9k/dfs_pattern_detector.h
create mode 100644 drivers/net/wireless/ath/ath9k/dfs_pri_detector.c
create mode 100644 drivers/net/wireless/ath/ath9k/dfs_pri_detector.h
create mode 100644 drivers/net/wireless/iwlwifi/iwl-phy-db.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-phy-db.h
create mode 100644 net/mac80211/mesh_sync.c
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 1/2] qlcnic: Add default swtich case in 'qlcnic_can_start_firmware()'
From: David Miller @ 2012-04-12 20:02 UTC (permalink / raw)
To: santoshprasadnayak
Cc: anirban.chakraborty, rajesh.borundia, sony.chacko, linux-driver,
netdev, kernel-janitors
In-Reply-To: <1333951187-4395-1-git-send-email-santoshprasadnayak@gmail.com>
You haven't told me what tree these two patches should be applied to,
so I am dropping them both.
Resubmit with a proper destination tree indication.
Thanks.
^ 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