[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230918093659.6488891a@xps-13>
Date: Mon, 18 Sep 2023 09:36:59 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Stefan Schmidt <stefan@...enfreihafen.org>
Cc: Alexander Aring <alex.aring@...il.com>, linux-wpan@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
netdev@...r.kernel.org, David Girault <david.girault@...vo.com>, Romuald
Despres <romuald.despres@...vo.com>, Frederic Blain
<frederic.blain@...vo.com>, Nicolas Schodet <nico@...fr.eu.org>, Guilhem
Imberton <guilhem.imberton@...vo.com>, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH wpan-next v2 07/11] mac802154: Handle association
requests from peers
Hi Stefan,
> > +static int
> > +mac802154_send_association_resp_locked(struct ieee802154_sub_if_data *sdata,
> > + struct ieee802154_pan_device *target,
> > + struct ieee802154_assoc_resp_pl *assoc_resp_pl)
> > +{
> > + u64 teaddr = swab64((__force u64)target->extended_addr);
> > + struct ieee802154_association_resp_frame frame = {};
> > + struct ieee802154_local *local = sdata->local;
> > + struct wpan_dev *wpan_dev = &sdata->wpan_dev;
> > + struct sk_buff *skb;
> > + int ret;
> > +
> > + frame.mhr.fc.type = IEEE802154_FC_TYPE_MAC_CMD;
> > + frame.mhr.fc.security_enabled = 0;
> > + frame.mhr.fc.frame_pending = 0;
> > + frame.mhr.fc.ack_request = 1; /* We always expect an ack here */
> > + frame.mhr.fc.intra_pan = 1;
> > + frame.mhr.fc.dest_addr_mode = IEEE802154_EXTENDED_ADDRESSING;
> > + frame.mhr.fc.version = IEEE802154_2003_STD;
> > + frame.mhr.fc.source_addr_mode = IEEE802154_EXTENDED_ADDRESSING;
> > + frame.mhr.seq = 10;
>
> Where does the 10 come from and what is the meaning?
Good point, that is a leftover from my earlier WIP versions. A few lines
below this is overwritten by:
frame.mhr.seq = atomic_inc_return(&wpan_dev->dsn) & 0xFF;
I'll of course drop the `seq = 10` line.
Thanks,
Miquèl
Powered by blists - more mailing lists