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.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
baee5a14ab
@ -502,8 +502,10 @@ static int dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len)
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
if (addr->family != AF_IEEE802154)
|
||||
if (addr->family != AF_IEEE802154) {
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ieee802154_addr_from_sa(&haddr, &addr->addr);
|
||||
dev = ieee802154_get_dev(sock_net(sk), &haddr);
|
||||
|
@ -132,7 +132,7 @@ static int
|
||||
ieee802154_parse_frame_start(struct sk_buff *skb, struct ieee802154_hdr *hdr)
|
||||
{
|
||||
int hlen;
|
||||
struct ieee802154_mac_cb *cb = mac_cb_init(skb);
|
||||
struct ieee802154_mac_cb *cb = mac_cb(skb);
|
||||
|
||||
skb_reset_mac_header(skb);
|
||||
|
||||
@ -294,8 +294,9 @@ void
|
||||
ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
|
||||
{
|
||||
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_queue_tail(&local->skb_queue, skb);
|
||||
tasklet_schedule(&local->tasklet);
|
||||
|
Loading…
Reference in New Issue
Block a user