Re: [ath9k-devel] Missing disable_ani in /sys/kernel/debug/ieee80211/phy0/ath9k

2014-05-21 Thread Rajkumar Manoharan
On Tue, May 20, 2014 at 11:17:07AM +0200, Georgi Kehaiov wrote:
Hello everyone,
 
I've got an Atheros AR5416 wireless network adapter and I'm experiencing
the problem described in https://bugzilla.kernel.org/show_bug.cgi?id=42092
So I tried to execute the official solution (echo 1 
/sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani) but for some reason or
other I am missing the disable_ani file. Is this file located somewhere
else now? Have I done something wrong? I am running a 3.14.4 kernel.
 
Any help will be much appreciated.
 
Here is some system information you might find useful (kernel config,
lsmod, module load options, lspci and the contents of
/sys/kernel/debug/ieee80211/phy0/ath9k):
 
# ls /sys/kernel/debug/ieee80211/phy0/ath9k/ -1
ani

Georgi,

disable_ani is renamed as ani in latest driver.

To disable ANI
echo 0 /sys/kernel/debug/ieee80211/phy*/ath9k/ani

To enable ANI
echo 1 /sys/kernel/debug/ieee80211/phy*/ath9k/ani

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


Re: [ath9k-devel] randconfig build error with next-20140519, in drivers/net/wireless/ath/ath9k/dfs.c

2014-05-21 Thread Rajkumar Manoharan
On Mon, May 19, 2014 at 09:31:16AM -0700, Jim Davis wrote:
 Building with the attached random configuration file,
 
 In file included from drivers/net/wireless/ath/ath9k/eeprom.h:22:0,
  from drivers/net/wireless/ath/ath9k/hw.h:27,
  from drivers/net/wireless/ath/ath9k/dfs.c:18:
 drivers/net/wireless/ath/ath9k/dfs.c: In function ‘ath9k_dfs_process_phyerr’:
 drivers/net/wireless/ath/ath9k/dfs.c:185:14: error: ‘struct ath_softc’
 has no member named ‘debug’
 pe.ts - sc-debug.stats.dfs_stats.last_ts);
   ^
 drivers/net/wireless/ath/ath9k/../ath.h:273:41: note: in definition of
 macro ‘ath_dbg’
ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \
  ^
 drivers/net/wireless/ath/ath9k/dfs.c:186:5: error: ‘struct ath_softc’
 has no member named ‘debug’
sc-debug.stats.dfs_stats.last_ts = pe.ts;
  ^
 make[5]: *** [drivers/net/wireless/ath/ath9k/dfs.o] Error 1

Please select CONFIG_ATH9K_DEBUGFS.

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


Re: [ath9k-devel] randconfig build error with next-20140519, in drivers/net/wireless/ath/ath9k/dfs.c

2014-05-21 Thread Rajkumar Manoharan
On Wed, May 21, 2014 at 10:12:26PM +1000, Julian Calaby wrote:
 Hi Rajkumar,
 
 On Wed, May 21, 2014 at 9:01 PM, Rajkumar Manoharan
 rmano...@qti.qualcomm.com wrote:
  On Mon, May 19, 2014 at 09:31:16AM -0700, Jim Davis wrote:
  Building with the attached random configuration file,
 
  In file included from drivers/net/wireless/ath/ath9k/eeprom.h:22:0,
   from drivers/net/wireless/ath/ath9k/hw.h:27,
   from drivers/net/wireless/ath/ath9k/dfs.c:18:
  drivers/net/wireless/ath/ath9k/dfs.c: In function 
  ‘ath9k_dfs_process_phyerr’:
  drivers/net/wireless/ath/ath9k/dfs.c:185:14: error: ‘struct ath_softc’
  has no member named ‘debug’
  pe.ts - sc-debug.stats.dfs_stats.last_ts);
^
  drivers/net/wireless/ath/ath9k/../ath.h:273:41: note: in definition of
  macro ‘ath_dbg’
 ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \
   ^
  drivers/net/wireless/ath/ath9k/dfs.c:186:5: error: ‘struct ath_softc’
  has no member named ‘debug’
 sc-debug.stats.dfs_stats.last_ts = pe.ts;
   ^
  make[5]: *** [drivers/net/wireless/ath/ath9k/dfs.o] Error 1
 
  Please select CONFIG_ATH9K_DEBUGFS.
 
 The point of randconfig builds is to ensure that there it's really
 unlikely that there are any config combinations that don't build, even
 if they're utterly insane.
 
 You should really change the ath9k Kconfig rules or move or add ifdefs
 to prevent this from being possible.

Completely agree. But ath9k Kconfig has proper dependecy for
ATH9K_DFS_DEBUGFS. I am wondering how it is selected w/o ATH9K_DEBUGFS.

config ATH9K_DFS_DEBUGFS
def_bool y
depends on ATH9K_DEBUGFS  ATH9K_DFS_CERTIFIED

Should it be like this?

config ATH9K_DFS_DEBUGFS
def_bool y if (ATH9K_DEBUGFS  ATH9K_DFS_CERTIFIED)

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


Re: [ath9k-devel] Weird Atheros 9485 http connecting problems

