Search Linux Wireless

Re: [PATCH Try#lucky13 3/3] mac80211: Monitor mode radiotap-based packet injection

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

 



Nothing about this patch, I'm fine with it, but a comment for future use
cases of this where we'll need some changes.

> @@ -1284,15 +1442,26 @@ static int ieee80211_tx(struct net_devic
>  		return 0;
>  	}
>  
> -	__ieee80211_tx_prepare(&tx, skb, dev, control);
> +	res_prepare = __ieee80211_tx_prepare(&tx, skb, dev, control);
> +
> +	if (res_prepare == TXRX_DROP) {
> +		dev_kfree_skb(skb);
> +		return 0;
> +	}
> +
>  	sta = tx.sta;
>  	tx.u.tx.mgmt_interface = mgmt;
>  	tx.u.tx.mode = local->hw.conf.mode;
>  
> -	for (handler = local->tx_handlers; *handler != NULL; handler++) {
> -		res = (*handler)(&tx);
> -		if (res != TXRX_CONTINUE)
> -			break;
> +	if (res_prepare == TXRX_QUEUED) { /* if it was an injected packet */
> +		res = TXRX_CONTINUE;
> +	} else {
> +		for (handler = local->tx_handlers; *handler != NULL;
> +		     handler++) {
> +			res = (*handler)(&tx);
> +			if (res != TXRX_CONTINUE)
> +				break;
> +		}

I think I mentioned it before; we'll have to split up TX handlers here
to get proper sequence numbering for devices that do it in software,
otherwise we won't be able to send packets with the right sequence
number on such devices.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux