Search Linux Wireless

Re: [PATCH v7 2/5] mt76: mt76x02: split beaconing

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

 



On Wed, Nov 20, 2019 at 11:28:23PM +0100, Markus Theil wrote:
> Sending beacons to the hardware always happens in batches. In order to
> speed up beacon processing on usb devices, this patch splits out common
> code an calls it only once (mt76x02_mac_set_beacon_prepare,
> mt76x02_mac_set_beacon_finish). Making this split breaks beacon
> enabling/disabling per vif. This is fixed by adding a call to set the
> bypass mask, if beaconing should be disabled for a vif. Otherwise the
> beacon is send after the next beacon interval.
> 
> The code is also adapted for the mmio part of the driver, but should not
> have any performance implication there.
<snip>
> +	 */
> +	if (mt76_is_usb(&dev->mt76)) {
> +		struct mt76x02_txwi *txwi;
> +
> +		mt76_insert_hdr_pad(skb);
> +		txwi = (struct mt76x02_txwi *)(skb->data - sizeof(*txwi));
> +		mt76x02_mac_write_txwi(dev, txwi, skb, NULL, NULL, skb->len);
> +		skb_push(skb, sizeof(*txwi));
> +	} else {
> +		struct mt76x02_txwi txwi;
>  
> -	mt76_wr_copy(dev, offset, &txwi, sizeof(txwi));
> -	offset += sizeof(txwi);
> +		mt76_wr_copy(dev, offset, &txwi, sizeof(txwi));
> +		offset += sizeof(txwi);
> +	}

You merged another patch into this one. Please keep them separated.

> +void mt76x02_mac_set_beacon_finish(struct mt76x02_dev *dev)
> +{
> +	mt76_rmw_field(dev, MT_MAC_BSSID_DW1, MT_MAC_BSSID_DW1_MBEACON_N,
> +		       hweight8(dev->beacon_data_mask) - 1);
> +	mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xff00 | ~dev->beacon_data_mask);
> +}

Well, this code still does not look quite right. At least it is not
compatible what the BCN_BYPASS_MASK description said in the manual.

I think the code need serious testing on multi-bss (USB support up
to 2  AP bssids) and with broadcast/multicast with some PS stations
on the network.

In particular adding second bssid and remove first one should
be checked.

Stanislaw





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

  Powered by Linux