On 09/28/2010 10:48 AM, Johannes Berg wrote:
On Tue, 2010-09-28 at 10:25 -0700, Ben Greear wrote:
This way, you don't need to pass vif to ieee80211_rts_duration.
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1264,6 +1264,14 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
}
info->flags |= IEEE80211_TX_CTL_FIRST_FRAGMENT;
+ /* Set this here so drivers don't need to reference vif
+ * when calling ieee80211_rts_duration
+ */
+ if (sdata->vif.bss_conf.use_short_preamble)
+ tx.flags |= IEEE80211_TX_SHORT_PREABLE;
+ if (sdata->flags& IEEE80211_SDATA_OPERATING_GMODE)
+ tx.flags |= IEEE80211_TX_GMODE
Don't understand -- tx.flags? Drivers don't reference that? How would a
driver use this?
Sorry, it should be info->flags,
and missing a semi-colon...I guess I forgot to compile :P
Anyway, the reason is that the driver may not know the VIF (and
vif may be deleted) when calling the ieee80211_rts_duration, so it needs to be stored
in the tx_info structure.
Thanks,
Ben
johannes
--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com
--
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