Skip to content

Commit

Permalink
Merge tag 'ieee802154-for-net-2022-01-28' of git://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/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]>
  • Loading branch information
davem330 committed Jan 28, 2022
2 parents 1f84a94 + 5d8a8b3 commit 010a2a6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
3 changes: 1 addition & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4157,9 +4157,8 @@ N: csky
K: csky

CA8210 IEEE-802.15.4 RADIO DRIVER
M: Harry Morris <[email protected]>
L: [email protected]
S: Maintained
S: Orphan
W: https://github.com/Cascoda/ca8210-linux.git
F: Documentation/devicetree/bindings/net/ieee802154/ca8210.txt
F: drivers/net/ieee802154/ca8210.c
Expand Down
13 changes: 11 additions & 2 deletions drivers/net/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct at86rf230_local {
unsigned long cal_timeout;
bool is_tx;
bool is_tx_from_off;
bool was_tx;
u8 tx_retry;
struct sk_buff *tx_skb;
struct at86rf230_state_change tx;
Expand Down Expand Up @@ -343,7 +344,11 @@ at86rf230_async_error_recover_complete(void *context)
if (ctx->free)
kfree(ctx);

ieee802154_wake_queue(lp->hw);
if (lp->was_tx) {
lp->was_tx = 0;
dev_kfree_skb_any(lp->tx_skb);
ieee802154_wake_queue(lp->hw);
}
}

static void
Expand All @@ -352,7 +357,11 @@ at86rf230_async_error_recover(void *context)
struct at86rf230_state_change *ctx = context;
struct at86rf230_local *lp = ctx->lp;

lp->is_tx = 0;
if (lp->is_tx) {
lp->was_tx = 1;
lp->is_tx = 0;
}

at86rf230_async_state_change(lp, ctx, STATE_RX_AACK_ON,
at86rf230_async_error_recover_complete);
}
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ieee802154/ca8210.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,7 @@ static int ca8210_async_xmit_complete(
status
);
if (status != MAC_TRANSACTION_OVERFLOW) {
dev_kfree_skb_any(priv->tx_skb);
ieee802154_wake_queue(priv->hw);
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ieee802154/mac802154_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev,
goto err_pib;
}

pib->channel = 13;
rcu_assign_pointer(phy->pib, pib);
phy->idx = idx;
INIT_LIST_HEAD(&phy->edges);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ieee802154/mcr20a.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,8 @@ static void mcr20a_hw_setup(struct mcr20a_local *lp)
dev_dbg(printdev(lp), "%s\n", __func__);

phy->symbol_duration = 16;
phy->lifs_period = 40;
phy->sifs_period = 12;
phy->lifs_period = 40 * phy->symbol_duration;
phy->sifs_period = 12 * phy->symbol_duration;

hw->flags = IEEE802154_HW_TX_OMIT_CKSUM |
IEEE802154_HW_AFILT |
Expand Down
8 changes: 4 additions & 4 deletions net/ieee802154/nl802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ static int nl802154_send_key(struct sk_buff *msg, u32 cmd, u32 portid,

hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
if (!hdr)
return -1;
return -ENOBUFS;

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

hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
if (!hdr)
return -1;
return -ENOBUFS;

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

hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
if (!hdr)
return -1;
return -ENOBUFS;

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

hdr = nl802154hdr_put(msg, portid, seq, flags, cmd);
if (!hdr)
return -1;
return -ENOBUFS;

if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex))
goto nla_put_failure;
Expand Down

0 comments on commit 010a2a6

Please sign in to comment.