2014-05-21 Thread Rajkumar Manoharan
On Wed, May 21, 2014 at 11:37:36AM -0300, Arkh4mKn1ght wrote:
 Ok i tried the patch but the issue happened again :(
 
 After resuming my laptop from hibernation i saw in
 /var/log/kernel/errors.log these messages again:
 
 May 21 09:20:10 localhost kernel: mei_me :00:16.0: suspend
 May 21 09:20:10 localhost kernel: ath: phy1: RX failed to go idle in 10 ms
 RXSM=0xdeadbeef
 May 21 09:20:10 localhost kernel: ath: phy1: DMA failed to stop in 10 ms
 AR_CR=0xdeadbeef AR_DIAG_SW=0xdeadbeef DMADBG_7=0xdeadbeef
 May 21 09:20:11 localhost kernel: dpm_run_callback():
 usb_dev_restore+0x0/0x20 [usbcore] returns -107
 May 21 09:20:11 localhost kernel: PM: Device 1-1 failed to restore async:
 error -107
 
 ASPM was disabled on root complex and atheros card.powersave was off.
 After 1 hour and 10 minutes of those messages that problem arise. I have
 noticed that the problem arises always after some time of resuming the
 laptop from hibernation.
 
 Its really odd, because when it does happen, browsing the web is painfully
 slow with the connecting to domain.com... message in the browser status
 bar... it does load the website but after some minutes..
 Meanwhile at the same time if i try to download a torrent using a bittorrent
 client i can do it without problems at full speed. If i pause the torrent,
 browsing websites still behaves slowly until i reboot the laptop.
 
 At first i thought that i have a defective atheros card, but why i can
 download torrents at full speed when this problem arises?
 What options do i have now? i have tested all combinations of ASPM
 enabled/disabled and powersave on/off.
 
 I have seen that there is a BIOS update for my laptop, but im unsure it
 could help for this at all (besides that i would have to install windows 8
 to install the friggin bios update)
 
Oskar,

I am quite confused. Does the issue happen only after resume from hibernate?
Initially you havn't mentioned hibernate/resume. Are you able to
reproduce the issue without hibernating? Please flush ip table entries
and test.

sudo iptables -F

Can you please take a sniffer capture at the problematic time? Are you seeing 
huge
latency for ping (icmp)?

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


Re: [ath9k-devel] Weird Atheros 9485 http connecting problems

2014-05-19 Thread Rajkumar Manoharan
On Mon, May 19, 2014 at 10:12:38AM -0300, Arkh4mKn1ght wrote:
 On 05/19/2014 03:29 AM, Rajkumar Manoharan wrote:
 On Sun, May 18, 2014 at 09:29:08PM -0300, Arkh4mKn1ght wrote:
 Hi
 
 I'm still testing but the issue reappeared again with the ASPM disabled on
 the card. This ocurred after starting the computer from hibernation and as i
 mentioned before ASPM was disabled only on the card and not on the root
 complex. I found these messages on the log:
 
 May 18 10:42:56 localhost kernel: mei_me :00:16.0: suspend
 May 18 10:42:57 localhost kernel: ath: phy0: RX failed to go idle in 10 ms
 RXSM=0xdeadbeef
 May 18 10:42:57 localhost kernel: ath: phy0: DMA failed to stop in 10 ms
 AR_CR=0xdeadbeef AR_DIAG_SW=0xdeadbeef DMADBG_7=0xdeadbeef
 
 After rebooting the computer everything worked fine again.
 
 Now i have disabled ASPM on both the root complex and the atheros card so
 i'm still testing to see if the issue happens again. until now (7+ hours
 everything is fine).
 I will let you know if the issue reappears after these changes
 
 Oskar,
 
 Generally the boot argument pcie_aspm=off disables ASPM in both root
 complex and device. Im not sure why it is not working in your m/c. I
 think there could be some option in BIOS to disable PCI powersave.
 Please check that.
 
 Can you please test with attached patch?
 
 -Rajkumar
 
 Rajkumar, yeah i also thought using pcie_aspm=off would disable ASPM
 completely, so i dont know what is going on. My laptop is a sony vaio SVE
 model, and it has a crappy BIOS designed specialy
 for windows 8 and all that UEFI crap. Las time i checked the BIOS it was
 really a simple one, not many options to deal with, but i will check again
 if the issue reappears and try the patch. Until now everything is fine with
 ASPM disabled on both the root complex and wifi card.(ath9k is loaded with
 ps_enable=1)
 
 Btw as i said in a previous email, if ASPM is disabled completely, leaving
 powersave mode on for the ath9k module meaningless? in other words would
 powersave work with ASPM disabled but ath9k module loaded with ps_enable=1 ?

powersave is nothing but 802.11 protocol implementation to put the
station into network sleep when it is idle and wake it up whenever it is
active. IIRC it is not related to ASPM. So yes powersave would work event
without ASPM.

Since the issue is happending only when ASPM is enabled, please test the
patch with ASPM.

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


Re: [ath9k-devel] Weird Atheros 9485 http connecting problems

2014-05-15 Thread Rajkumar Manoharan
On Wed, May 14, 2014 at 10:46:22AM -0300, Arkh4mKn1ght wrote:
 Hello
 
 I'm having a problem for some time with an atheros card 9485 using the 
 ath9k driver. My computer has linux kernel 3.12.13 and i'm using ath9k 
 driver from backports 3.15.
 
 The problem that i have is that after some hours of using the computer, 
 the wireless connection starts
 to give problems only with HTTP and HTTPS connections. If i try to load 
 a page it just stays in connecting... but after some minutes its does 
 load the pages albeit slowly. Its weird because pings work fine, SSH 
 access to external servers is also fine. I thought that it could be a 
 DNS thing but if i try to load an http address by IP it also stalls in 
 connecting(although i can ping or ssh a external machine by domain 
 without issues)
Oskar,

Can you please share your lspci output. (lspci -)?

Please send me kernel log with debug logs.

echo 0x649 /sys/kernel/debug/ieee80211/phy*/ath9k/debug

OR

sudo modprobe -r ath9k
sudo modprobe -v ath9k debug=0x649

 This problem happens with both GUI browsers and console browsers like 
 lynx. The only way to
 resolve this is to reboot the computer or power it off. I have also 
 noticed that if i disable the network connection to my wireless router 
 when the problem appears and connect to my smartphone with hotspot 
you mean disconnecting from your AP and connecting to hotspot works fine.
isn't it?

What mode AP is configured with (HT20/HT40)?

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


Re: [ath9k-devel] [PATCH] ath9k: fix NULL-deref in hw_per_calibration() for ar9002

2014-05-13 Thread Rajkumar Manoharan
On Tue, May 13, 2014 at 08:50:00AM +0200, David Herrmann wrote:
 Hi
 
 On Mon, May 12, 2014 at 8:43 PM, Felix Fietkau n...@openwrt.org wrote:
  I looked into it again, the scenario where I assumed that this problem
  could occur didn't turn out to be true. I have no idea how this crash
  can occur.
 
 The only path that can set ah-caldata to NULL is through:
 
 ieee80211_hw_config()
   ath9k_htc_config()
 ath9k_htc_set_channel()
   ath9k_hw_reset()
 
 This happens whenever IEEE80211_CONF_OFFCHANNEL is set.
 
 Now mac80211 is way to big for me to review right now and
 ieee80211_hw_config() is used quite often. Given that the described
 call-path does no synchronization against ath9k_htc_ani_work(), all
 the callers of mac80211_hw_config(OFFCHANNEL) must guarantee that no
 ani-work is running. Is that intentional? I cannot see any of those
 functions calling into ath9k_htc_stop_ani(). This might of course be
 implicit.
 
 One call-path I see is:
 ieee80211_scan_cancel()
   cancel_delayed_work()
 
 We cannot use cancel_delayed_work_sync() here due to locking issues.
 However, this obviously races against any following
 set_channel(OFFCHANNEL) request.
 
 If there's anything I can do to debug this, let me know. I tried
 adding some printk()'s into the hot-path and it turns out to no longer
 fail then. So this really seems to be a quite small race (given that a
 bunch of simple printk()s is slow enough to work around it).

David,

Are you using USB devices? What is the PID/VID? I have not looked at
HTC driver perspective.

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


Re: [ath9k-devel] ath9k: Add concurrent WLAN and BT tx support for MCI based chips

2012-11-27 Thread Rajkumar Manoharan
On Tue, Nov 27, 2012 at 12:03:37AM +0300, Dan Carpenter wrote:
 Hello Rajkumar Manoharan,
 
 The patch db60428b1af1: ath9k: Add concurrent WLAN and BT tx support
 for MCI based chips from Oct 12, 2012, leads to the following
 warning:
 drivers/net/wireless/ath/ath9k/btcoex.c:414
   ath9k_hw_btcoex_set_concur_txprio()
   error: buffer overflow 'stomp_txprio' 4 = 4
 
