Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/5] mac80211: fix and optimize MCS mask handling
Date: Mon, 15 Apr 2013 16:19:43 +0200
Message-ID: <516C0C7F.3000204@openwrt.org> (raw)
In-Reply-To: <1366033124.8361.22.camel@jlt4.sipsolutions.net>

On 2013-04-15 3:38 PM, Johannes Berg wrote:
> 
>>  	for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>> +		struct ieee80211_supported_band *sband = wiphy->bands[i];
>> +		int j;
>> +
>>  		sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>  		memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].mcs,
>>  		       sizeof(mask->control[i].mcs));
>> +
>> +		sdata->rc_has_mcs_mask[i] = false;
>> +		if (!sband)
>> +			continue;
>> +
>> +		for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++)
> 
> I think I'd kinda prefer extra braces, but hey, I'd change that myself,
> but there's another question:
> 
>> +			if (~sdata->rc_rateidx_mcs_mask[i][j]) {
> 
> That ~ seems a bit odd to me, any reason you didn't just use ! ?
It's not a boolean, here I'm checking if any of the bits are set to 0.

- Felix

      reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 22:03 Felix Fietkau
2013-04-13 22:03 ` [PATCH 2/5] mac80211: fix CTS protection handling Felix Fietkau
2013-04-13 22:03   ` [PATCH 3/5] mac80211: improve the rate control API Felix Fietkau
2013-04-13 22:03     ` [PATCH 4/5] mac80211/minstrel_ht: use the new " Felix Fietkau
2013-04-13 22:03       ` [PATCH 5/5] mac80211/minstrel: " Felix Fietkau
2013-04-15 13:44     ` [PATCH 3/5] mac80211: improve the " Johannes Berg
2013-04-15 14:27       ` Felix Fietkau
2013-04-16 10:03     ` Karl Beldan
2013-04-16 10:44       ` Felix Fietkau
2013-04-15 13:40   ` [PATCH 2/5] mac80211: fix CTS protection handling Johannes Berg
2013-04-15 14:24     ` Felix Fietkau
2013-04-15 13:38 ` [PATCH 1/5] mac80211: fix and optimize MCS mask handling Johannes Berg
2013-04-15 14:19   ` Felix Fietkau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516C0C7F.3000204@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git