Discussion:
[ath9k-devel] Disabling physical spectrum sensing
Yahia Shabara
2015-01-02 20:35:29 UTC
Permalink
hi,

Is it possible to disable physical spectrum sensing?
I am doing an experiment that involves implementing a proposed channel
access scheme and I need to enable or disable physical spectrum sensing in
a dynamic manner. In addition to disabling the back-off time intended for
collision avoidance since my experiment and system model involves only one
transceiver pair per priority level.
Mathy Vanhoef
2015-01-03 00:30:15 UTC
Permalink
Hi Yahia,

You can disable both virtual and physical carrier sensing (physical:
detecting that someone else is currently transmitting, virtual:
channel is marked as reserved due the a RTS/CTS). You can also disable
the back-off algorithm or modify its timeouts. I recently did this in
a paper myself to implement low-layer attacks:
http://people.cs.kuleuven.be/~mathy.vanhoef/papers/acsac2014.pdf

Quick summary of my results:
- Register AR_DIAG_SW: Set AR_DIAG_IGNORE_VIRT_CS to disable virtual
carrier sensing. Set AR_DIAG_FORCE_RX_CLEAR to disable physical
carrier sensing.
- Registers AR_D_GBL_IFS_SIFS: SIFS timeout.
- Registers AR_D_GBL_IFS_SLOT: SLOT timeout.
- Registers AR_DLCL_IFS: Minimum and maximum contention window, and
AIFSN values.

Kr,
Mathy
Post by Yahia Shabara
hi,
Is it possible to disable physical spectrum sensing?
I am doing an experiment that involves implementing a proposed channel
access scheme and I need to enable or disable physical spectrum sensing in a
dynamic manner. In addition to disabling the back-off time intended for
collision avoidance since my experiment and system model involves only one
transceiver pair per priority level.
_______________________________________________
ath9k-devel mailing list
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Yahia Shabara
2015-01-03 09:33:14 UTC
Permalink
Thanks Mathy for your help. Your paper is also quite interesting.
Post by Mathy Vanhoef
Hi Yahia,
channel is marked as reserved due the a RTS/CTS). You can also disable
the back-off algorithm or modify its timeouts. I recently did this in
http://people.cs.kuleuven.be/~mathy.vanhoef/papers/acsac2014.pdf
- Register AR_DIAG_SW: Set AR_DIAG_IGNORE_VIRT_CS to disable virtual
carrier sensing. Set AR_DIAG_FORCE_RX_CLEAR to disable physical
carrier sensing.
- Registers AR_D_GBL_IFS_SIFS: SIFS timeout.
- Registers AR_D_GBL_IFS_SLOT: SLOT timeout.
- Registers AR_DLCL_IFS: Minimum and maximum contention window, and
AIFSN values.
Kr,
Mathy
Post by Yahia Shabara
hi,
Is it possible to disable physical spectrum sensing?
I am doing an experiment that involves implementing a proposed channel
access scheme and I need to enable or disable physical spectrum sensing
in a
Post by Yahia Shabara
dynamic manner. In addition to disabling the back-off time intended for
collision avoidance since my experiment and system model involves only
one
Post by Yahia Shabara
transceiver pair per priority level.
_______________________________________________
ath9k-devel mailing list
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Sujith Manoharan
2015-01-03 01:36:30 UTC
Permalink
I am doing an experiment that involves implementing a proposed channel access
scheme and I need to enable or disable physical spectrum sensing in a dynamic
manner. In addition to disabling the back-off time intended for collision
avoidance since my experiment and system model involves only one transceiver
pair per priority level.
This disables carrier sensing:

Set AR_DIAG_FORCE_CH_IDLE_HIGH in AR_DIAG_SW.
Set AR_DIAG_IGNORE_VIRT_CS in AR_DIAG_SW.
Set force_agc_clear (bit 28 of reg 0xa360).

Sujith
Yahia Shabara
2015-01-03 09:34:52 UTC
Permalink
Thank you Sujith for your help
Yahia Shabara
2015-01-18 12:56:30 UTC
Permalink
Hey guys,

I got stuck trying to implement these instructions in the driver code.
I know I should use reg_set_bit
Post by Yahia Shabara
Thank you Sujith for your help
Yahia Shabara
2015-01-18 13:01:36 UTC
Permalink
Hey guys,

I got stuck trying to implement these instructions in the driver code.
I know I should use the function REG_SET_BIT(ah, AR_DIAG_SW,
AR_DIAG_IGNORE_VIRT_CS), for example, to disable Virtual carrier sensing.
What I need to know whether I just need this piece of code, and where
exactly in the transmission path should I use it.
Post by Yahia Shabara
Hey guys,
I got stuck trying to implement these instructions in the driver code.
I know I should use reg_set_bit
Post by Yahia Shabara
Thank you Sujith for your help
Mathy Vanhoef
2015-01-18 13:59:59 UTC
Permalink
This post might be inappropriate. Click to display it.
Yahia Shabara
2015-01-20 12:08:46 UTC
Permalink
Thank you Mathy.
I see you have done great work. I could have used your modified driver to
work it out. Unfortunately, I'm not using a USB dongle. My card is PCIe and
I use ath9k driver not ath9k_htc. I'm trying to map the changes, however, I
am a beginner in the field and this is not straightforward to me.

Regards,
Yahia Shabara
Post by Mathy Vanhoef
Hi Yahia,
You can set the bits in AR_DIAG_SW an any point in time you want. An
option is to create a debugfs entry to control whether carrier sensing
is enabled or not. The only catch is that you have to restore your
custom values when ath9k_hw_set_power_awake or ath9k_hw_reset is
called. Otherwise the register might contain the default driver values
again. At least that's how we did it... perhaps something easier is
also possible. See https://github.com/vanhoefm/modwifi for details.
That link actually includes a VMWare image you can download where the
option of disabling carrier sense is already included (and the source
code of our patches).
Cheers,
Mathy
Post by Yahia Shabara
Hey guys,
I got stuck trying to implement these instructions in the driver code.
I know I should use the function REG_SET_BIT(ah, AR_DIAG_SW,
AR_DIAG_IGNORE_VIRT_CS), for example, to disable Virtual carrier sensing.
What I need to know whether I just need this piece of code, and where
exactly in the transmission path should I use it.
Post by Yahia Shabara
Hey guys,
I got stuck trying to implement these instructions in the driver code.
I know I should use reg_set_bit
Post by Yahia Shabara
Thank you Sujith for your help
_______________________________________________
ath9k-devel mailing list
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Loading...