From: Alan Ott <alan@signal11.us>
To: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Alan Ott <alan@signal11.us>
Subject: [PATCH 2/6] mac802154: Move xmit_attemps to stack
Date: Tue, 2 Apr 2013 14:47:57 -0400 [thread overview]
Message-ID: <1364928481-1813-3-git-send-email-alan@signal11.us> (raw)
In-Reply-To: <1364928481-1813-1-git-send-email-alan@signal11.us>
There's no reason to have it in the work struct anymore.
Signed-off-by: Alan Ott <alan@signal11.us>
---
net/mac802154/tx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index fbf937c..a248246 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -39,12 +39,12 @@ struct xmit_work {
struct mac802154_priv *priv;
u8 chan;
u8 page;
- u8 xmit_attempts;
};
static void mac802154_xmit_worker(struct work_struct *work)
{
struct xmit_work *xw = container_of(work, struct xmit_work, work);
+ u8 xmit_attempts = 0;
int res;
mutex_lock(&xw->priv->phy->pib_lock);
@@ -61,7 +61,7 @@ static void mac802154_xmit_worker(struct work_struct *work)
do {
res = xw->priv->ops->xmit(&xw->priv->hw, xw->skb);
- if (res && ++xw->xmit_attempts >= MAC802154_MAX_XMIT_ATTEMPTS) {
+ if (res && ++xmit_attempts >= MAC802154_MAX_XMIT_ATTEMPTS) {
pr_debug("transmission failed for %d times",
MAC802154_MAX_XMIT_ATTEMPTS);
break;
@@ -113,7 +113,6 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb,
work->priv = priv;
work->page = page;
work->chan = chan;
- work->xmit_attempts = 0;
queue_work(priv->dev_workqueue, &work->work);
--
1.7.11.2
next prev parent reply other threads:[~2013-04-02 18:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 18:47 [PATCH 0/6] 802.15.4 and 6LoWPAN Buffering Fixes Alan Ott
2013-04-02 18:47 ` [PATCH 1/6] mac802154: Immediately retry sending failed packets Alan Ott
[not found] ` <CAJmB2rCr5ds11+iN=W5GCKsUgdfb57uKg+mH4NY4CWw6EFCTbg@mail.gmail.com>
2013-04-02 20:28 ` Alan Ott
2013-04-02 21:28 ` Alan Ott
2013-04-02 22:35 ` Alan Ott
2013-04-02 23:13 ` [Linux-zigbee-devel] " Werner Almesberger
2013-04-03 1:24 ` Alan Ott
2013-04-03 1:56 ` David Miller
2013-04-03 1:59 ` Alan Ott
2013-04-03 2:03 ` David Miller
2013-04-03 2:25 ` Alan Ott
2013-04-03 2:30 ` David Miller
2013-04-03 2:57 ` Alan Ott
2013-04-03 2:38 ` Werner Almesberger
2013-04-02 18:47 ` Alan Ott [this message]
2013-04-02 18:47 ` [PATCH 3/6] mac802154: Use netif flow control Alan Ott
2013-04-02 21:21 ` Sergei Shtylyov
2013-04-02 18:47 ` [PATCH 4/6] mac802154: Increase tx_buffer_len Alan Ott
2013-04-02 18:48 ` [PATCH 5/6] 6lowpan: handle dev_queue_xmit error code properly Alan Ott
2013-04-02 18:48 ` [PATCH 6/6] 6lowpan: return the dev_queue_xmit() return value from lowpan_xmit() Alan Ott
2013-04-03 14:00 ` [PATCH v2 0/4] 802.15.4 and 6LoWPAN Buffering Fixes Alan Ott
2013-04-03 14:00 ` [PATCH v2 1/4] mac802154: Do not try to resend failed packets Alan Ott
2013-04-03 14:00 ` [PATCH v2 2/4] mac802154: Use netif flow control Alan Ott
2013-04-03 14:00 ` [PATCH v2 3/4] mac802154: Increase tx_buffer_len Alan Ott
2013-04-03 14:00 ` [PATCH v2 4/4] 6lowpan: handle dev_queue_xmit() error code properly Alan Ott
2013-04-07 21:06 ` [PATCH v2 0/4] 802.15.4 and 6LoWPAN Buffering Fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364928481-1813-3-git-send-email-alan@signal11.us \
--to=alan@signal11.us \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=davem@davemloft.net \
--cc=dbaryshkov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®