net: l2: ieee802154: Fix a wrong channel change during association
The current association logic starts by changing the channel. The way it is done is wrong because it dereferences req->channel which is simply not initialized by the caller. But anyway, the command itself does not support providing a channel so we must already be on the right one when trying to associate. Hence, drop this channel change call. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
31b35973e3
commit
6a11e79b4b
1 changed files with 0 additions and 6 deletions
|
@ -353,12 +353,6 @@ static int ieee802154_associate(uint32_t mgmt_request, struct net_if *iface,
|
|||
params.dst.pan_id = req->pan_id;
|
||||
params.pan_id = req->pan_id;
|
||||
|
||||
/* Set channel first */
|
||||
if (ieee802154_set_channel(iface, req->channel)) {
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
pkt = ieee802154_create_mac_cmd_frame(
|
||||
iface, IEEE802154_CFI_ASSOCIATION_REQUEST, ¶ms);
|
||||
if (!pkt) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue