On Tuesday 26 January 2016 14:27:20 Johannes Berg wrote: > Hi, > > CALL_TXH(ieee80211_tx_h_select_key); > > - if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) > > + if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL) && > > + !(info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT)) > > CALL_TXH(ieee80211_tx_h_rate_ctrl); > > This seems a bit problematic. ieee80211_tx_h_rate_ctrl() also sets up > some protection, e.g. > > info->control.use_rts = txrc.rts; > info->control.use_cts_prot = tx->sdata->vif.bss_conf.use_cts_prot; > > and preamble settings > > info->control.short_preamble = txrc.short_preamble; > > Are you sure you want to skip that entirely? You are correct, these should be set but rate_control_get_rate should be skipped. > > > + info->control.rates[0].flags = rate_flags; > > + if (rate_retries + 1 > local->hw.max_rate_tries) > > + info->control.rates[0].count = local- > > >hw.max_rate_tries; > > + else > > + info->control.rates[0].count = rate_retries > > + 1; > > max() or max_t()? min_t - but yes, you are right. Btw. we can also change it when you prefer that by default injected frames with rates but without DATA_RETRIES should get local->hw.max_rate_tries as retries. > > > /* process and remove the injection radiotap header */ > > - if (!ieee80211_parse_tx_radiotap(skb)) > > + if (!ieee80211_parse_tx_radiotap(skb, local)) > > goto fail; > > I'd prefer adding "local" as the first argument since that's far more > commonly done in mac80211. Ok, will be changed. Kind regards, Sven
Attachment:
signature.asc
Description: This is a digitally signed message part.