[ath5k-devel] disable ACK at MAC layer in ath5k/ath9k

2011-06-09 Thread Liang
Hi,

I want to know if the ACK at 802.11 MAC layer can be turned off in the
ath5k/ath9k, and how can it be done?

On the other hand, does the command iwconfig wlan0 retry 0 disable the MAC
retransmission? Is it the same to turnoff the ACK?

Thank you!

Best,
Leon
___
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel


Re: [ath5k-devel] disable ACK at MAC layer in ath5k/ath9k

2011-06-09 Thread Liang
Hi Adrian,

Thank you. May I ask how to set these registers to disable the ACK in the
ath5k/ath9k driver?

Best,
Leon

On Thu, Jun 9, 2011 at 2:32 PM, Adrian Chadd adr...@freebsd.org wrote:

 No, retry doesn't stop ack's, it just stops the hardware from retrying
 a packet if it hasn't heard an ACK.

 You can fiddle with the diag register, or you can just ensure that the
 relevant bit in the TX descriptor isn't set.

 fgrep NOACK ath9k/*.h
 mac.h:#define ATH9K_TXDESC_NOACK0x0002

 fgrep NOACK ath5k/*.h

 fgrep NOACK *h
 desc.h:#define AR5K_2W_TX_DESC_CTL1_NOACK_5211  0x0080 /*
 [5211] no ACK */
 desc.h:#define AR5K_4W_TX_DESC_CTL1_NOACK   0x0100 /* no
 ACK */
 desc.h:#define AR5K_TXDESC_NOACK0x0002  /*[5211+]*/

 There's likely some API you can use at a higher level to signify to
 the TX code that no, you don't want an ACK for the packet.

 Eg, look at ath9k/setup_tx_flags():

struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 ...
if (tx_info-flags  IEEE80211_TX_CTL_NO_ACK)
flags |= ATH9K_TXDESC_NOACK;

 HTH,


 Adrian

 On 9 June 2011 13:55, Liang leonc...@gmail.com wrote:
  Hi,
  I want to know if the ACK at 802.11 MAC layer can be turned off in the
  ath5k/ath9k, and how can it be done?
  On the other hand, does the command iwconfig wlan0 retry 0 disable the
 MAC
  retransmission? Is it the same to turnoff the ACK?
  Thank you!
  Best,
  Leon
  ___
  ath5k-devel mailing list
  ath5k-devel@lists.ath5k.org
  https://lists.ath5k.org/mailman/listinfo/ath5k-devel
 
 

___
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel


Re: [ath5k-devel] disable ACK at MAC layer in ath5k/ath9k

2011-06-09 Thread Adrian Chadd
Best thing to do is look at the code that disables ACK in the TX
descriptor and set that.

There's also the DIAG register, as mentioned. For ath9k:

reg.h:#define AR_DIAG_SW  0x8048
reg.h:#define AR_DIAG_ACK_DIS 0x0002

Find where AR_DIAG_SW is set in the ath9k code (it's fiddled with in a
few places) and call the REG_SET_BIT() appropriately.

Do the same for ath5k once you find the right register/field definition.

HTH,



Adrian

On 9 June 2011 15:03, Liang leonc...@gmail.com wrote:
 Hi Adrian,
 Thank you. May I ask how to set these registers to disable the ACK in the
 ath5k/ath9k driver?
 Best,
 Leon

 On Thu, Jun 9, 2011 at 2:32 PM, Adrian Chadd adr...@freebsd.org wrote:

 No, retry doesn't stop ack's, it just stops the hardware from retrying
 a packet if it hasn't heard an ACK.

 You can fiddle with the diag register, or you can just ensure that the
 relevant bit in the TX descriptor isn't set.

 fgrep NOACK ath9k/*.h
 mac.h:#define ATH9K_TXDESC_NOACK                0x0002

 fgrep NOACK ath5k/*.h

 fgrep NOACK *h
 desc.h:#define AR5K_2W_TX_DESC_CTL1_NOACK_5211          0x0080 /*
 [5211] no ACK */
 desc.h:#define AR5K_4W_TX_DESC_CTL1_NOACK               0x0100 /* no
 ACK */
 desc.h:#define AR5K_TXDESC_NOACK        0x0002  /*[5211+]*/

 There's likely some API you can use at a higher level to signify to
 the TX code that no, you don't want an ACK for the packet.

 Eg, look at ath9k/setup_tx_flags():

        struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 ...
        if (tx_info-flags  IEEE80211_TX_CTL_NO_ACK)
                flags |= ATH9K_TXDESC_NOACK;

 HTH,


 Adrian

 On 9 June 2011 13:55, Liang leonc...@gmail.com wrote:
  Hi,
  I want to know if the ACK at 802.11 MAC layer can be turned off in the
  ath5k/ath9k, and how can it be done?
  On the other hand, does the command iwconfig wlan0 retry 0 disable the
  MAC
  retransmission? Is it the same to turnoff the ACK?
  Thank you!
  Best,
  Leon
  ___
  ath5k-devel mailing list
  ath5k-devel@lists.ath5k.org
  https://lists.ath5k.org/mailman/listinfo/ath5k-devel
 
 


