Johannes Berg <johan...@sipsolutions.net> writes:
> On Mon, 2015-10-05 at 14:49 -0400, Jes Sorensen wrote:
>> 
>> Finally went back to look at this - I believe this is exactly what I am
>> doing in the driver right now. Pulling the short_preamble info from
>> BSS_CHANGED_ERP_PREAMBLE and storing it sta->drv_priv for use in the
>> tx function.
>> 
>
> You can't really be doing that since you don't get a sta pointer with
> BSS_CHANGED_ERP_PREAMBLE?

I have this in the code - that said, I may not be getting a pointer back
ever?

        if (changed & BSS_CHANGED_ERP_PREAMBLE) {
                dev_dbg(dev, "Changed ERP_PREAMBLE: Use short preamble %i\n",
                        bss_conf->use_short_preamble);
                val32 = rtl8xxxu_read32(priv, REG_RESPONSE_RATE_SET);
                if (bss_conf->use_short_preamble)
                        val32 |= RSR_ACK_SHORT_PREAMBLE;
                else
                        val32 &= ~RSR_ACK_SHORT_PREAMBLE;
                rtl8xxxu_write32(priv, REG_RESPONSE_RATE_SET, val32);

                rcu_read_lock();
                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;
                }
                rcu_read_unlock();
        }

So what was it you were suggesting instead? I think I am confused now.

Cheers,
Jes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to