* [RFC 1/1] ath9k: Add radiotap vendor specific data example
@ 2012-11-23 10:46 Wojciech Dubowik
2012-11-24 11:22 ` Mohammed Shafi
2012-11-24 13:44 ` Johannes Berg
0 siblings, 2 replies; 5+ messages in thread
From: Wojciech Dubowik @ 2012-11-23 10:46 UTC (permalink / raw)
To: linux-wireless; +Cc: Wojciech Dubowik
As an exmaple of vendor specific data we can extract rssi
and evm values for all the chains so one can see them on
per packet basis. More can be added depending on the needs i.e.
noise floor, Ness, STBC, key miss, etc.
AtheorsC OUI is used in this example but it should be replaced
by own when in use.
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
---
drivers/net/wireless/ath/ath9k/recv.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 6aafbb7..02c36c4 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1246,6 +1246,39 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx == 3)
ath_ant_comb_scan(sc, &rs);
+#if 0
+ /*TODO: Replace oui and vendor sub namespace with valid data
+ * and add/remove fields below
+ */
+ if( skb_headroom(skb) > 22 ) {
+ int8_t* vendor_data;
+
+ vendor_data = skb_push(skb, 22);
+
+ rxs->vendor_radiotap_len = 22;
+ rxs->vendor_radiotap_align = 4;
+ rxs->vendor_radiotap_oui[0] = 0x0;
+ rxs->vendor_radiotap_oui[1] = 0x3;
+ rxs->vendor_radiotap_oui[2] = 0x7f;
+ rxs->vendor_radiotap_subns = 0;
+ rxs->vendor_radiotap_bitmap = 0x00000001;
+
+ /* count bytes below and put it as the length*/
+ *vendor_data++ = rs.rs_rssi;
+ *vendor_data++ = rs.rs_rssi_ctl0;
+ *vendor_data++ = rs.rs_rssi_ctl1;
+ *vendor_data++ = rs.rs_rssi_ctl2;
+ put_unaligned_le32(rs.evm0, vendor_data);
+ vendor_data += 4;
+ put_unaligned_le32(rs.evm1, vendor_data);
+ vendor_data += 4;
+ put_unaligned_le32(rs.evm2, vendor_data);
+ vendor_data += 4;
+ put_unaligned_le32(rs.evm3, vendor_data);
+ vendor_data += 4;
+ put_unaligned_le16(rs.evm4, vendor_data);
+ }
+#endif
ieee80211_rx(hw, skb);
requeue_drop_frag:
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [RFC 1/1] ath9k: Add radiotap vendor specific data example
2012-11-23 10:46 [RFC 1/1] ath9k: Add radiotap vendor specific data example Wojciech Dubowik
@ 2012-11-24 11:22 ` Mohammed Shafi
2012-11-26 12:16 ` Wojciech Dubowik
2012-11-24 13:44 ` Johannes Berg
1 sibling, 1 reply; 5+ messages in thread
From: Mohammed Shafi @ 2012-11-24 11:22 UTC (permalink / raw)
To: Wojciech Dubowik; +Cc: linux-wireless
On Fri, Nov 23, 2012 at 4:16 PM, Wojciech Dubowik
<Wojciech.Dubowik@neratec.com> wrote:
> As an exmaple of vendor specific data we can extract rssi
> and evm values for all the chains so one can see them on
> per packet basis. More can be added depending on the needs i.e.
> noise floor, Ness, STBC, key miss, etc.
> AtheorsC OUI is used in this example but it should be replaced
> by own when in use.
>
> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
> ---
> drivers/net/wireless/ath/ath9k/recv.c | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index 6aafbb7..02c36c4 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -1246,6 +1246,39 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
> if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx == 3)
> ath_ant_comb_scan(sc, &rs);
>
> +#if 0
please remove ifdefs .
> + /*TODO: Replace oui and vendor sub namespace with valid data
> + * and add/remove fields below
> + */
> + if( skb_headroom(skb) > 22 ) {
> + int8_t* vendor_data;
we can use s8 ?
> +
> + vendor_data = skb_push(skb, 22);
> +
> + rxs->vendor_radiotap_len = 22;
> + rxs->vendor_radiotap_align = 4;
> + rxs->vendor_radiotap_oui[0] = 0x0;
> + rxs->vendor_radiotap_oui[1] = 0x3;
> + rxs->vendor_radiotap_oui[2] = 0x7f;
> + rxs->vendor_radiotap_subns = 0;
> + rxs->vendor_radiotap_bitmap = 0x00000001;
> +
> + /* count bytes below and put it as the length*/
> + *vendor_data++ = rs.rs_rssi;
> + *vendor_data++ = rs.rs_rssi_ctl0;
> + *vendor_data++ = rs.rs_rssi_ctl1;
> + *vendor_data++ = rs.rs_rssi_ctl2;
> + put_unaligned_le32(rs.evm0, vendor_data);
> + vendor_data += 4;
> + put_unaligned_le32(rs.evm1, vendor_data);
> + vendor_data += 4;
> + put_unaligned_le32(rs.evm2, vendor_data);
> + vendor_data += 4;
> + put_unaligned_le32(rs.evm3, vendor_data);
> + vendor_data += 4;
> + put_unaligned_le16(rs.evm4, vendor_data);
> + }
> +#endif
would be nice check this stuff in sniffer.
> ieee80211_rx(hw, skb);
>
> requeue_drop_frag:
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
thanks,
shafi
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [RFC 1/1] ath9k: Add radiotap vendor specific data example
2012-11-24 11:22 ` Mohammed Shafi
@ 2012-11-26 12:16 ` Wojciech Dubowik
0 siblings, 0 replies; 5+ messages in thread
From: Wojciech Dubowik @ 2012-11-26 12:16 UTC (permalink / raw)
To: Mohammed Shafi; +Cc: linux-wireless
On 11/24/2012 12:22 PM, Mohammed Shafi wrote:
> On Fri, Nov 23, 2012 at 4:16 PM, Wojciech Dubowik
> <Wojciech.Dubowik@neratec.com> wrote:
>> As an exmaple of vendor specific data we can extract rssi
>> and evm values for all the chains so one can see them on
>> per packet basis. More can be added depending on the needs i.e.
>> noise floor, Ness, STBC, key miss, etc.
>> AtheorsC OUI is used in this example but it should be replaced
>> by own when in use.
>>
>> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
>> ---
>> drivers/net/wireless/ath/ath9k/recv.c | 33 +++++++++++++++++++++++++++++++++
>> 1 file changed, 33 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>> index 6aafbb7..02c36c4 100644
>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>> @@ -1246,6 +1246,39 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
>> if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx == 3)
>> ath_ant_comb_scan(sc, &rs);
>>
>> +#if 0
> please remove ifdefs .
I guess radiotap can bring quite some overhead so myabe instead of
ifdefs I could
implement sysfs entry to enable/disable it? Could be also used to switch
needed
fields suggested by Johannes.
>
>
>> + /*TODO: Replace oui and vendor sub namespace with valid data
>> + * and add/remove fields below
>> + */
>> + if( skb_headroom(skb) > 22 ) {
>> + int8_t* vendor_data;
> we can use s8 ?
Will do.
>
>
>> +
>> + vendor_data = skb_push(skb, 22);
>> +
>> + rxs->vendor_radiotap_len = 22;
>> + rxs->vendor_radiotap_align = 4;
>> + rxs->vendor_radiotap_oui[0] = 0x0;
>> + rxs->vendor_radiotap_oui[1] = 0x3;
>> + rxs->vendor_radiotap_oui[2] = 0x7f;
>> + rxs->vendor_radiotap_subns = 0;
>> + rxs->vendor_radiotap_bitmap = 0x00000001;
>> +
>> + /* count bytes below and put it as the length*/
>> + *vendor_data++ = rs.rs_rssi;
>> + *vendor_data++ = rs.rs_rssi_ctl0;
>> + *vendor_data++ = rs.rs_rssi_ctl1;
>> + *vendor_data++ = rs.rs_rssi_ctl2;
>> + put_unaligned_le32(rs.evm0, vendor_data);
>> + vendor_data += 4;
>> + put_unaligned_le32(rs.evm1, vendor_data);
>> + vendor_data += 4;
>> + put_unaligned_le32(rs.evm2, vendor_data);
>> + vendor_data += 4;
>> + put_unaligned_le32(rs.evm3, vendor_data);
>> + vendor_data += 4;
>> + put_unaligned_le16(rs.evm4, vendor_data);
>> + }
>> +#endif
>
> would be nice check this stuff in sniffer.
You mean dissect it?
>
>> ieee80211_rx(hw, skb);
>>
>> requeue_drop_frag:
>> --
>> 1.7.10.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/1] ath9k: Add radiotap vendor specific data example
2012-11-23 10:46 [RFC 1/1] ath9k: Add radiotap vendor specific data example Wojciech Dubowik
2012-11-24 11:22 ` Mohammed Shafi
@ 2012-11-24 13:44 ` Johannes Berg
2012-11-26 12:18 ` Wojciech Dubowik
1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2012-11-24 13:44 UTC (permalink / raw)
To: Wojciech Dubowik; +Cc: linux-wireless
On Fri, 2012-11-23 at 11:46 +0100, Wojciech Dubowik wrote:
> + rxs->vendor_radiotap_bitmap = 0x00000001;
I would recommend adding multiple fields so that it's extensible in the
future or some things can be left out:
field 0 (0x1):
4 x u8, alignment 1 - RSSI data
field 1 (0x2):
4 x u32 + 1 x u16, alignment ? - evm data
Also:
Ness, STBC are going to be standardised.
noise floor is already standardised I think
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/1] ath9k: Add radiotap vendor specific data example
2012-11-24 13:44 ` Johannes Berg
@ 2012-11-26 12:18 ` Wojciech Dubowik
0 siblings, 0 replies; 5+ messages in thread
From: Wojciech Dubowik @ 2012-11-26 12:18 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 11/24/2012 02:44 PM, Johannes Berg wrote:
> On Fri, 2012-11-23 at 11:46 +0100, Wojciech Dubowik wrote:
>
>> + rxs->vendor_radiotap_bitmap = 0x00000001;
> I would recommend adding multiple fields so that it's extensible in the
> future or some things can be left out:
>
> field 0 (0x1):
> 4 x u8, alignment 1 - RSSI data
> field 1 (0x2):
> 4 x u32 + 1 x u16, alignment ? - evm data
I will try to add fields which could be switched on/off through sysfs
with bitmask.
Wojtek
>
>
> Also:
> Ness, STBC are going to be standardised.
> noise floor is already standardised I think
>
> johannes
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-26 12:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-23 10:46 [RFC 1/1] ath9k: Add radiotap vendor specific data example Wojciech Dubowik
2012-11-24 11:22 ` Mohammed Shafi
2012-11-26 12:16 ` Wojciech Dubowik
2012-11-24 13:44 ` Johannes Berg
2012-11-26 12:18 ` Wojciech Dubowik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).