Dan,

Thanks a lot. Is there a way to enable all checks while building smatch tool?

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


Re: [ath9k-devel] [PATCH 03/10] ath9k_hw: Add WoW hardware capability flags

2012-06-19 Thread Rajkumar Manoharan
On Tue, Jun 19, 2012 at 09:17:23PM +0530, Mohammed Shafi Shajakhan wrote:
 From: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 
 have seperate wow capability flags for
 *basic wow support
 *device capable of matching exact user defined pattern
 or de-authentication/disassoc pattern
 *device such AR9280 requires first four bytes for
 all sort of patterns
 
 Cc: Senthil Balasubramanian senth...@qca.qualcomm.com
 Cc: Rajkumar Manoharan rmano...@qca.qualcomm.com
 Cc: vadi...@qca.qualcomm.com
 Tested-by: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 Signed-off-by: Luis R. Rodriguez mcg...@qca.qualcomm.com
 Signed-off-by: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 ---
  drivers/net/wireless/ath/ath9k/hw.h |   20 
  1 files changed, 20 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/net/wireless/ath/ath9k/hw.h 
 b/drivers/net/wireless/ath/ath9k/hw.h
 index d0e14a3..73a1238 100644
 --- a/drivers/net/wireless/ath/ath9k/hw.h
 +++ b/drivers/net/wireless/ath/ath9k/hw.h
 @@ -231,6 +231,23 @@ enum ath9k_hw_caps {
   ATH9K_HW_CAP_DFS= BIT(16),
  };
  
 +/*
 + * enum ath9k_hw_wow_caps - WoW device capabilities
 + * @ATH9K_HW_WOW_DEVICE_CAPABLE: device revision is capable of WoW.
 + * @ATH9K_HW_WOW_PATTERN_MATCH_EXACT: device is capable of matching
 + * an exact user defined pattern or de-authentication/disassoc pattern.
 + * @ATH9K_HW_WOW_PATTERN_MATCH_DWORD: device requires the first four
 + * bytes of the pattern for user defined pattern, de-authentication and
 + * disassociation patterns for all types of possible frames recieved
 + * of those types.
 + */
 +
 +enum ath9k_hw_wow_caps {
 + ATH9K_HW_WOW_DEVICE_CAPABLE = BIT(0),
 + ATH9K_HW_WOW_PATTERN_MATCH_EXACT= BIT(1),
 + ATH9K_HW_WOW_PATTERN_MATCH_DWORD= BIT(2),
 +};
 +
  struct ath9k_hw_capabilities {
   u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
   u16 rts_aggr_limit;
 @@ -246,6 +263,9 @@ struct ath9k_hw_capabilities {
   u8 txs_len;
   u16 pcie_lcr_offset;
   bool pcie_lcr_extsync_en;
 +#ifdef   CONFIG_PM_SLEEP
 + enum ath9k_hw_wow_caps wow_caps;
 +#endif
Why can't you align with existing HW_CAP_* flags? why do you need a separate
place holder?

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


Re: [ath9k-devel] [PATCH 02/10] ath9k: Add definitions and structures to support WoW

2012-06-19 Thread Rajkumar Manoharan
On Tue, Jun 19, 2012 at 09:17:22PM +0530, Mohammed Shafi Shajakhan wrote:
 From: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 
 *add structures, macros and variables for WoW, so that the driver
 can make use of it.
 *maintain a list for user enabled patterns and masks
 *track pattern slots for the hardware limitation on the
 maximum number of patterns that can be stored.
 *track interrupts enabled before WoW suspend, so
 that can be reconfigured after resume
 *have macros to parse user defined wow configurations to
 hardware code
 
 Cc: Senthil Balasubramanian senth...@qca.qualcomm.com
 Cc: Rajkumar Manoharan rmano...@qca.qualcomm.com
 Cc: vadi...@qca.qualcomm.com
 Tested-by: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 Signed-off-by: Luis R. Rodriguez mcg...@qca.qualcomm.com
 Signed-off-by: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 ---
  drivers/net/wireless/ath/ath9k/ath9k.h |   20 
  drivers/net/wireless/ath/ath9k/hw.h|   21 +
  2 files changed, 41 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h 
 b/drivers/net/wireless/ath/ath9k/ath9k.h
 index a8c0500..264c25b 100644
 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
 @@ -505,6 +505,19 @@ static inline u16 ath9k_btcoex_aggr_limit(struct 
 ath_softc *sc,
  }
  #endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */
  
 +struct ath9k_wow_pattern {
 + bool slot;
 + u8 pattern_bytes[MAX_PATTERN_SIZE];
 + u8 mask_bytes[MAX_PATTERN_SIZE];
 + u32 pattern_len;
 + struct list_head list;
 +};
 +
 +struct ath9k_wow_info {
 + u32 num_of_patterns;
 + struct list_head wow_patterns;
 +};
 +
  //
  /*   LED Control*/
  //
 @@ -706,6 +719,13 @@ struct ath_softc {
   struct ath_ant_comb ant_comb;
   u8 ant_tx, ant_rx;
   struct dfs_pattern_detector *dfs_detector;
 +
 +#ifdef CONFIG_PM_SLEEP
 + bool wow_got_bmiss_intr;
 + bool wow_sleep_proc_intr; /* in the middle of WoW sleep ? */
 + u32 wow_intr_before_sleep;
 + struct ath9k_wow_info wow_info;
 +#endif
  };
  
  void ath9k_tasklet(unsigned long data);
 diff --git a/drivers/net/wireless/ath/ath9k/hw.h 
 b/drivers/net/wireless/ath/ath9k/hw.h
 index 03d5909..d0e14a3 100644
 --- a/drivers/net/wireless/ath/ath9k/hw.h
 +++ b/drivers/net/wireless/ath/ath9k/hw.h
 @@ -179,6 +179,24 @@
  #define PAPRD_TABLE_SZ   24
  #define PAPRD_IDEAL_AGC2_PWR_RANGE   0xe0
  
 +/* Wake on Wireless */
 +
 +#define MAX_PATTERN_SIZE 256
 +#define MAX_PATTERN_MASK_SIZE32
 +#define MAX_NUM_PATTERN  8
 +#define MAX_NUM_USER_PATTERN 6 /*  deducting the disassociate and
 +   deauthenticate packets */
 +
 +/*
 + * WoW trigger mapping to hardware code
 + */
 +
 +#define AH_WOW_USER_PATTERN_EN   BIT(0)
 +#define AH_WOW_MAGIC_PATTERN_EN  BIT(1)
 +#define AH_WOW_LINK_CHANGE   BIT(2)
 +#define AH_WOW_BEACON_MISS   BIT(3)
 +#define AH_WOW_MAX_EVENTS4
Why do you need AH_WOW_MAX_EVENT? It looks like out of sync and also it is 
never be used.

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


Re: [ath9k-devel] [PATCH 07/10] ath9k_hw: Add hardware code for WoW

2012-06-19 Thread Rajkumar Manoharan
On Tue, Jun 19, 2012 at 09:17:27PM +0530, Mohammed Shafi Shajakhan wrote:
 From: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 
 add a new file wow.c which takes care of the hardware code
 for WoW.
[...]
 ---
  3 files changed, 591 insertions(+), 0 deletions(-)
  create mode 100644 drivers/net/wireless/ath/ath9k/wow.c
 
 diff --git a/drivers/net/wireless/ath/ath9k/Makefile 
 b/drivers/net/wireless/ath/ath9k/Makefile
 index 9c41232..2ad8f94 100644
 --- a/drivers/net/wireless/ath/ath9k/Makefile
 +++ b/drivers/net/wireless/ath/ath9k/Makefile
 @@ -17,6 +17,7 @@ ath9k-$(CONFIG_ATH9K_DFS_CERTIFIED) += \
   dfs.o \
   dfs_pattern_detector.o \
   dfs_pri_detector.o
 +ath9k-$(CONFIG_PM_SLEEP) += wow.o
  
  obj-$(CONFIG_ATH9K) += ath9k.o
  
 diff --git a/drivers/net/wireless/ath/ath9k/hw.h 
 b/drivers/net/wireless/ath/ath9k/hw.h
 index 2a20216..8e417c1 100644
 --- a/drivers/net/wireless/ath/ath9k/hw.h
 +++ b/drivers/net/wireless/ath/ath9k/hw.h
 @@ -1110,6 +1110,37 @@ ath9k_hw_get_btcoex_scheme(struct ath_hw *ah)
  }
  #endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */
  
 +
 +#ifdef CONFIG_PM_SLEEP
 +const char *ath9k_hw_wow_event_to_string(u32 wow_event);
 +void ath9k_hw_wow_apply_pattern(struct ath_hw *ah, u8 *user_pattern,
 + u8 *user_mask, int pattern_count,
 + int pattern_len);
 +u32 ath9k_hw_wow_wakeup(struct ath_hw *ah);
 +void ath9k_hw_wow_enable(struct ath_hw *ah, u32 pattern_enable);
 +#else
 +static inline const char *ath9k_hw_wow_event_to_string(u32 wow_event)
 +{
 + return NULL;
 +}
 +static inline void ath9k_hw_wow_apply_pattern(struct ath_hw *ah,
 +   u8 *user_pattern, u8 *user_mask,
 +   int pattern_count,
 +   int pattern_len)
 +{
 + return;
 +}
No need to return void function and also fix indent for arguments
 +static inline u32 ath9k_hw_wow_wakeup(struct ath_hw *ah)
 +{
 + return 0;
 +}
 +static inline void ath9k_hw_wow_enable(struct ath_hw *ah, u32 pattern_enable)
 +{
 +}
 +#endif
 +
 +
 +
  #define ATH9K_CLOCK_RATE_CCK 22
  #define ATH9K_CLOCK_RATE_5GHZ_OFDM   40
  #define ATH9K_CLOCK_RATE_2GHZ_OFDM   44
 diff --git a/drivers/net/wireless/ath/ath9k/wow.c 
 b/drivers/net/wireless/ath/ath9k/wow.c
 new file mode 100644
 index 000..66a7a74
 --- /dev/null
 +++ b/drivers/net/wireless/ath/ath9k/wow.c
 @@ -0,0 +1,559 @@
 +
 +/*
 + * Copyright (c) 2008-2011 Atheros Communications Inc.
 + *
Please update the Copyright.

 +
 +#include linux/export.h
 +#include ath9k.h
 +#include reg.h
 +#include hw-ops.h
 +
[...]
 + if (AR_SREV_9285(ah) || AR_SREV_9287(ah))
 + set = AR9285_WA_DEFAULT;
 + else
 + set = AR9280_WA_DEFAULT;
 +
 + /*
 +  * In AR9280 and AR9285, bit 14 in WA register
 +  * (disable L1) should only be set when device
 +  * enters D3 state and be cleared when device
 +  * comes back to D0
 +  */
 +
 + if (ah-config.pcie_waen  AR_WA_D3_L1_DISABLE)
 + set = set | AR_WA_D3_L1_DISABLE;
 +
 + clr = AR_WA_UNTIE_RESET_EN;
 + set = set | AR_WA_RESET_EN | AR_WA_POR_SHORT;
simplify it as |=

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


Re: [ath9k-devel] [PATCH] ath9k_hw: avoid possible infinite loop in ar9003_get_pll_sqsum_dvc

2012-06-18 Thread Rajkumar Manoharan
On Mon, Jun 18, 2012 at 01:13:30PM +0530, Mohammed Shafi Shajakhan wrote:
 From: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 
 ath9k: Fix softlockup in AR9485 with commit id
 64bc1239c790e051ff677e023435d770d2ffa174 fixed the reported
 issue, yet its better to avoid the possible infinite loop
 in ar9003_get_pll_sqsum_dvc by having a timeout as suggested
 by ath9k maintainers.
 http://www.spinics.net/lists/linux-wireless/msg92126.html.
 Based on my testing PLL's locking measurement is done in
 ~200us (2 iterations).
 
 Cc: sta...@vger.kernel.org
 Cc: Rolf Offermanns rolf.offerma...@gmx.net
 Cc: Sujith Manoharan c_man...@qca.qualcomm.com
 Cc: Senthil Balasubramanian senth...@qca.qualcomm.com
 Signed-off-by: Mohammed Shafi Shajakhan moham...@qca.qualcomm.com
 ---
  drivers/net/wireless/ath/ath9k/hw.c |   14 +-
  1 files changed, 13 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/net/wireless/ath/ath9k/hw.c 
 b/drivers/net/wireless/ath/ath9k/hw.c
 index 784baee..a42c26f 100644
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
 @@ -773,13 +773,25 @@ static void ath9k_hw_init_qos(struct ath_hw *ah)
  
  u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
  {
 + struct ath_common *common = ath9k_hw_common(ah);
 + int i = 0;
 +
   REG_CLR_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
   udelay(100);
   REG_SET_BIT(ah, PLL3, PLL3_DO_MEAS_MASK);
  
 - while ((REG_READ(ah, PLL4)  PLL4_MEAS_DONE) == 0)
 + while ((REG_READ(ah, PLL4)  PLL4_MEAS_DONE) == 0) {
 +
   udelay(100);
  
 + if (WARN_ON_ONCE(i = 100)) {
 + ath_err(common, PLL4 meaurement not done\n);
 + break;
 + }
 +
 + i++;
How did you come up with 100 as max limit to break the loop?

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


[ath9k-devel] [RFC] ath9k: populate legacy rate in rate init

2012-06-12 Thread Rajkumar Manoharan
Currently the legacy mode OFDM rate are never be populated
while initializing rate control. The assumption is that most
of legacy mode OFDM rates by MCS series. But this could also
end up with no legacy rates being filled in 11NA mode whereas
CCK rates are filled in 11NG mode. This patch fills up supported
legacy rate during rate control init. So that the frames can
be tried in legacy rate also in 5GHz.

Signed-off-by: Rajkumar Manoharan rmano...@qca.qualcomm.com
---
 drivers/net/wireless/ath/ath9k/rc.c |2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/rc.c 
b/drivers/net/wireless/ath/ath9k/rc.c
index e034add..c04b1e6 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -541,8 +541,6 @@ static u8 ath_rc_setvalid_rates(struct ath_rate_priv 
*ath_rc_priv,
 * (VALID/VALID_20/VALID_40) flags */
 
if ((rate == dot11rate) 
-   (rate_flags  WLAN_RC_CAP_MODE(capflag)) ==
-   WLAN_RC_CAP_MODE(capflag) 
(rate_flags  WLAN_RC_CAP_STREAM(capflag)) 
!WLAN_RC_PHY_HT(phy)) {
u8 valid_rate_count = 0;
-- 
1.7.10.2

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


Re: [ath9k-devel] [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM

2011-07-26 Thread Rajkumar Manoharan
On Mon, Jul 25, 2011 at 04:01:52PM +0200, Stanislaw Gruszka wrote:
 On Mon, Jul 25, 2011 at 11:29:30AM +0200, Stanislaw Gruszka wrote:
  On Sat, Jul 23, 2011 at 10:41:30AM +0530, Rajkumar Manoharan wrote:
+   /* initalize PCIe PM registers if device introduce itself as 
PCIe */
+   if (ah-is_pciexpress)
+   ath9k_hw_ops(ah)-config_pci_powersave(ah, false);
+
   Use ath9k_hw_configpcipowersave wrapper instead.
  I changed wrapper to check ah-aspm_enabled, so if I would use it here
  it will not setup registers. I think I should comment that. 
 
Yeah. I got it. I think ah-aspm_enabled alone is sufficient in the wrapper
function. 
   And ensure that there is no
   sideeffect by changing SERDES config from __ath9k_hw_init to pci_probe.
  Hmm, not sure if I understand what I have to do :-(
  
  We have something like that:
  
  ath_pci_probe
ath9k_init_device
  ath9k_init_softc
ath9k_hw_init
  __ath9k_hw_init
  ath9k_hw_configpcipowersave();
  
  I changed it this way:
  
  ath_pci_probe
ath9k_init_device
  ath9k_init_softc
ath9k_hw_init
  __ath9k_hw_init
  
ath9k_init_queues
ath9k_init_btcoex
 some other inits
   
ath9k_hw_configpcipowersave();
  
  Can this cause some side effects?
 
 Actually this movement is not necessary, in the way things I did
 currently. Is enough to replace ath9k_hw_configpcipowersave() by
 ath9k_hw_ops(ah)-config_pci_powersave() in __ath9k_hw_init().
 In such case SERDES and PCIe PM registers will be always initialized.
 
 However movement would be needed if we want to initialize registers,
 only when ASPM is enabled, hence we first need to discovery that,
 and then eventually call ath9k_hw_configpcipowersave().
 
 Which option is correct: always initialize SERDES and PCIe PM registers
 or do it only if ASPM is enabled?

Good point. Let them configured on ASPM case. please cross check with other
embed platform.

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


Re: [ath9k-devel] [RFC/RFT 4/6] ath9k: use common PCIe ASPM definces instead of custom ones

2011-07-23 Thread Rajkumar Manoharan
On Fri, Jul 22, 2011 at 03:31:50PM +0200, Stanislaw Gruszka wrote:
 Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com
 ---
  drivers/net/wireless/ath/ath9k/hw.h  |4 
  drivers/net/wireless/ath/ath9k/pci.c |   11 ++-
  2 files changed, 6 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/net/wireless/ath/ath9k/hw.h 
 b/drivers/net/wireless/ath/ath9k/hw.h
 index 2f25577..3f941f0 100644
 --- a/drivers/net/wireless/ath/ath9k/hw.h
 +++ b/drivers/net/wireless/ath/ath9k/hw.h
 @@ -1028,10 +1028,6 @@ void ath9k_ani_reset(struct ath_hw *ah, bool 
 is_scanning);
  void ath9k_hw_proc_mib_event(struct ath_hw *ah);
  void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan);
  
 -#define ATH_PCIE_CAP_LINK_CTRL   0x70
 -#define ATH_PCIE_CAP_LINK_L0S1
 -#define ATH_PCIE_CAP_LINK_L1 2
 -
  #define ATH9K_CLOCK_RATE_CCK 22
  #define ATH9K_CLOCK_RATE_5GHZ_OFDM   40
  #define ATH9K_CLOCK_RATE_2GHZ_OFDM   44
 diff --git a/drivers/net/wireless/ath/ath9k/pci.c 
 b/drivers/net/wireless/ath/ath9k/pci.c
 index 480e25b..29eba63 100644
 --- a/drivers/net/wireless/ath/ath9k/pci.c
 +++ b/drivers/net/wireless/ath/ath9k/pci.c
 @@ -16,6 +16,7 @@
  
  #include linux/nl80211.h
  #include linux/pci.h
 +#include linux/pci-aspm.h
  #include linux/ath9k_platform.h
  #include ath9k.h
  
 @@ -99,9 +100,9 @@ static void ath_pci_bt_coex_prep(struct ath_common *common)
   if (!pci_is_pcie(pdev))
   return;
  
 - pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, aspm);
 - aspm = ~(ATH_PCIE_CAP_LINK_L0S | ATH_PCIE_CAP_LINK_L1);
 - pci_write_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, aspm);
 + pci_read_config_byte(pdev, PCI_EXP_LNKCTL, aspm);
 + aspm = ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
 + pci_write_config_byte(pdev, PCI_EXP_LNKCTL, aspm);
  }

There seems to be where address diff b/w ATH_PCIE_CAP_LINK_CTRL 
PCI_EXP_LNKCTL. It has to be like pcie_config_aspm_dev. Isn't it?

  static void ath_pci_extn_synch_enable(struct ath_common *common)
 @@ -139,8 +140,8 @@ static void ath_pci_check_aspm(struct ath_softc *sc)
   if (WARN_ON(!parent))
   return;
  
 - pci_read_config_byte(parent, ATH_PCIE_CAP_LINK_CTRL, aspm);
 - if (aspm  (ATH_PCIE_CAP_LINK_L0S | ATH_PCIE_CAP_LINK_L1))
 + pci_read_config_byte(parent, PCI_EXP_LNKCTL, aspm);
Same as above.

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


Re: [ath9k-devel] [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM

2011-07-23 Thread Rajkumar Manoharan
On Fri, Jul 22, 2011 at 03:31:52PM +0200, Stanislaw Gruszka wrote:
 We might not initialize registers if ah-aspm_enabled == false, assure
 we do this.
 
 Signed-off-by: Stanislaw Gruszka sgrus...@redhat.com
 ---
  drivers/net/wireless/ath/ath9k/hw.c  |5 +
  drivers/net/wireless/ath/ath9k/pci.c |4 
  2 files changed, 5 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/wireless/ath/ath9k/hw.c 
 b/drivers/net/wireless/ath/ath9k/hw.c
 index 4ef7313..7084bb5 100644
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
 @@ -595,10 +595,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
  
   ath9k_hw_init_mode_regs(ah);
  
 -
 - if (ah-is_pciexpress)
 - ath9k_hw_configpcipowersave(ah, false);
 - else
 + if (!ah-is_pciexpress)
   ath9k_hw_disablepcie(ah);
  
   if (!AR_SREV_9300_20_OR_LATER(ah))
 diff --git a/drivers/net/wireless/ath/ath9k/pci.c 
 b/drivers/net/wireless/ath/ath9k/pci.c
 index 835a50a..d1c75ec 100644
 --- a/drivers/net/wireless/ath/ath9k/pci.c
 +++ b/drivers/net/wireless/ath/ath9k/pci.c
 @@ -118,6 +118,10 @@ static void ath_pci_aspm_init(struct ath_softc *sc)
   if (!pci_is_pcie(pdev))
   return;
  
 + /* initalize PCIe PM registers if device introduce itself as PCIe */
 + if (ah-is_pciexpress)
 + ath9k_hw_ops(ah)-config_pci_powersave(ah, false);
 +
Use ath9k_hw_configpcipowersave wrapper instead. And ensure that there is no
sideeffect by changing SERDES config from __ath9k_hw_init to pci_probe.

--
Rajkumar
   parent = pdev-bus-self;
  
   if (ah-btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) {
 -- 
 1.7.1
 
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] target unresponsive form ath9k_htc.

2011-01-02 Thread Rajkumar Manoharan
hello everybody,

i try to get a TP-Link WN821n v3 usb wifi adapter to work with 2.6.37-rc8, but 
i get a target is unresponsive every time i load ath9k_htc into the kernel.

here is the output by dmesg after modprobe:
usb 1-1: new high speed USB device using ehci_hcd and address 4
usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x83 has invalid 
maxpacket 64
usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x4 has invalid 
maxpacket 64
usb 1-1: ath9k_htc: Transferred FW: ar7010_1_1.fw, size: 70624
usb 1-1: ath9k_htc: Target is unresponsive
Failed to initialize the device
ath9k_hif_usb: probe of 1-1:1.0 failed with error -22

i have tried compat-wireless from 2010-12-26 and the linux-firmware, which i 
have downloaded today 2011-01-01).

How should i approach this problem? Thank you in advance!

Hi Yevgeniy,

What is the PID/VID of your USB dongle? 

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


Re: [ath9k-devel] Not able to connect to an access point with ar9271

2010-12-03 Thread Rajkumar Manoharan
On Tue, Nov 30, 2010 at 12:46:15AM +0530, Matthias Bernges wrote:
 Hello,
 
 2010/11/29 Mohammed Shafi shafi.at...@gmail.com:
  On Sun, Nov 28, 2010 at 7:49 PM, Matthias Bernges
  matthiasbern...@gmx.de wrote:
  ,Hello,
 
  2010/11/26 Mohammed Shafi shafi.at...@gmail.com:
  On Fri, Nov 26, 2010 at 12:17 AM, Matthias Bernges
  matthiasbern...@gmx.de wrote:
  Hello,
 
  I've a TP-Link TL-WN422G using Atheros AR9271 chipset. I have
  downloaded and installed compat-wireless-2.6.36-4 and copied the
  newest ar9271.fw to /lib/firmware.
  Can you please try with the latest compat-wrieless from
  http://wireless.kernel.org/download/compat-wireless-2.6/
 
  The driver recognizes the stick and I am able to scan using iwlist
  wlan0 scan. But I am not able to connect to a network.
 
  I have tried unencrypted und WEP-encrypted networks using iwconfig. No
  error occurs but when I do iwconfig it says:
  Access Point: Not-Associated
 
  while using commands to connect to a AP please disable the Network Manager
 
  Good point. This helped for connecting to WPA networks using 
  wpa_supplicant.
  But the behavior of iwconfig, while connecting to unencrypted or
  WEP-encrypted networks, didn't change.
 
  Ideally it should be working.Can you just send me the iwconfig
  commands you use to connect to WEP-encrypted networks or
  open-networks.
 
 I have used the following commands:
 
 iwconfig wlan0 essid Pasta
 iwconfig wlan0 essid Pasta key 11
 
 It connects to the same box I was able to connect using WPA2, so it
 cannot be because of to large distance. I also copy-pasted the
 commands to a different machine and could successfully connect.

Pleas try following sequence

iwconfig wlan0 enc on
iwconfig wlan0 essid Pasta key 11

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


Re: [ath9k-devel] ath9k_htc, 2.6.36 and Target is unresponsive error

2010-12-03 Thread Rajkumar Manoharan
On Mon, Nov 22, 2010 at 09:17:16PM +0530, Petr Štetiar wrote:
 Mohammed Shafi shafi.wirel...@gmail.com [2010-11-22 19:11:53]:
 
  Can you just please  look into the status of CONFIG_PM  in
  include/generated/autoconf.h, what is its value ?
 
 I don't use PM, so it's not in this file.

Please apply the following patch and try again

https://patchwork.kernel.org/patch/369751/

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


Re: [ath9k-devel] ath9k_htc, 2.6.36 and Target is unresponsive error

2010-12-03 Thread Rajkumar Manoharan
On Fri, Dec 03, 2010 at 04:06:45PM +0530, Rajkumar Manoharan wrote:
 On Mon, Nov 22, 2010 at 09:17:16PM +0530, Petr Štetiar wrote:
  Mohammed Shafi shafi.wirel...@gmail.com [2010-11-22 19:11:53]:
  
   Can you just please  look into the status of CONFIG_PM  in
   include/generated/autoconf.h, what is its value ?
  
  I don't use PM, so it's not in this file.
 
 Please apply the following patch and try again
 
 https://patchwork.kernel.org/patch/369751/
 

Please apply the following firmware patch on linux-firmware git
then use the updated ar9271.fw

http://marc.info/?l=linux-wirelessm=128214177613540w=3

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


Re: [ath9k-devel] Netgear WNA1100 and master mode

2010-12-01 Thread Rajkumar Manoharan
On Wed, Dec 01, 2010 at 06:44:15PM +0530, Mohammed Shafi wrote:
 On Wed, Dec 1, 2010 at 6:24 PM, Misha Shnurapet
 shnura...@fedoraproject.org wrote:
  Hi.
 
  Does Netgear WNA1100 USB adapter support master mode?
 
 Yes , you have to use hostapd for that.you cannot use iwconfig command
 to set it as a master mode.
 
Hi Misha,

ath9k_htc does not support AP mode as of now. we are working on it. To enable
AP mode support for ath9k_htc use the follwoing patch

https://patchwork.kernel.org/patch/106640/

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


Re: [ath9k-devel] ath9k_htc: deauthenticated Reason: 16

2010-11-28 Thread Rajkumar Manoharan
On Sun, Nov 28, 2010 at 10:33:34PM +0530, jacopo mondi wrote:
 Thank you all for your responses...
 
 I'm using latest firmware from linux-firmware git repo (size corresponds
 to the one mentioned in the post you were referring to).
 I've also applied that 1 line patch suggested by Rajkumar Manoharan.
 
 I've done different tries, and registered logs, in order to provide
 more debug informations I can.
 
 ath9k_htc (no debug, nohwcrypt=0)
 http://pastebin.com/QVJkHMzy
 As you can see CRDA thinks I'm in China, which is not true. I think
 that information is taken from some kind of chip memory (log talks
 about EEPROM), and I've no idea if it's important to change that
 information and how to do that.
 Connection is unstable and disconnection happens about every 30 seconds.
 
 ath9k_htc (debug=601, nohwcrypt=0)
 http://pastebin.com/Z045ZDFQ
 Same situation as before but with huge debugging infos
 
 When enabling nohwcrypt connection seems to be stable, but I've to
 guess that doing encryption entirely in software decreases overall
 performances.
 Since hw encryption seems to introduce problems, could it be a firmware
 related issue?
Yes it seems to be. Please apply the following firmware patch
which is yet to be intergrated into git tree.
http://marc.info/?l=linux-wirelessm=128214177613540w=3

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


Re: [ath9k-devel] ath9k_htc: deauthenticated Reason: 16

2010-11-26 Thread Rajkumar Manoharan
On Fri, Nov 26, 2010 at 10:29:41PM +0530, jacopo mondi wrote:
 Hi all,
   using ath9k_htc with an AR9271 device for connecting to a
 standard WPA-PSK protected 802.11/g network my connection is not stable
 and i receive back 
 wlan0: deauthenticated from X (Reason: 16)
 every 30seconds..
 
 I'm using a custom 2.6.36-omap-pm kernel over a omap3 beagleboard.
 Could anyone explain what does 'Reason 16' means?

group key handshake timed out. Please apply the following patch
and check it.
https://patchwork.kernel.org/patch/335151/

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


Re: [ath9k-devel] TKIP MIC failure with netgear AP

2010-11-17 Thread Rajkumar Manoharan
Hi Wang Min,

Please apply the attched patch and check ccmp in both legacy and 11n mode.

patch -p1  qos_fix.patch

--
Rajkumar
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 
b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 5324ffd..7795867 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -128,7 +128,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct 
sk_buff *skb)
tx_hdr.data_type = ATH9K_HTC_NORMAL;
}
 
-   if (ieee80211_is_data(fc)) {
+   if (ieee80211_is_data_qos(fc)) {
qc = ieee80211_get_qos_ctl(hdr);
tx_hdr.tidno = qc[0]  IEEE80211_QOS_CTL_TID_MASK;
}
-- 
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] TKIP MIC failure with netgear AP

2010-11-15 Thread Rajkumar Manoharan
On Mon, Nov 15, 2010 at 12:59:46PM +0530, Wang Min wrote:
 Hi Rajkumar,
 Please see the log:
 
 Ccmp: from the log, it seems pass the 4-way handshake and build the
 connection.
 But the dhcp cannot work. It should mean the encryption is not correct
 for the data packets
Have you tried with static ip configuration? And please send tkip  ccmp log 
without
nohwcrypt param.
 
 Because the WEP is good, so the RC4 should be ok in hardware module.
 If the software encryption is ok for TKIP, the problem should come from
 firmware. Am I right?
Might be.
   Original ath9k  with Nohwcrypt=1
   TKIPAES TKIPAES
 Netgear JWNR2000: NOK NOK OK  NOK
 Netgear WGU624  : OK  OK  OK  OK
 Netcor  NW605+  : NOK NOK OK  NOK
Since both tkip and ccmp are working with Netgear WGU624, try with latest
Netgear JWNR2000's firmware.

Thanks,
Rajkumar

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


Re: [ath9k-devel] TKIP MIC failure with netgear AP

2010-11-15 Thread Rajkumar Manoharan
On Mon, Nov 15, 2010 at 02:30:19PM +0530, Wang Min wrote:
 Hi Rajkumar
 
 After long time waiting, I found the ccmp ip address can be gotten. but
 it's very slow.
 After ping the AP from pc, the packet loss rate is very high. So the
 reason why the network cannot work should be because the DHCP is time
 out.
 So there is my question, Do the nohwcrypt=1 is working for CCMP? If not,
 I guess the packet is lost in firmware because of slow/wrong packet
 encryption/decryption
 
 And I have tried a laptop, it can connect by both mode; So I think It's
 not AP issue.
 And maybe it is not cooperate with other APs, even we do not know.

It looks like that network-manager terminates the connection, due to unable
to aquire ip address was from dhcp server. Configure static ip address
and check whether unicast data traffic gone thru. And check with
broadcast/multicast traffic too. 

enable CONFIG_MAC80211_VERBOSE_DEBUG=y  CONFIG_ATH9K_HTC_DEBUGFS=y 
in config.mk. 

modprobe ath9k_htc debug=601. 

Please send sniffer trace and dmesg log for failure cases.

Thanks,
Rajkumar
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] TKIP MIC failure with netgear AP

2010-11-14 Thread Rajkumar Manoharan
On Mon, Nov 15, 2010 at 11:06:36AM +0530, Wang Min wrote:
 Hi Rajkumar,
 
 
 I have tested with other APs
   Original ath9k  with Nohwcrypt=1
   TKIPAES TKIPAES 
 Netgear JWNR2000: NOK NOK OK  NOK 
 Netgear WGU624  : OK  OK  OK  OK
 Netcor  NW605+  : NOK NOK OK  NOK
 Thomson TG789 OK  OK
 I can 
 
 The nohwcrypt=1 parameter is working for TKIP.
 I have tried 2 system, ubuntu and android(on my development board); the
 phenomenon is the same;
 On my android system, the compat-wireless is 0612 version;
 On ubuntu system, the compat-wireless is 1108 verion, with
 NetworkManager 0.7.996
 
Hi Wang Min,

Could you please try the same with wpa_supplicant
with debugging option and send me the log.

--
Rajkumar

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


Re: [ath9k-devel] TKIP MIC failure with netgear AP

2010-11-14 Thread Rajkumar Manoharan
On Mon, Nov 15, 2010 at 11:39:54AM +0530, Wang Min wrote:
 Btw,
 If we using nohwcrypt parameter, what does exactly it mean?
 Does it mean the TKIP encryption is totally calculated by software? If
 yes, it will reduce the performance very much.

