Skip to content

Commit 010a2a6

Browse files
committed
Merge tag 'ieee802154-for-net-2022-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
Stefan Schmidt says: ==================== pull-request: ieee802154 for net 2022-01-28 An update from ieee802154 for your *net* tree. A bunch of fixes in drivers, all from Miquel Raynal. Clarifying the default channel in hwsim, leak fixes in at86rf230 and ca8210 as well as a symbol duration fix for mcr20a. Topping up the driver fixes with better error codes in nl802154 and a cleanup in MAINTAINERS for an orphaned driver. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 1f84a94 + 5d8a8b3 commit 010a2a6

File tree

6 files changed

+20
-10
lines changed

6 files changed

+20
-10
lines changed

MAINTAINERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4157,9 +4157,8 @@ N: csky
41574157
K: csky
41584158

41594159
CA8210 IEEE-802.15.4 RADIO DRIVER
4160-
M: Harry Morris <[email protected]>
41614160
4162-
S: Maintained
4161+
S: Orphan
41634162
W: https://github.com/Cascoda/ca8210-linux.git
41644163
F: Documentation/devicetree/bindings/net/ieee802154/ca8210.txt
41654164
F: drivers/net/ieee802154/ca8210.c

drivers/net/ieee802154/at86rf230.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ struct at86rf230_local {
100100
unsigned long cal_timeout;
101101
bool is_tx;
102102
bool is_tx_from_off;
103+
bool was_tx;
103104
u8 tx_retry;
104105
struct sk_buff *tx_skb;
105106
struct at86rf230_state_change tx;
@@ -343,7 +344,11 @@ at86rf230_async_error_recover_complete(void *context)
343344
if (ctx->free)
344345
kfree(ctx);
345346

346-
ieee802154_wake_queue(lp->hw);
347+
if (lp->was_tx) {
348+
lp->was_tx = 0;
349+
dev_kfree_skb_any(lp->tx_skb);
350+
ieee802154_wake_queue(lp->hw);
351+
}
347352
}
348353

349354
static void
@@ -352,7 +357,11 @@ at86rf230_async_error_recover(void *context)
352357
struct at86rf230_state_change *ctx = context;
353358
struct at86rf230_local *lp = ctx->lp;
354359

355-
lp->is_tx = 0;
360+
if (lp->is_tx) {
361+
lp->was_tx = 1;
362+
lp->is_tx = 0;
363+
}
364+
356365
at86rf230_async_state_change(lp, ctx, STATE_RX_AACK_ON,
357366
at86rf230_async_error_recover_complete);
358367
}

drivers/net/ieee802154/ca8210.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,7 @@ static int ca8210_async_xmit_complete(
17711771
status
17721772
);
17731773
if (status != MAC_TRANSACTION_OVERFLOW) {
1774+
dev_kfree_skb_any(priv->tx_skb);
17741775
ieee802154_wake_queue(priv->hw);
17751776
return 0;
17761777
}

drivers/net/ieee802154/mac802154_hwsim.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev,
786786
goto err_pib;
787787
}
788788

789+
pib->channel = 13;
789790
rcu_assign_pointer(phy->pib, pib);
790791
phy->idx = idx;
791792
INIT_LIST_HEAD(&phy->edges);

drivers/net/ieee802154/mcr20a.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,8 @@ static void mcr20a_hw_setup(struct mcr20a_local *lp)
976976
dev_dbg(printdev(lp), "%s\n", __func__);
977977

978978
phy->symbol_duration = 16;
979-
phy->lifs_period = 40;
980-
phy->sifs_period = 12;
979+
phy->lifs_period = 40 * phy->symbol_duration;
980+
phy->sifs_period = 12 * phy->symbol_duration;
981981

982982
hw->flags = IEEE802154_HW_TX_OMIT_CKSUM |
983983
IEEE802154_HW_AFILT |

net/ieee802154/nl802154.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ static int nl802154_send_key(struct sk_buff *msg, u32 cmd, u32 portid,
14411441

14421442
hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
14431443
if (!hdr)
1444-
return -1;
1444+
return -ENOBUFS;
14451445

14461446
if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex))
14471447
goto nla_put_failure;
@@ -1634,7 +1634,7 @@ static int nl802154_send_device(struct sk_buff *msg, u32 cmd, u32 portid,
16341634

16351635
hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
16361636
if (!hdr)
1637-
return -1;
1637+
return -ENOBUFS;
16381638

16391639
if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex))
16401640
goto nla_put_failure;
@@ -1812,7 +1812,7 @@ static int nl802154_send_devkey(struct sk_buff *msg, u32 cmd, u32 portid,
18121812

18131813
hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
18141814
if (!hdr)
1815-
return -1;
1815+
return -ENOBUFS;
18161816

18171817
if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex))
18181818
goto nla_put_failure;
@@ -1988,7 +1988,7 @@ static int nl802154_send_seclevel(struct sk_buff *msg, u32 cmd, u32 portid,
19881988

19891989
hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
19901990
if (!hdr)
1991-
return -1;
1991+
return -ENOBUFS;
19921992

19931993
if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex))
19941994
goto nla_put_failure;

0 commit comments

Comments
 (0)