Search Linux Wireless

Re: [RFC/RFT v3] mac80211: Add NEED_ALIGNED4_SKBS hw flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-01-14 13:32, Johannes Berg wrote:
> On Tue, 2016-01-05 at 14:06 +0100, Janusz Dziedzic wrote:
>>  	struct net_device *prev_dev = NULL;
>> +	unsigned int padsize, hdrlen;
>>  	int rtap_len;
>>  
>> +	/* Remove padding if was added */
>> +	if (ieee80211_hw_check(&local->hw, NEEDS_ALIGNED4_SKBS)) {
>> +		hdrlen = ieee80211_hdrlen(hdr->frame_control);
>> +		padsize = hdrlen & 3;
>> +
>> +		if (padsize && skb->len > hdrlen + padsize) {
>> +			memmove(skb->data + padsize, skb->data,
>> hdrlen);
>> +			skb_pull(skb, padsize);
>> +		}
>> +	}
> 
> But perhaps this should just be done by the driver?
I think it's better to do it here, because the driver can't know if a
frame will end up on a (cooked) monitor interface.

>> +	/* Check if aligned skb required */
>> +	if (ieee80211_hw_check(&local->hw, NEEDS_ALIGNED4_SKBS))
>> +		build.hdr_len += build.hdr_len & 3;
> 
> Pretty sure you need to increase the reserved space in the fast-xmit
> struct?
Is the round_up he added not enough?

- Felix
--
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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux