On Wed, 2023-12-20 at 17:40 +0100, Martin Kaistra wrote: > > Am 20.12.23 um 07:14 schrieb Ping-Ke Shih: > > > > > > I checked where driver assign macid, and only > > > > if (vif->type == NL80211_IFTYPE_AP) { > > sta_info->macid = rtl8xxxu_acquire_macid(priv); > > > > That means STA mode can be macid == 0 always, right? > > This will be a problem. At least TX rate will be incorrect. > > Yes, currently macid for STA mode is always 0. Would it be enough to set macid > in STA mode to either 0 or 1 depending on port_num? > I am not very sure if macid 0 plays a special role, but others (macid >= 1) can be dynamically assigned to each stations. I think we can reserve macid 0 and 1 for port 0 and 1 respectively, and dynamically assign macid 2 or larger to TDLS or AP mode peer, like macid port num STA mode AP mode ------ ---------- ------------- --------------------------- 0 0 to/from AP broadcast 1 1 to/from AP X 2~ 0 or 1 to/from TDLS to/from connected station