From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Date: Thu, 23 May 2013 23:33:59 +0200 Subject: [ath9k-devel] [PATCH v3 1/3] mac80211: add STBC flag for radiotap In-Reply-To: <1369318279-13768-1-git-send-email-linux@rempel-privat.de> (sfid-20130523_161134_412220_27EEFD62) References: <1369250674.8207.26.camel@jlt4.sipsolutions.net> <1369318279-13768-1-git-send-email-linux@rempel-privat.de> (sfid-20130523_161134_412220_27EEFD62) Message-ID: <1369344839.12002.85.camel@jlt4.sipsolutions.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Thu, 2013-05-23 at 16:11 +0200, Oleksij Rempel wrote: > - *pos++ = local->hw.radiotap_mcs_details; > + > + /* MCS known field */ > + *pos = local->hw.radiotap_mcs_details; > + if (stbc) > + *pos |= IEEE80211_RADIOTAP_MCS_HAVE_STBC; I think you shouldn't make this change, and the driver should include the HAVE_STBC flag in the hw.radiotap_mcs_details. I actually thought of this approach as well, but now just realized that this means that if the driver _knows_ that a certain frame was received w/o STBC, this knowledge cannot be transferred to the user, which would be a loss of information. > + if (stbc) > + *pos |= (stbc >> RX_FLAG_STBC_SHIFT) > + << > IEEE80211_RADIOTAP_MCS_STBC_SHIFT; No need for the if() here, OR'ing in 0 doesn't do anything. johannes