Commit baee5a14 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge tag 'ieee802154-for-net-2022-10-24' of...

Merge tag 'ieee802154-for-net-2022-10-24' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan

Stefan Schmidt says:

====================
pull-request: ieee802154 for net 2022-10-24

Two fixup patches for return code changes of an earlier commit.
Wei Yongjun fixed a missed -EINVAL return on the recent change, while
Alexander Aring adds handling for unknown address type cases as well.

Miquel Raynal fixed a long standing issue with LQI value recording
which got broken 8 years ago. (It got more attention with the work
in progress enhancement in wpan).

* tag 'ieee802154-for-net-2022-10-24' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan:
  mac802154: Fix LQI recording
  net: ieee802154: fix error return code in dgram_bind()
  net: ieee802154: return -EINVAL for unknown addr type
====================

Link: https://lore.kernel.org/r/20221024102301.9433-1-stefan@datenfreihafen.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents fe1fd0cc 5a5c4e06
...@@ -502,8 +502,10 @@ static int dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len) ...@@ -502,8 +502,10 @@ static int dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len)
if (err < 0) if (err < 0)
goto out; goto out;
if (addr->family != AF_IEEE802154) if (addr->family != AF_IEEE802154) {
err = -EINVAL;
goto out; goto out;
}
ieee802154_addr_from_sa(&haddr, &addr->addr); ieee802154_addr_from_sa(&haddr, &addr->addr);
dev = ieee802154_get_dev(sock_net(sk), &haddr); dev = ieee802154_get_dev(sock_net(sk), &haddr);
......
...@@ -132,7 +132,7 @@ static int ...@@ -132,7 +132,7 @@ static int
ieee802154_parse_frame_start(struct sk_buff *skb, struct ieee802154_hdr *hdr) ieee802154_parse_frame_start(struct sk_buff *skb, struct ieee802154_hdr *hdr)
{ {
int hlen; int hlen;
struct ieee802154_mac_cb *cb = mac_cb_init(skb); struct ieee802154_mac_cb *cb = mac_cb(skb);
skb_reset_mac_header(skb); skb_reset_mac_header(skb);
...@@ -294,8 +294,9 @@ void ...@@ -294,8 +294,9 @@ void
ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
{ {
struct ieee802154_local *local = hw_to_local(hw); struct ieee802154_local *local = hw_to_local(hw);
struct ieee802154_mac_cb *cb = mac_cb_init(skb);
mac_cb(skb)->lqi = lqi; cb->lqi = lqi;
skb->pkt_type = IEEE802154_RX_MSG; skb->pkt_type = IEEE802154_RX_MSG;
skb_queue_tail(&local->skb_queue, skb); skb_queue_tail(&local->skb_queue, skb);
tasklet_schedule(&local->tasklet); tasklet_schedule(&local->tasklet);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment