On 11 May 2015 at 15:11, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Mon, 2015-05-11 at 13:05 +0000, Michal Kazior wrote: [...] >> +static bool >> +ieee80211_need_crypto_tx_tailroom(struct ieee80211_sub_if_data *sdata) >> +{ >> + struct ieee80211_sub_if_data *parent_sdata; >> + >> + if (sdata->crypto_tx_tailroom_needed_cnt) >> + return true; >> + >> + if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN && sdata->bss) { >> + parent_sdata = container_of(sdata->bss, >> + struct ieee80211_sub_if_data, >> + u.ap); >> + if (parent_sdata->crypto_tx_tailroom_needed_cnt) >> + return true; >> + } >> + >> + return false; >> +} >> + >> static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, >> struct sk_buff *skb, >> int head_need, bool may_encrypt) >> @@ -1600,7 +1619,7 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, >> struct ieee80211_local *local = sdata->local; >> int tail_need = 0; >> >> - if (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt) { >> + if (may_encrypt && ieee80211_need_crypto_tx_tailroom(sdata)) { > > This makes that check far more inefficient - I think you should write it > differently and have the management code copy the value to the VLAN > interfaces so the existing check here is sufficient. I didn't want to pre-optimize but you're probably right. I'll look into it more. Thanks! Michał -- 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