* [PATCH 1/3] mac80211: remove unused radiotap vendor fields in ieee80211_rx_status
@ 2014-02-05 10:48 Emmanuel Grumbach
2014-02-05 10:48 ` [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable Emmanuel Grumbach
2014-02-05 10:48 ` [PATCH 3/3] mac80211: propagate STBC / LDPC flags to radiotap Emmanuel Grumbach
0 siblings, 2 replies; 7+ messages in thread
From: Emmanuel Grumbach @ 2014-02-05 10:48 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, Emmanuel Grumbach
The purpose of this housekeeping is to make some room for
VHT flags. The radiotap vendor fields weren't in use.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
drivers/net/wireless/mac80211_hwsim.c | 26 -----------------
include/net/mac80211.h | 12 --------
net/mac80211/rx.c | 53 ++++-------------------------------
3 files changed, 5 insertions(+), 86 deletions(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 5d88137..c939fd7 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1035,32 +1035,6 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
ack = true;
rx_status.mactime = now + data2->tsf_offset;
-#if 0
- /*
- * Don't enable this code by default as the OUI 00:00:00
- * is registered to Xerox so we shouldn't use it here, it
- * might find its way into pcap files.
- * Note that this code requires the headroom in the SKB
- * that was allocated earlier.
- */
- rx_status.vendor_radiotap_oui[0] = 0x00;
- rx_status.vendor_radiotap_oui[1] = 0x00;
- rx_status.vendor_radiotap_oui[2] = 0x00;
- rx_status.vendor_radiotap_subns = 127;
- /*
- * Radiotap vendor namespaces can (and should) also be
- * split into fields by using the standard radiotap
- * presence bitmap mechanism. Use just BIT(0) here for
- * the presence bitmap.
- */
- rx_status.vendor_radiotap_bitmap = BIT(0);
- /* We have 8 bytes of (dummy) data */
- rx_status.vendor_radiotap_len = 8;
- /* For testing, also require it to be aligned */
- rx_status.vendor_radiotap_align = 8;
- /* push the data */
- memcpy(skb_push(nskb, 8), "ABCDEFGH", 8);
-#endif
memcpy(IEEE80211_SKB_RXCB(nskb), &rx_status, sizeof(rx_status));
ieee80211_rx_irqsafe(data2->hw, nskb);
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5cc7d47..cef0f38 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -906,21 +906,12 @@ enum mac80211_rx_flags {
* @ampdu_reference: A-MPDU reference number, must be a different value for
* each A-MPDU but the same for each subframe within one A-MPDU
* @ampdu_delimiter_crc: A-MPDU delimiter CRC
- * @vendor_radiotap_bitmap: radiotap vendor namespace presence bitmap
- * @vendor_radiotap_len: radiotap vendor namespace length
- * @vendor_radiotap_align: radiotap vendor namespace alignment. Note
- * that the actual data must be at the start of the SKB data
- * already.
- * @vendor_radiotap_oui: radiotap vendor namespace OUI
- * @vendor_radiotap_subns: radiotap vendor sub namespace
*/
struct ieee80211_rx_status {
u64 mactime;
u32 device_timestamp;
u32 ampdu_reference;
u32 flag;
- u32 vendor_radiotap_bitmap;
- u16 vendor_radiotap_len;
u16 freq;
u8 rate_idx;
u8 vht_nss;
@@ -931,9 +922,6 @@ struct ieee80211_rx_status {
u8 chains;
s8 chain_signal[IEEE80211_MAX_CHAINS];
u8 ampdu_delimiter_crc;
- u8 vendor_radiotap_align;
- u8 vendor_radiotap_oui[3];
- u8 vendor_radiotap_subns;
};
/**
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 47faeaf..5dc0661 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -40,8 +40,6 @@
static struct sk_buff *remove_monitor_info(struct ieee80211_local *local,
struct sk_buff *skb)
{
- struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
-
if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) {
if (likely(skb->len > FCS_LEN))
__pskb_trim(skb, skb->len - FCS_LEN);
@@ -53,9 +51,6 @@ static struct sk_buff *remove_monitor_info(struct ieee80211_local *local,
}
}
- if (status->vendor_radiotap_len)
- __pskb_pull(skb, status->vendor_radiotap_len);
-
return skb;
}
@@ -64,14 +59,13 @@ static inline int should_drop_frame(struct sk_buff *skb, int present_fcs_len)
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr;
- hdr = (void *)(skb->data + status->vendor_radiotap_len);
+ hdr = (void *)(skb->data);
if (status->flag & (RX_FLAG_FAILED_FCS_CRC |
RX_FLAG_FAILED_PLCP_CRC |
RX_FLAG_AMPDU_IS_ZEROLEN))
return 1;
- if (unlikely(skb->len < 16 + present_fcs_len +
- status->vendor_radiotap_len))
+ if (unlikely(skb->len < 16 + present_fcs_len))
return 1;
if (ieee80211_is_ctl(hdr->frame_control) &&
!ieee80211_is_pspoll(hdr->frame_control) &&
@@ -90,8 +84,6 @@ ieee80211_rx_radiotap_space(struct ieee80211_local *local,
len = sizeof(struct ieee80211_radiotap_header) + 8;
/* allocate extra bitmaps */
- if (status->vendor_radiotap_len)
- len += 4;
if (status->chains)
len += 4 * hweight8(status->chains);
@@ -127,18 +119,6 @@ ieee80211_rx_radiotap_space(struct ieee80211_local *local,
len += 2 * hweight8(status->chains);
}
- if (status->vendor_radiotap_len) {
- if (WARN_ON_ONCE(status->vendor_radiotap_align == 0))
- status->vendor_radiotap_align = 1;
- /* align standard part of vendor namespace */
- len = ALIGN(len, 2);
- /* allocate standard part of vendor namespace */
- len += 6;
- /* align vendor-defined part */
- len = ALIGN(len, status->vendor_radiotap_align);
- /* vendor-defined part is already in skb */
- }
-
return len;
}
@@ -172,7 +152,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
it_present = &rthdr->it_present;
/* radiotap header, set always present flags */
- rthdr->it_len = cpu_to_le16(rtap_len + status->vendor_radiotap_len);
+ rthdr->it_len = cpu_to_le16(rtap_len);
it_present_val = BIT(IEEE80211_RADIOTAP_FLAGS) |
BIT(IEEE80211_RADIOTAP_CHANNEL) |
BIT(IEEE80211_RADIOTAP_RX_FLAGS);
@@ -190,14 +170,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
BIT(IEEE80211_RADIOTAP_DBM_ANTSIGNAL);
}
- if (status->vendor_radiotap_len) {
- it_present_val |= BIT(IEEE80211_RADIOTAP_VENDOR_NAMESPACE) |
- BIT(IEEE80211_RADIOTAP_EXT);
- put_unaligned_le32(it_present_val, it_present);
- it_present++;
- it_present_val = status->vendor_radiotap_bitmap;
- }
-
put_unaligned_le32(it_present_val, it_present);
pos = (void *)(it_present + 1);
@@ -383,21 +355,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
*pos++ = status->chain_signal[chain];
*pos++ = chain;
}
-
- if (status->vendor_radiotap_len) {
- /* ensure 2 byte alignment for the vendor field as required */
- if ((pos - (u8 *)rthdr) & 1)
- *pos++ = 0;
- *pos++ = status->vendor_radiotap_oui[0];
- *pos++ = status->vendor_radiotap_oui[1];
- *pos++ = status->vendor_radiotap_oui[2];
- *pos++ = status->vendor_radiotap_subns;
- put_unaligned_le16(status->vendor_radiotap_len, pos);
- pos += 2;
- /* align the actual payload as requested */
- while ((pos - (u8 *)rthdr) & (status->vendor_radiotap_align - 1))
- *pos++ = 0;
- }
}
/*
@@ -428,8 +385,8 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)
present_fcs_len = FCS_LEN;
- /* ensure hdr->frame_control and vendor radiotap data are in skb head */
- if (!pskb_may_pull(origskb, 2 + status->vendor_radiotap_len)) {
+ /* ensure hdr->frame_control is in skb head */
+ if (!pskb_may_pull(origskb, 2)) {
dev_kfree_skb(origskb);
return NULL;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable
2014-02-05 10:48 [PATCH 1/3] mac80211: remove unused radiotap vendor fields in ieee80211_rx_status Emmanuel Grumbach
@ 2014-02-05 10:48 ` Emmanuel Grumbach
2014-02-05 13:41 ` Kalle Valo
2014-02-05 10:48 ` [PATCH 3/3] mac80211: propagate STBC / LDPC flags to radiotap Emmanuel Grumbach
1 sibling, 1 reply; 7+ messages in thread
From: Emmanuel Grumbach @ 2014-02-05 10:48 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, Emmanuel Grumbach
ieee80211_rx_status.flags is full. Define a new vht_flag
variable to be able to set more VHT related flags and make
room in flags.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/rx.c | 4 ++--
include/net/mac80211.h | 23 +++++++++++++++++------
net/mac80211/cfg.c | 6 +++---
net/mac80211/rx.c | 9 +++++----
net/mac80211/sta_info.h | 2 ++
net/mac80211/util.c | 6 +++---
6 files changed, 32 insertions(+), 18 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c
index ef727df..fa3c139 100644
--- a/drivers/net/wireless/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/rx.c
@@ -358,10 +358,10 @@ int iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
rx_status.flag |= RX_FLAG_40MHZ;
break;
case RATE_MCS_CHAN_WIDTH_80:
- rx_status.flag |= RX_FLAG_80MHZ;
+ rx_status.vht_flag |= RX_VHT_FLAG_80MHZ;
break;
case RATE_MCS_CHAN_WIDTH_160:
- rx_status.flag |= RX_FLAG_160MHZ;
+ rx_status.vht_flag |= RX_VHT_FLAG_160MHZ;
break;
}
if (rate_n_flags & RATE_MCS_SGI_MSK)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cef0f38..83137fb 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -808,9 +808,6 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
* @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index
* @RX_FLAG_VHT: VHT MCS was used and rate_index is MCS index
* @RX_FLAG_40MHZ: HT40 (40 MHz) was used
- * @RX_FLAG_80MHZ: 80 MHz was used
- * @RX_FLAG_80P80MHZ: 80+80 MHz was used
- * @RX_FLAG_160MHZ: 160 MHz was used
* @RX_FLAG_SHORT_GI: Short guard interval was used
* @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present.
* Valid only for data frames (mainly A-MPDU)
@@ -866,9 +863,6 @@ enum mac80211_rx_flags {
RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20),
RX_FLAG_MACTIME_END = BIT(21),
RX_FLAG_VHT = BIT(22),
- RX_FLAG_80MHZ = BIT(23),
- RX_FLAG_80P80MHZ = BIT(24),
- RX_FLAG_160MHZ = BIT(25),
RX_FLAG_STBC_MASK = BIT(26) | BIT(27),
RX_FLAG_10MHZ = BIT(28),
RX_FLAG_5MHZ = BIT(29),
@@ -878,6 +872,21 @@ enum mac80211_rx_flags {
#define RX_FLAG_STBC_SHIFT 26
/**
+ * enum mac80211_rx_vht_flags - receive VHT flags
+ *
+ * These flags are used with the @vht_flag member of
+ * &struct ieee80211_rx_status.
+ * @RX_VHT_FLAG_80MHZ: 80 MHz was used
+ * @RX_VHT_FLAG_80P80MHZ: 80+80 MHz was used
+ * @RX_VHT_FLAG_160MHZ: 160 MHz was used
+ */
+enum mac80211_rx_vht_flags {
+ RX_VHT_FLAG_80MHZ = BIT(0),
+ RX_VHT_FLAG_80P80MHZ = BIT(1),
+ RX_VHT_FLAG_160MHZ = BIT(2),
+};
+
+/**
* struct ieee80211_rx_status - receive status
*
* The low-level driver should provide this information (the subset
@@ -902,6 +911,7 @@ enum mac80211_rx_flags {
* HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT)
* @vht_nss: number of streams (VHT only)
* @flag: %RX_FLAG_*
+ * @vht_flag: %RX_VHT_FLAG_*
* @rx_flags: internal RX flags for mac80211
* @ampdu_reference: A-MPDU reference number, must be a different value for
* each A-MPDU but the same for each subframe within one A-MPDU
@@ -913,6 +923,7 @@ struct ieee80211_rx_status {
u32 ampdu_reference;
u32 flag;
u16 freq;
+ u8 vht_flag;
u8 rate_idx;
u8 vht_nss;
u8 rx_flags;
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index e410dff..6fd7bcc 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -451,11 +451,11 @@ void sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo)
rinfo->flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
if (sta->last_rx_rate_flag & RX_FLAG_SHORT_GI)
rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI;
- if (sta->last_rx_rate_flag & RX_FLAG_80MHZ)
+ if (sta->last_rx_rate_vht_flag & RX_VHT_FLAG_80MHZ)
rinfo->flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH;
- if (sta->last_rx_rate_flag & RX_FLAG_80P80MHZ)
+ if (sta->last_rx_rate_vht_flag & RX_VHT_FLAG_80P80MHZ)
rinfo->flags |= RATE_INFO_FLAGS_80P80_MHZ_WIDTH;
- if (sta->last_rx_rate_flag & RX_FLAG_160MHZ)
+ if (sta->last_rx_rate_vht_flag & RX_VHT_FLAG_160MHZ)
rinfo->flags |= RATE_INFO_FLAGS_160_MHZ_WIDTH;
}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5dc0661..72ed9ef 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -321,7 +321,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_VHT);
/* known field - how to handle 80+80? */
- if (status->flag & RX_FLAG_80P80MHZ)
+ if (status->vht_flag & RX_VHT_FLAG_80P80MHZ)
known &= ~IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
put_unaligned_le16(known, pos);
pos += 2;
@@ -330,11 +330,11 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
*pos |= IEEE80211_RADIOTAP_VHT_FLAG_SGI;
pos++;
/* bandwidth */
- if (status->flag & RX_FLAG_80MHZ)
+ if (status->vht_flag & RX_VHT_FLAG_80MHZ)
*pos++ = 4;
- else if (status->flag & RX_FLAG_80P80MHZ)
+ else if (status->vht_flag & RX_VHT_FLAG_80P80MHZ)
*pos++ = 0; /* marked not known above */
- else if (status->flag & RX_FLAG_160MHZ)
+ else if (status->vht_flag & RX_VHT_FLAG_160MHZ)
*pos++ = 11;
else if (status->flag & RX_FLAG_40MHZ)
*pos++ = 1;
@@ -1218,6 +1218,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
if (ieee80211_is_data(hdr->frame_control)) {
sta->last_rx_rate_idx = status->rate_idx;
sta->last_rx_rate_flag = status->flag;
+ sta->last_rx_rate_vht_flag = status->vht_flag;
sta->last_rx_rate_vht_nss = status->vht_nss;
}
}
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 49f2aa3..63d7fb4 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -261,6 +261,7 @@ struct ieee80211_tx_latency_stat {
* "the" transmit rate
* @last_rx_rate_idx: rx status rate index of the last data packet
* @last_rx_rate_flag: rx status flag of the last data packet
+ * @last_rx_rate_vht_flag: rx status vht flag of the last data packet
* @last_rx_rate_vht_nss: rx status nss of last data packet
* @lock: used for locking all fields that require locking, see comments
* in the header file.
@@ -397,6 +398,7 @@ struct sta_info {
struct ieee80211_tx_rate last_tx_rate;
int last_rx_rate_idx;
u32 last_rx_rate_flag;
+ u32 last_rx_rate_vht_flag;
u8 last_rx_rate_vht_nss;
u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1];
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index bc0b2b2..38813ed 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2300,11 +2300,11 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
ri.nss = status->vht_nss;
if (status->flag & RX_FLAG_40MHZ)
ri.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
- if (status->flag & RX_FLAG_80MHZ)
+ if (status->vht_flag & RX_VHT_FLAG_80MHZ)
ri.flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH;
- if (status->flag & RX_FLAG_80P80MHZ)
+ if (status->vht_flag & RX_VHT_FLAG_80P80MHZ)
ri.flags |= RATE_INFO_FLAGS_80P80_MHZ_WIDTH;
- if (status->flag & RX_FLAG_160MHZ)
+ if (status->vht_flag & RX_VHT_FLAG_160MHZ)
ri.flags |= RATE_INFO_FLAGS_160_MHZ_WIDTH;
if (status->flag & RX_FLAG_SHORT_GI)
ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable
2014-02-05 10:48 ` [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable Emmanuel Grumbach
@ 2014-02-05 13:41 ` Kalle Valo
2014-02-05 13:49 ` Emmanuel Grumbach
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2014-02-05 13:41 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: johannes, linux-wireless
Emmanuel Grumbach <emmanuel.grumbach@intel.com> writes:
> ieee80211_rx_status.flags is full. Define a new vht_flag
> variable to be able to set more VHT related flags and make
> room in flags.
>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[...]
> @@ -866,9 +863,6 @@ enum mac80211_rx_flags {
> RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20),
> RX_FLAG_MACTIME_END = BIT(21),
> RX_FLAG_VHT = BIT(22),
> - RX_FLAG_80MHZ = BIT(23),
> - RX_FLAG_80P80MHZ = BIT(24),
> - RX_FLAG_160MHZ = BIT(25),
Doesn't this break ath10k?
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable
2014-02-05 13:41 ` Kalle Valo
@ 2014-02-05 13:49 ` Emmanuel Grumbach
2014-02-05 13:52 ` Kalle Valo
0 siblings, 1 reply; 7+ messages in thread
From: Emmanuel Grumbach @ 2014-02-05 13:49 UTC (permalink / raw)
To: Kalle Valo; +Cc: Emmanuel Grumbach, Johannes Berg, linux-wireless
On Wed, Feb 5, 2014 at 3:41 PM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Emmanuel Grumbach <emmanuel.grumbach@intel.com> writes:
>
>> ieee80211_rx_status.flags is full. Define a new vht_flag
>> variable to be able to set more VHT related flags and make
>> room in flags.
>>
>> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>
> [...]
>
>> @@ -866,9 +863,6 @@ enum mac80211_rx_flags {
>> RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20),
>> RX_FLAG_MACTIME_END = BIT(21),
>> RX_FLAG_VHT = BIT(22),
>> - RX_FLAG_80MHZ = BIT(23),
>> - RX_FLAG_80P80MHZ = BIT(24),
>> - RX_FLAG_160MHZ = BIT(25),
>
> Doesn't this break ath10k?
>
yep it does... It seems that I need to run with a few more drivers enabled :)
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable
2014-02-05 13:49 ` Emmanuel Grumbach
@ 2014-02-05 13:52 ` Kalle Valo
0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2014-02-05 13:52 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: Emmanuel Grumbach, Johannes Berg, linux-wireless
Emmanuel Grumbach <egrumbach@gmail.com> writes:
> On Wed, Feb 5, 2014 at 3:41 PM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Emmanuel Grumbach <emmanuel.grumbach@intel.com> writes:
>>
>>> ieee80211_rx_status.flags is full. Define a new vht_flag
>>> variable to be able to set more VHT related flags and make
>>> room in flags.
>>>
>>> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>>
>> [...]
>>
>>> @@ -866,9 +863,6 @@ enum mac80211_rx_flags {
>>> RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20),
>>> RX_FLAG_MACTIME_END = BIT(21),
>>> RX_FLAG_VHT = BIT(22),
>>> - RX_FLAG_80MHZ = BIT(23),
>>> - RX_FLAG_80P80MHZ = BIT(24),
>>> - RX_FLAG_160MHZ = BIT(25),
>>
>> Doesn't this break ath10k?
>
> yep it does... It seems that I need to run with a few more drivers enabled :)
For changes like this allmodconfig is your best friend ;)
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] mac80211: propagate STBC / LDPC flags to radiotap
2014-02-05 10:48 [PATCH 1/3] mac80211: remove unused radiotap vendor fields in ieee80211_rx_status Emmanuel Grumbach
2014-02-05 10:48 ` [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable Emmanuel Grumbach
@ 2014-02-05 10:48 ` Emmanuel Grumbach
2014-02-06 8:35 ` Johannes Berg
1 sibling, 1 reply; 7+ messages in thread
From: Emmanuel Grumbach @ 2014-02-05 10:48 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, Emmanuel Grumbach
This capabilities weren't propagated to the radiotap header.
We don't set here the VHT_KNOWN / MCS_HAVE flag because not
all the low level drivers will know how to properly flag
the frames, hence the low level driver will be in charge
of setting IEEE80211_RADIOTAP_MCS_HAVE_FEC,
IEEE80211_RADIOTAP_MCS_HAVE_STBC and / or
IEEE80211_RADIOTAP_VHT_KNOWN_STBC according to its
capabilities.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
include/net/ieee80211_radiotap.h | 4 ++++
include/net/mac80211.h | 2 ++
net/mac80211/rx.c | 7 +++++++
3 files changed, 13 insertions(+)
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index 8b5b714..b0fd947 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -316,6 +316,10 @@ enum ieee80211_radiotap_type {
#define IEEE80211_RADIOTAP_VHT_FLAG_LDPC_EXTRA_OFDM_SYM 0x10
#define IEEE80211_RADIOTAP_VHT_FLAG_BEAMFORMED 0x20
+#define IEEE80211_RADIOTAP_CODING_LDPC_USER0 0x01
+#define IEEE80211_RADIOTAP_CODING_LDPC_USER1 0x02
+#define IEEE80211_RADIOTAP_CODING_LDPC_USER2 0x04
+#define IEEE80211_RADIOTAP_CODING_LDPC_USER3 0x08
/* helpers */
static inline int ieee80211_get_radiotap_len(unsigned char *data)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 83137fb..6bf38bd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -827,6 +827,7 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
* on this subframe
* @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC
* is stored in the @ampdu_delimiter_crc field)
+ * @RX_FLAG_LDPC: LDPC was used
* @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3
* @RX_FLAG_10MHZ: 10 MHz (half channel) was used
* @RX_FLAG_5MHZ: 5 MHz (quarter channel) was used
@@ -863,6 +864,7 @@ enum mac80211_rx_flags {
RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20),
RX_FLAG_MACTIME_END = BIT(21),
RX_FLAG_VHT = BIT(22),
+ RX_FLAG_LDPC = BIT(23),
RX_FLAG_STBC_MASK = BIT(26) | BIT(27),
RX_FLAG_10MHZ = BIT(28),
RX_FLAG_5MHZ = BIT(29),
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 72ed9ef..d6569ad 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -279,6 +279,8 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
*pos |= IEEE80211_RADIOTAP_MCS_BW_40;
if (status->flag & RX_FLAG_HT_GF)
*pos |= IEEE80211_RADIOTAP_MCS_FMT_GF;
+ if (status->flag & RX_FLAG_LDPC)
+ *pos |= IEEE80211_RADIOTAP_MCS_FEC_LDPC;
stbc = (status->flag & RX_FLAG_STBC_MASK) >> RX_FLAG_STBC_SHIFT;
*pos |= stbc << IEEE80211_RADIOTAP_MCS_STBC_SHIFT;
pos++;
@@ -328,6 +330,9 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
/* flags */
if (status->flag & RX_FLAG_SHORT_GI)
*pos |= IEEE80211_RADIOTAP_VHT_FLAG_SGI;
+ /* in VHT, STBC is binary */
+ if (status->flag & RX_FLAG_STBC_MASK)
+ *pos |= IEEE80211_RADIOTAP_VHT_FLAG_STBC;
pos++;
/* bandwidth */
if (status->vht_flag & RX_VHT_FLAG_80MHZ)
@@ -344,6 +349,8 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
*pos = (status->rate_idx << 4) | status->vht_nss;
pos += 4;
/* coding field */
+ if (status->flag & RX_FLAG_LDPC)
+ *pos |= IEEE80211_RADIOTAP_CODING_LDPC_USER0;
pos++;
/* group ID */
pos++;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 3/3] mac80211: propagate STBC / LDPC flags to radiotap
2014-02-05 10:48 ` [PATCH 3/3] mac80211: propagate STBC / LDPC flags to radiotap Emmanuel Grumbach
@ 2014-02-06 8:35 ` Johannes Berg
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2014-02-06 8:35 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: linux-wireless
On Wed, 2014-02-05 at 12:48 +0200, Emmanuel Grumbach wrote:
> This capabilities weren't propagated to the radiotap header.
> We don't set here the VHT_KNOWN / MCS_HAVE flag because not
> all the low level drivers will know how to properly flag
> the frames, hence the low level driver will be in charge
> of setting IEEE80211_RADIOTAP_MCS_HAVE_FEC,
> IEEE80211_RADIOTAP_MCS_HAVE_STBC and / or
> IEEE80211_RADIOTAP_VHT_KNOWN_STBC according to its
> capabilities.
Applied.
johannes
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-02-06 8:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 10:48 [PATCH 1/3] mac80211: remove unused radiotap vendor fields in ieee80211_rx_status Emmanuel Grumbach
2014-02-05 10:48 ` [PATCH 2/3] mac80211: move VHT related RX_FLAG to another variable Emmanuel Grumbach
2014-02-05 13:41 ` Kalle Valo
2014-02-05 13:49 ` Emmanuel Grumbach
2014-02-05 13:52 ` Kalle Valo
2014-02-05 10:48 ` [PATCH 3/3] mac80211: propagate STBC / LDPC flags to radiotap Emmanuel Grumbach
2014-02-06 8:35 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox