> > Well, it depends how deep we go, I guess? I mean, we could go all the > > way down to the PHY layer, but then we're _really_ in ns3 territory and > > it's probably not worth it... OTOH, to fully integrate the firmware, we > > probably do need this eventually. But I'd rather not reinvent ns3 here, > > obviously :) > I think it's not the phy but the lower MAC layer, which at least need to > be adapted to the hwsim interface. Although it has no extreme > computational effort, its not that easy to implement. Depending on your > envisioned setup this might already be done in your firmware. Yeah, I think so. > Thy phy > layer will bring much higher timing precision, when the right models are > applied, but will greatly impact the simulation speed. Right. No good for this, I think. And anyway then we're looking at ns-3 I guess. Though I couldn't figure out yesterday how we could possibly integrate all this simulation setup into ns-3. > > int ack_time_usec = pkt_duration(14, index_to_rate(0, frame->freq)) + > > sifs; > > > > but this is incorrect ... so arguably we need that *anyway*? > > Actually you are right. Currently, we apply this by a priori knowledge. > Maybe a silly Idea, but could we interleave the cfg80211/nl80211 > protocol on the virtio channel to get the configuration information? It'd really have to be the *mac80211* protocol, which is based only on function calls etc. so we have to build a messaging layer around it ... which basically is mac80211-hwsim, right? > > I guess I'd start with actually subjecting the ACK to "channel > > conditions", but I'd actually want to be able to hook into the TX/RX in > > some way from the external MAC too ... I just don't think we need to > > treat hwsim as an external MAC because that just complicates the whole > > thing? > > > > Well, honestly, I have no idea :) > > Mhh I don't really get what you mean by that. Why can't you hook into > RX/TX with a simulated ACK ? I guess I could, but then I have to worry about all kinds of MAC capabilities? I mean, essentially I'd end up building a MAC for hwsim, in some integrated fashion, which seems like it probably should've been done in ns-3 already or such? > > > > Or perhaps then that's too much complexity and I should just teach ns3 > > > > the hwsim virtio interface? > > > Up to you :) > > It should be definitely possible. But I'm asking my self how good that > interacts with your firmware simulation. Well, ns-3 *is* layered, no? Arguably then I should be able to remove the MAC layer and put in my own, hooking into the PHY layer signals? But I quickly got lost in the documentation there, and it's not really what I need right now anyway ... johannes