Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55307 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbbJETTK (ORCPT ); Mon, 5 Oct 2015 15:19:10 -0400 From: Jes Sorensen To: Johannes Berg Cc: Sujith Manoharan , linux-wireless@vger.kernel.org, kvalo@codeaurora.org, Larry.Finger@lwfinger.net Subject: Re: [PATCH 1/1] New driver: rtl8xxxu (mac80211) References: <1440883083-32498-1-git-send-email-Jes.Sorensen@redhat.com> <1440883083-32498-2-git-send-email-Jes.Sorensen@redhat.com> <1441032517.13980.21.camel@sipsolutions.net> <1441120044.2441.9.camel@sipsolutions.net> <1441275474.2565.18.camel@sipsolutions.net> <21994.26976.882903.355191@gargle.gargle.HOWL> <1442508413.2821.11.camel@sipsolutions.net> <1444071403.21467.0.camel@sipsolutions.net> <1444072372.1962.1.camel@sipsolutions.net> Date: Mon, 05 Oct 2015 15:19:09 -0400 In-Reply-To: <1444072372.1962.1.camel@sipsolutions.net> (Johannes Berg's message of "Mon, 05 Oct 2015 21:12:52 +0200") Message-ID: (sfid-20151005_211913_697944_5E686BB6) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: Johannes Berg 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? Cheers, Jes