___
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel


Re: [ath5k-devel] Connecting BlackBerry to hotspot

2011-06-09 Thread Adrian Chadd
On 9 June 2011 20:00, Bob Copeland m...@bobcopeland.com wrote:

 http://linuxwireless.org/en/users/Documentation/Bluetooth-coexistence

 From that page:

    Apart from AFS and channel skipping techniques Bluetooth
    coexistence is typically tested with bundled 802.11 and Bluetooth
    devices. This becomes more evident with 2-wire and 3-wire which
    relies on GPIO pins for signaling.

 In other words, the devices have to be in the same system so that the
 802.11 device can tell the BT device to stop transmitting by asserting
 some signals on the shared lines.  This is how I understand ath9k's bt
 coex to work, at least.


Right, and the original poster:

 Today after installing compat-wireless modules with
 still no luck as a last resort i decided to turn of BT and take out BT
 dongles from hotspot's USB HUB.

Guess even if AR5212 did have bluetooth coexistence support, there's
no IO lines coming from the bluetooth device which are twiddling the
btcoex GPIOs.

Damn. :-)


Adrian
___
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel


Re: [ath5k-devel] disable ACK at MAC layer in ath5k/ath9k

2011-06-09 Thread Liang
Hi,

There are three functions where AR_DIAG_SW is set with REG_SET_BIT(), but
I'm not sure in which function I should add REG_SET_BIT(ah,
AR_DIAG_SW, AR_DIAG_ACK_DIS). Do you have any suggestions?

function1: ath9k_hw_abort_tx_dma()
  REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);

function2: ath9k_hw_setrxabort()
  REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT));

function3: ath9k_hw_abortpcurecv()
  REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_ABORT | AR_DIAG_RX_DIS);

Thank you.

Best,
Liang


On Thu, Jun 9, 2011 at 4:07 PM, Adrian Chadd adr...@freebsd.org wrote:

 Best thing to do is look at the code that disables ACK in the TX
 descriptor and set that.

 There's also the DIAG register, as mentioned. For ath9k:

 reg.h:#define AR_DIAG_SW  0x8048
 reg.h:#define AR_DIAG_ACK_DIS 0x0002

 Find where AR_DIAG_SW is set in the ath9k code (it's fiddled with in a
 few places) and call the REG_SET_BIT() appropriately.

 Do the same for ath5k once you find the right register/field definition.

 HTH,



 Adrian

 On 9 June 2011 15:03, Liang leonc...@gmail.com wrote:
  Hi Adrian,
  Thank you. May I ask how to set these registers to disable the ACK in the
  ath5k/ath9k driver?
  Best,
  Leon
 
  On Thu, Jun 9, 2011 at 2:32 PM, Adrian Chadd adr...@freebsd.org wrote:
 
  No, retry doesn't stop ack's, it just stops the hardware from retrying
  a packet if it hasn't heard an ACK.
 
  You can fiddle with the diag register, or you can just ensure that the
  relevant bit in the TX descriptor isn't set.
 
  fgrep NOACK ath9k/*.h
  mac.h:#define ATH9K_TXDESC_NOACK0x0002
 
  fgrep NOACK ath5k/*.h
 
  fgrep NOACK *h
  desc.h:#define AR5K_2W_TX_DESC_CTL1_NOACK_5211  0x0080 /*
  [5211] no ACK */
  desc.h:#define AR5K_4W_TX_DESC_CTL1_NOACK   0x0100 /* no
  ACK */
  desc.h:#define AR5K_TXDESC_NOACK0x0002  /*[5211+]*/
 
  There's likely some API you can use at a higher level to signify to
  the TX code that no, you don't want an ACK for the packet.
 
  Eg, look at ath9k/setup_tx_flags():
 
 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
  ...
 if (tx_info-flags  IEEE80211_TX_CTL_NO_ACK)
 flags |= ATH9K_TXDESC_NOACK;
 
  HTH,
 
 
  Adrian
 
  On 9 June 2011 13:55, Liang leonc...@gmail.com wrote:
   Hi,
   I want to know if the ACK at 802.11 MAC layer can be turned off in the
   ath5k/ath9k, and how can it be done?
   On the other hand, does the command iwconfig wlan0 retry 0 disable
 the
   MAC
   retransmission? Is it the same to turnoff the ACK?
   Thank you!
   Best,
   Leon
   ___
   ath5k-devel mailing list
   ath5k-devel@lists.ath5k.org
   https://lists.ath5k.org/mailman/listinfo/ath5k-devel
  
  
 
 