Yes It does software ecryption. It helps to narrow down the problem with
driver/firmware.

--
Rajkumar

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


Re: [ath9k-devel] TKIP MIC failure with netgear AP

2010-11-12 Thread Rajkumar Manoharan
On Fri, Nov 12, 2010 at 12:26:37PM +0530, Wang Min wrote:
 Hi all,
 
 I am using Compat-wireless-2010-11-08, and ath9k_htc driver for atheros
 AR9271 USB dongle;
 One strange issue is it cannot connect with NetGear AP by WPA-tkip
 encryption mode;
 After comparing test, if in windows XP, it can connect the same AP by
 TKIP encryption(the driver is from Atheros);
 Below is the log, hope somebody can give some clue:
 7[ 1207.902854] cfg80211: All devices are disconnected, going to
 restore regulatory settings
 7[ 1207.902857] cfg80211: Restoring regulatory settings
 6[ 1207.902868] cfg80211: Calling CRDA to update world regulatory
 domain
 6[ 1207.921478] cfg80211: World regulatory domain updated:
 6[ 1207.921481] (start_freq - end_freq @ bandwidth),
 (max_antenna_gain, max_eirp)
 6[ 1207.921484] (2402000 KHz - 2472000 KHz @ 4 KHz), (300 mBi,
 2000 mBm)
 6[ 1207.921486] (2457000 KHz - 2482000 KHz @ 2 KHz), (300 mBi,
 2000 mBm)
 6[ 1207.921488] (2474000 KHz - 2494000 KHz @ 2 KHz), (300 mBi,
 2000 mBm)
 6[ 1207.921490] (517 KHz - 525 KHz @ 4 KHz), (300 mBi,
 2000 mBm)
 6[ 1207.921492] (5735000 KHz - 5835000 KHz @ 4 KHz), (300 mBi,
 2000 mBm)
 7[ 1209.483800] wlan2: authenticate with 30:46:9a:0a:7d:49 (try 1)
 7[ 1209.488178] wlan2: authenticated
 7[ 1209.819297] wlan2: associate with 30:46:9a:0a:7d:49 (try 1)
 7[ 1209.833053] wlan2: RX AssocResp from 30:46:9a:0a:7d:49
 (capab=0x411 status=0 aid=1)
 7[ 1209.833055] wlan2: associated
 7[ 1209.936013] wlan2: disassociated from 30:46:9a:0a:7d:49 (Reason:
 14)
 7[ 1210.052678] wlan2: deauthenticating from 30:46:9a:0a:7d:49 by
 local choice (reason=3)

Please use the latest ar9271 firmware from linux-firmware git.

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


Re: [ath9k-devel] TKIP MIC failure with netgear AP

2010-11-12 Thread Rajkumar Manoharan
On Fri, Nov 12, 2010 at 03:38:57PM +0530, Wang Min wrote:
 hi Rajkumar,
   I am using the ar9271.fw downloaded from linux-firmware git.
 It's 51280bytes;
 
What is the Netgear serial number? WPA tkip is working fine
with Netgear WPN824 v2. Ensure that supplicant config is correct.
Load the ath9k_htc with nohwcrypt param and check it.

modprobe ath9k_htc nohwcrypt=1

--
Rajkumar

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


Re: [ath9k-devel] Build issue with recent compat-wireless

2010-09-29 Thread Rajkumar Manoharan


 Date: Wed, 29 Sep 2010 16:12:15 +0900
 From: ryo.nakagawa@gmail.com
 To: ath9k-devel@lists.ath9k.org
 Subject: Re: [ath9k-devel] Build issue with recent compat-wireless

 HI,
 I found strange charactor in drivers/net/wireless/ath/Makefile Line #5

 obj-$(CONFIG_ATH9K_HW) += ath9k/
 obj-$(CONFIG_ATH_COMMON) += ath.o
 ath-objs := main.o \
 regd.o \
 hw.o \ -
 ath-$(CONFIG_ATH_DEBUG) += debug.o

 Is the following correct?

 obj-$(CONFIG_ATH9K_HW) += ath9k/
 obj-$(CONFIG_ATH_COMMON) += ath.o
 ath-objs := main.o \
 regd.o \
 hw.o
 ath-$(CONFIG_ATH_DEBUG) += debug.o

 regards

 2010/9/29 Dave Lentz :
 As of late, I have not been able to build compat-wireless. The last
 tarball that worked for me was from September 5. I use the driver-select
 script to choose ath9k_htc and make fails with error:

 ./scripts/gen-compat-autoconf.sh config.mk include/linux/compat_autoconf.h
 make -C /lib/modules/2.6.35-6.slh.1-aptosid-amd64/build
 M=/opt/compat-wireless-2010-09-28 modules
 make[1]: Entering directory
 `/usr/src/linux-headers-2.6.35-6.slh.1-aptosid-amd64'
   LD  /opt/compat-wireless-2010-09-28/compat/built-in.o
   CC [M]  /opt/compat-wireless-2010-09-28/compat/main.o
   CC [M]  /opt/compat-wireless-2010-09-28/compat/compat-2.6.36.o
   CC [M]  /opt/compat-wireless-2010-09-28/compat/compat-2.6.37.o
   LD [M]  /opt/compat-wireless-2010-09-28/compat/compat.o
   LD  /opt/compat-wireless-2010-09-28/drivers/net/wireless/built-in.o
   LD
 /opt/compat-wireless-2010-09-28/drivers/net/wireless/ath/built-in.o
   CC [M]  /opt/compat-wireless-2010-09-28/drivers/net/wireless/ath/main.o
   CC [M]  /opt/compat-wireless-2010-09-28/drivers/net/wireless/ath/regd.o
   CC [M]  /opt/compat-wireless-2010-09-28/drivers/net/wireless/ath/hw.o
 make[4]: *** No rule to make target
 `/opt/compat-wireless-2010-09-28/drivers/net/wireless/ath/ath-', needed
 by `/opt/compat-wireless-2010-09-28/drivers/net/wireless/ath/ath.o'.  Stop.
 make[3]: *** [/opt/compat-wireless-2010-09-28/drivers/net/wireless/ath]
 Error 2
 make[2]: *** [/opt/compat-wireless-2010-09-28/drivers/net/wireless] Error 2
 make[1]: *** [_module_/opt/compat-wireless-2010-09-28] Error 2

 I compared makefiles in the ath directory between working and
 non-working tarballs, but they are the same, so I'm not sure what's
 causing this. I am using Debian (apto)sid in the example above, but I
 also experience the same thing with Ubuntu Maverick/10.10.

 Thanks.

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

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

Nop.  It skip to include key.o. The problem is with driver-select script.
apply the change in function select_ath_driver

   perl -i -ne 'print if /'$1'/ || /CONFIG_ATH_/ || /ath-objs/ || /regd.o/ 
|| /hw.o/ || key.o' $ATH_MAKEFILE
---
   perl -i -ne 'print if /'$1'/ || /CONFIG_ATH_/ || /ath-objs/ || /regd.o/ 
|| /hw.o/ ' $ATH_MAKEFILE

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