diff mbox series

mac802154_hwsim: define perm_extended_addr initialization

Message ID 20250329142010.17389-1-ramonreisfontes@gmail.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series mac802154_hwsim: define perm_extended_addr initialization | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 3 maintainers not CCed: edumazet@google.com andrew+netdev@lunn.ch stefan@datenfreihafen.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 82 exceeds 80 columns
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-03-31--03-00 (tests: 891)

Commit Message

Ramon Fontes March 29, 2025, 2:20 p.m. UTC
This establishes an initialization method for perm_extended_addr,
aligning it with the approach used in mac80211_hwsim.

Signed-off-by: Ramon Fontes <ramonreisfontes@gmail.com>
---
 drivers/net/ieee802154/mac802154_hwsim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miquel Raynal March 31, 2025, 8:15 a.m. UTC | #1
On 29/03/2025 at 11:20:10 -03, Ramon Fontes <ramonreisfontes@gmail.com> wrote:

> This establishes an initialization method for perm_extended_addr,
> aligning it with the approach used in mac80211_hwsim.
>
> Signed-off-by: Ramon Fontes <ramonreisfontes@gmail.com>

Yeah, that's simpler, thanks Alex.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
diff mbox series

Patch

diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
index 1cab20b5a..2f7520454 100644
--- a/drivers/net/ieee802154/mac802154_hwsim.c
+++ b/drivers/net/ieee802154/mac802154_hwsim.c
@@ -942,7 +942,7 @@  static int hwsim_add_one(struct genl_info *info, struct device *dev,
 	/* 950 MHz GFSK 802.15.4d-2009 */
 	hw->phy->supported.channels[6] |= 0x3ffc00;
 
-	ieee802154_random_extended_addr(&hw->phy->perm_extended_addr);
+	hw->phy->perm_extended_addr = cpu_to_le64(((u64)0x02 << 56) | ((u64)idx));
 
 	/* hwsim phy channel 13 as default */
 	hw->phy->current_channel = 13;