Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes: > On Mon, 2015-10-05 at 15:19 -0400, Jes Sorensen wrote: >> Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes: >> > On Mon, 2015-10-05 at 15:04 -0400, Jes Sorensen wrote: >> > > >> > > I have this in the code - that said, I may not be getting a >> > > pointer >> > > back ever? >> > > >> > > if (changed & BSS_CHANGED_ERP_PREAMBLE) { >> > > ... >> > > sta = ieee80211_find_sta(vif, bss_conf->bssid); >> > > if (sta) { >> > > sta_priv = (struct rtl8xxxu_sta_priv >> > > *)sta >> > > ->drv_priv; >> > > if (bss_conf->use_short_preamble) >> > > sta_priv->short_preamble = true; >> > > else >> > > sta_priv->short_preamble = >> > > false; >> > > >> > >> > Ah, ok. You'd of course get a pointer back here - but it's >> > pointless. >> > >> > You might as well store the value in some private vif data, or >> > perhaps >> > just use vif->bss_conf.use_short_preamble in the place that you're >> > now >> > using sta_priv->short_preamble - the point was that a per-station >> > setting of short-preamble doesn't make sense, it needs to be per >> > -vif. >> >> I see - what is the correct way to get to the vif from with the .tx() >> function then? > > You have a pointer right there in the skb's cb (info) [though it might > be NULL in some rare cases] Think I got it right now - this allowed me to get rid of the sta_priv stuff as well. Thanks a lot for the help! Cheers, Jes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html