___
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel


Re: [ath5k-devel] disable ACK at MAC layer in ath5k/ath9k

2011-06-09 Thread Adrian Chadd
I'd likely slide it in somewhere after ath9k_hw_process_ini() in
ath9k_hw_reset().

Good luck!


Adrian

On 9 June 2011 21:54, Liang leonc...@gmail.com wrote:
 Hi,
 There are three functions where AR_DIAG_SW is set with REG_SET_BIT(), but
 I'm not sure in which function I should add REG_SET_BIT(ah,
 AR_DIAG_SW, AR_DIAG_ACK_DIS). Do you have any suggestions?
 function1: ath9k_hw_abort_tx_dma()
   REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH);
 function2: ath9k_hw_setrxabort()
   REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT));
 function3: ath9k_hw_abortpcurecv()
   REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_ABORT | AR_DIAG_RX_DIS);
 Thank you.
 Best,
 Liang


 On Thu, Jun 9, 2011 at 4:07 PM, Adrian Chadd adr...@freebsd.org wrote:

 Best thing to do is look at the code that disables ACK in the TX
 descriptor and set that.

 There's also the DIAG register, as mentioned. For ath9k:

 reg.h:#define AR_DIAG_SW                  0x8048
 reg.h:#define AR_DIAG_ACK_DIS             0x0002

 Find where AR_DIAG_SW is set in the ath9k code (it's fiddled with in a
 few places) and call the REG_SET_BIT() appropriately.

 Do the same for ath5k once you find the right register/field definition.

 HTH,



 Adrian

 On 9 June 2011 15:03, Liang leonc...@gmail.com wrote:
  Hi Adrian,
  Thank you. May I ask how to set these registers to disable the ACK in
  the
  ath5k/ath9k driver?
  Best,
  Leon
 
  On Thu, Jun 9, 2011 at 2:32 PM, Adrian Chadd adr...@freebsd.org wrote:
 
  No, retry doesn't stop ack's, it just stops the hardware from retrying
  a packet if it hasn't heard an ACK.
 
  You can fiddle with the diag register, or you can just ensure that the
  relevant bit in the TX descriptor isn't set.
 
  fgrep NOACK ath9k/*.h
  mac.h:#define ATH9K_TXDESC_NOACK                0x0002
 
  fgrep NOACK ath5k/*.h
 
  fgrep NOACK *h
  desc.h:#define AR5K_2W_TX_DESC_CTL1_NOACK_5211          0x0080 /*
  [5211] no ACK */
  desc.h:#define AR5K_4W_TX_DESC_CTL1_NOACK               0x0100 /*
  no
  ACK */
  desc.h:#define AR5K_TXDESC_NOACK        0x0002  /*[5211+]*/
 
  There's likely some API you can use at a higher level to signify to
  the TX code that no, you don't want an ACK for the packet.
 
  Eg, look at ath9k/setup_tx_flags():
 
         struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
  ...
         if (tx_info-flags  IEEE80211_TX_CTL_NO_ACK)
                 flags |= ATH9K_TXDESC_NOACK;
 
  HTH,
 
 
  Adrian
 
  On 9 June 2011 13:55, Liang leonc...@gmail.com wrote:
   Hi,
   I want to know if the ACK at 802.11 MAC layer can be turned off in
   the
   ath5k/ath9k, and how can it be done?
   On the other hand, does the command iwconfig wlan0 retry 0 disable
   the
   MAC
   retransmission? Is it the same to turnoff the ACK?
   Thank you!
   Best,
   Leon
   ___
   ath5k-devel mailing list
   ath5k-devel@lists.ath5k.org
   https://lists.ath5k.org/mailman/listinfo/ath5k-devel
  
  
 
 


___
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel


Re: [ath5k-devel] Connecting BlackBerry to hotspot

2011-06-09 Thread Bob Copeland
On Thu, Jun 09, 2011 at 08:17:59PM +0800, Adrian Chadd wrote:
 Right, and the original poster:
 
  Today after installing compat-wireless modules with
  still no luck as a last resort i decided to turn of BT and take out BT
  dongles from hotspot's USB HUB.

Oh, yeah, I did miss that completely, heh.  I kept thinking the only BT
was on the phone since the other phones didn't have issues.

-- 
Bob Copeland %% www.bobcopeland.com

___
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel