From 9f7f78b479ae06279a85451d456040bbe4eae013 Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Fri, 5 Apr 2013 13:03:10 +0000 Subject: mac802154: Keep track of the channel when changed Two sections checked whether the current channel != the new channel without ever setting the current channel variables. 1. net/mac802154/tx.c: Prevent set_channel() from getting called every time a packet is sent. 2. net/mac802154/mib.c: Lock (pib_lock) accesses to current_channel and current_page and make sure they are updated when the channel has been changed. Signed-off-by: Alan Ott Signed-off-by: David S. Miller --- net/mac802154/tx.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/mac802154/tx.c') diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index 3fd3e07ec599..6d1647399d4f 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c @@ -58,6 +58,9 @@ static void mac802154_xmit_worker(struct work_struct *work) pr_debug("set_channel failed\n"); goto out; } + + xw->priv->phy->current_channel = xw->chan; + xw->priv->phy->current_page = xw->page; } res = xw->priv->ops->xmit(&xw->priv->hw, xw->skb); -- cgit v1.2.3-70-g09d2