From: Jouni Malinen <j@w1.fi>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH RFC] mac80211_hwsim
Date: Wed, 11 Jun 2008 09:57:19 +0300 [thread overview]
Message-ID: <20080611065719.GB7377@jm.kir.nu> (raw)
In-Reply-To: <1213124444.3668.48.camel@johannes.berg>
On Tue, Jun 10, 2008 at 09:00:44PM +0200, Johannes Berg wrote:
> Should we add it to Documentation/networking/ instead? Don't care much,
> but it might be easier to track version changes that way.
That's fine, too. I'll add a subdirectory there for the readme and
example configuration files.
> > +static const struct ieee80211_rate hwsim_rates[] = {
> > + { .bitrate = 60, .flags = IEEE80211_RATE_ERP_G },
>
> You don't need to add the ERP flag manually, it'll be added based on the
> rate automatically.
That sounds better. net/wireless.h was bit confusing on this part since
it has the "filled by the core" notice only for
IEEE80211_RATE_MANDATORY_* flags, not for IEEE80211_RATE_ERP_G. Looks
like this should be added to the ERP flag, too.
> > + if (is_multicast_ether_addr(hdr->addr1))
> > + ack = 1;
>
> That seems a bit weird to me. mac80211 shouldn't request an ACK for
> mcast, but why fake one?
That was leftover from the previous version that did not check whether
IEEE80211_TX_CTL_NO_ACK was used. I'll remove it.
>
> > ... beacon ...
> > + if (vif->type != IEEE80211_IF_TYPE_AP)
> > + return;
>
> That could support mesh as well, in mesh-beacon-like-AP mode rather than
> mesh-beacon-like-IBSS.
Yes. I'm not yet very familiar with the mesh implementation in mac80211
and did not want to enable things before having had chance to test them.
> > + data->channel->band != data2->channel->band ||
> > + data->channel->center_freq != data2->channel->center_freq)
>
> The band check is useless since the frequency is in MHz, it's mostly to
> know which band table to look up things in if necessary.
OK, I'll remove it. With the current bands this seems to be fine, but
how would that work with 10 MHz and 5 MHz channels? I haven't verified,
but I would assume they could use same center frequency with 20 MHz
channels..
> > + ieee80211_iterate_active_interfaces(hw, mac80211_hwsim_beacon_tx, hw);
>
> Cool, another user of this API :)
I was first assuming that I have to implement some sort of data
structure to store all vifs in the driver code to do this, but this one
came in quite handy..
> > + data->rx_filter = 0;
> > + if (*total_flags & FIF_PROMISC_IN_BSS)
> > + data->rx_filter |= FIF_PROMISC_IN_BSS;
> You don't actually seem to use these flags though. Should be added at
> some point, I think.
Yes, I left it there for future implementation of the actually
filtering logic.
> > + memcpy(data->channels, hwsim_channels, sizeof(hwsim_channels));
> You shouldn't need to memcpy these, just point to the static
> allocations.
> > + hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &data->band;
>
> You can even allocate the band struct statically.
Hmm.. Aren't the channel and rate structures being modified by
mac80211/wireless code? Sharing the same global data area for all radios
might not be desired if there will be different "hw" capabilities as far
as supported channels/rates/bands are concerned. In addition, the static
data structures were marked 'const' which would at least be somewhat
confusing if the data ends up changing.
--
Jouni Malinen PGP id EFC895FA
next prev parent reply other threads:[~2008-06-11 6:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 10:50 mac80211_hwsim - simulator of 802.11 radios for mac80211 Jouni Malinen
2008-06-10 11:16 ` Johannes Berg
2008-06-10 12:30 ` John W. Linville
2008-06-10 13:11 ` Johannes Berg
2008-06-10 15:24 ` John W. Linville
2008-06-10 18:37 ` [PATCH RFC] mac80211_hwsim Jouni Malinen
2008-06-10 19:00 ` Johannes Berg
2008-06-11 6:57 ` Jouni Malinen [this message]
2008-06-11 12:07 ` Johannes Berg
2008-06-11 12:54 ` Tomas Winkler
2008-06-10 12:47 ` mac80211_hwsim - simulator of 802.11 radios for mac80211 Jouni Malinen
2008-06-10 13:09 ` Johannes Berg
2008-06-10 13:12 ` Johannes Berg
2008-06-10 15:02 ` Jouni Malinen
2008-06-10 15:11 ` Johannes Berg
2008-06-10 16:31 ` Jouni Malinen
2008-06-10 14:22 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080611065719.GB7377@jm.kir.nu \
--to=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).