Re: Atheros QCA6174 (ath10k) not working

2020-09-13 Thread Anthony Jenkins via freebsd-wireless

Thanks Adrian,

Just wondering if there's anything I can do to help.  I have the driver 
repo.


Anthony

On 2020-09-13 14:53, Adrian Chadd wrote:

hi!

we're still working on this. It's going to take some time.

thanks,



-adrian


On Sun, 13 Sep 2020 at 11:12, Anthony Jenkins via freebsd-wireless 
mailto:freebsd-wireless@freebsd.org>> 
wrote:


I have a Killer 1535 802.11ac wireless card (chipset = Qualcomm
Atheros
QCA6174).  I am using the ath10k/athp driver from git repo
https://github.com/erikarn/athp.git .  Driver loads, but trying to
start
the interface fails.  What should I be looking at to fix this?

service netif start wlan2:
---
ifconfig: SIOCIFCREATE2: Input/output error
ifconfig: interface wlan2 does not exist
ifconfig: interface wlan2 does not exist
ifconfig: interface wlan2 does not exist
ifconfig: interface wlan2 does not exist
Starting wpa_supplicant.
/etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant
ifconfig: interface wlan2 does not exist
rtsol: failed to get link layer information for wlan2
rtsol: failed to initialize wlan2
Starting Network: wlan2.
ifconfig: interface wlan2 does not exist
---

Kernel messages:
---
athp0: ath10k_start: called; state=0
athp0: ath10k_start: state=1
athp0: ath10k_download_cal_dt: TODO: device tree check
athp0: ath10k_wmi_event_service_ready_work: TODO: EEPROM code:
0x0069
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
...
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: ath10k_wmi_cmd_send: failed (-35)
athp0: failed to enable PMF QOS: -35
athp0: ath10k_core_stop: state=1
athp0: ath10k_wait_for_suspend: state=1
athp0: ath10k_wmi_pdev_suspend_target: called
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
...
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: ath10k_wmi_cmd_send: failed (-35)
athp0: could not suspend target (-35)
athp0: ath10k_pci_irq_sync: TODO
athp0: ath10k_pci_kill_tasklet: called
athp0: ath10k_htt_tx_free: called
athp0: ath10k_htt_tx_free: tearing down htt locks
athp0: athp_vap_create: ath10k_start failed; ret=-35
---

Some notable errors from 'kldload if_athp.ko':

* Driver fails to load firmware file
athp_QCA6174_hw3.0/firmware-5.bin;
it does load file 'athp_QCA6174_hw3.0_firmware-4.bin'.

athp0: ath10k_fetch_fw_file: firmware_get: athp_cal-pci-athp0.bin
athp_cal-pci-athp0.bin: could not load firmware image, error 2
athp0: ath10k_fetch_fw_file: firmware_get:
athp_QCA6174_hw3.0_board.bin
firmware: 'athp_QCA6174_hw3.0_board.bin' version 1: 8124 bytes
loaded at
0x84458000
athp0: ath10k_fetch_fw_file: firmware_get:
athp_QCA6174_hw3.0_firmware-5.bin
athp_QCA6174_hw3.0_firmware-5.bin: could not load firmware image,
error 2
athp0: could not fetch firmware file
'athp_QCA6174_hw3.0/firmware-5.bin': -1
athp0: ath10k_fetch_fw_file: firmware_get:
athp_QCA6174_hw3.0_firmware-4.bin
firmware: 'athp_QCA6174_hw3.0_firmware-4.bin' version 1: 733784 bytes
loaded at 0x8445d000

I assume file 'athp_cal-pci-athp0.bin' is optional calibration data.

* 'htc ep 2 out of TX credits (0 < 1)' repeated 144 times

* ath10k_wmi_cmd_send failure

athp0: ath10k_wmi_cmd_send: failed (-35)
athp0: could not suspend target (-35)


My full kernel messages from kldload(8) and netif are at
http://www.qtchat.org/~ajenkins/ .

Thanks,
Anthony Jenkins


___
freebsd-wireless@freebsd.org <mailto:freebsd-wireless@freebsd.org>
mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to
"freebsd-wireless-unsubscr...@freebsd.org
<mailto:freebsd-wireless-unsubscr...@freebsd.org>"




___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Atheros QCA6174 (ath10k) not working

2020-09-13 Thread Anthony Jenkins via freebsd-wireless
I have a Killer 1535 802.11ac wireless card (chipset = Qualcomm Atheros 
QCA6174).  I am using the ath10k/athp driver from git repo 
https://github.com/erikarn/athp.git .  Driver loads, but trying to start 
the interface fails.  What should I be looking at to fix this?


service netif start wlan2:
---
ifconfig: SIOCIFCREATE2: Input/output error
ifconfig: interface wlan2 does not exist
ifconfig: interface wlan2 does not exist
ifconfig: interface wlan2 does not exist
ifconfig: interface wlan2 does not exist
Starting wpa_supplicant.
/etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant
ifconfig: interface wlan2 does not exist
rtsol: failed to get link layer information for wlan2
rtsol: failed to initialize wlan2
Starting Network: wlan2.
ifconfig: interface wlan2 does not exist
---

Kernel messages:
---
athp0: ath10k_start: called; state=0
athp0: ath10k_start: state=1
athp0: ath10k_download_cal_dt: TODO: device tree check
athp0: ath10k_wmi_event_service_ready_work: TODO: EEPROM code: 0x0069
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
...
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: ath10k_wmi_cmd_send: failed (-35)
athp0: failed to enable PMF QOS: -35
athp0: ath10k_core_stop: state=1
athp0: ath10k_wait_for_suspend: state=1
athp0: ath10k_wmi_pdev_suspend_target: called
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
...
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: ath10k_wmi_cmd_send: failed (-35)
athp0: could not suspend target (-35)
athp0: ath10k_pci_irq_sync: TODO
athp0: ath10k_pci_kill_tasklet: called
athp0: ath10k_htt_tx_free: called
athp0: ath10k_htt_tx_free: tearing down htt locks
athp0: athp_vap_create: ath10k_start failed; ret=-35
---

Some notable errors from 'kldload if_athp.ko':

* Driver fails to load firmware file athp_QCA6174_hw3.0/firmware-5.bin; 
it does load file 'athp_QCA6174_hw3.0_firmware-4.bin'.


athp0: ath10k_fetch_fw_file: firmware_get: athp_cal-pci-athp0.bin
athp_cal-pci-athp0.bin: could not load firmware image, error 2
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_board.bin
firmware: 'athp_QCA6174_hw3.0_board.bin' version 1: 8124 bytes loaded at 
0x84458000

athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_firmware-5.bin
athp_QCA6174_hw3.0_firmware-5.bin: could not load firmware image, error 2
athp0: could not fetch firmware file 'athp_QCA6174_hw3.0/firmware-5.bin': -1
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_firmware-4.bin
firmware: 'athp_QCA6174_hw3.0_firmware-4.bin' version 1: 733784 bytes 
loaded at 0x8445d000


I assume file 'athp_cal-pci-athp0.bin' is optional calibration data.

* 'htc ep 2 out of TX credits (0 < 1)' repeated 144 times

* ath10k_wmi_cmd_send failure

athp0: ath10k_wmi_cmd_send: failed (-35)
athp0: could not suspend target (-35)


My full kernel messages from kldload(8) and netif are at 
http://www.qtchat.org/~ajenkins/ .


Thanks,
Anthony Jenkins


___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


General wireless connectivity debugging?

2019-09-06 Thread Anthony Jenkins via freebsd-wireless
I'm running a fairly recent -CURRENT on my laptop with a run(4)-based 
USB wireless adapter.?? I can connect to several wireless access points, 
except for the ones at work.?? One's a Netgear Nighthawk X4.?? I see 
errors related to WPA negotiation:


wpa_cli:

> interface wlan1
Connected to interface 'wlan1.
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>CTRL-EVENT-NETWORK-NOT-FOUND
> select_network 5
OK
<3>CTRL-EVENT-SSID-REENABLED id=5 ssid="EC-LAB-24"
<3>Trying to associate with a0:63:91:89:28:c4 (SSID='EC-LAB-24' 
freq=2422 MHz)

<3>Authentication with a0:63:91:89:28:c4 timed out.
<3>CTRL-EVENT-DISCONNECTED bssid=a0:63:91:89:28:c4 reason=3 
locally_generated=1
<3>CTRL-EVENT-SSID-TEMP-DISABLED id=5 ssid="EC-LAB-24" auth_failures=1 
duration=?? 10 reason=CONN_FAILED

<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
> quit

Interestingly, a 2nd run(4) interface on a Thunderbird dock connects 
just fine.?? The one that doesn't connect is whichever one is plugged 
into a USB port on the laptop.


Can someone suggest some basic wireless connectivity debugging tips??? 
I'd like to add them to the FreeBSD wireless wiki - or are there already 
some tips up there?


Thanks,
Anthony Jenkins
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


ath10k crash + patch

2019-08-17 Thread Anthony Jenkins via freebsd-wireless
I've been trying to run the ath10k driver port from 
https://github.com/erikarn/athp/ 's master branch since I got a laptop 
with a Qualcomm Atheros QCA6174 802.11ac wireless adapter. It would 
load, but then crash the kernel within a few seconds. Today I figured 
out what was wrong; no idea why no one else is seeing it.?? Patch pull 
request is at https://github.com/ScoobiFreeBSD/athp/pull/1 .


Problem was with the hash macro SKB_RX_HASH(x):

#define SKB_RX_HASH(skb)?? (((skb) >> 6) & 
~(ATHP_RX_SKB_HASH_BUCKET_COUNT-1))


It is used to index a hash table with 32 entries 
(ATHP_RX_SKB_HASH_BUCKET_COUNT = 32), but the bitwise inversion operator 
shouldn't be there.


Patch:
diff --git a/otus/freebsd/src/sys/dev/athp/if_athp_htt_rx.c 
b/otus/freebsd/src/sys/dev/athp/if_athp_htt_rx.c

index 4459542..6282902 100644
--- a/otus/freebsd/src/sys/dev/athp/if_athp_htt_rx.c
+++ b/otus/freebsd/src/sys/dev/athp/if_athp_htt_rx.c
@@ -102,7 +102,7 @@ static int ath10k_htt_rx_get_csum_state(struct 
athp_buf *skb);

??static void ath10k_htt_txrx_compl_task(void *arg, int npending);
??static void ath10k_htt_rx_ring_refill_retry(void *arg);

-#define?? SKB_RX_HASH(skb)?? (((skb) >> 6) & 
~(ATHP_RX_SKB_HASH_BUCKET_COUNT-1))
+#define?? SKB_RX_HASH(skb)?? (((skb) >> 6) & 
(ATHP_RX_SKB_HASH_BUCKET_COUNT - 1))


??static struct athp_buf *
??ath10k_htt_rx_find_skb_paddr(struct ath10k *ar, u32 paddr)


Device still doesn't work, but at least it doesn't bring down the whole 
system.?? I can work on getting it working.


Anthony


- Crash dump -
athp0: ath10k_wmi_event_service_ready_work: TODO: EEPROM code: 0x0069


Fatal trap 9: general protection fault while in kernel mode
cpuid = 1; apic id = 01
instruction pointer = 0x20:0x8410055e
stack pointer = 0x28:0xfe01341fa610
frame pointer = 0x28:0xfe01341fa670
code segment?? = base 0x0, limit 0xf, type 0x1b
?? = DPL 0, pres 1, long 1, def32 
0, gran 1
processor eflags?? = interrupt enabled, resume, IOPL = 0
current process = 0 (athp0 ath10k_at_wq)
trap number = 9
panic: general protection fault
cpuid = 1
time = 1566052301
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
0xfe01341fa320

vpanic() at vpanic+0x19d/frame 0xfe01341fa370
panic() at panic+0x43/frame 0xfe01341fa3d0
trap_fatal() at trap_fatal+0x39c/frame 0xfe01341fa430
trap() at trap+0x6c/frame 0xfe01341fa540
calltrap() at calltrap+0x8/frame 0xfe01341fa540
--- trap 0x9, rip = 0x8410055e, rsp = 0xfe01341fa610, rbp = 
0xfe01341fa670 ---
__ath10k_htt_rx_ring_fill_n() at __ath10k_htt_rx_ring_fill_n+0x2ae/frame 
0xfe01341fa670
ath10k_htt_rx_ring_fill_n() at ath10k_htt_rx_ring_fill_n+0x1b/frame 
0xfe01341fa690
ath10k_htt_rx_ring_refill() at ath10k_htt_rx_ring_refill+0x65/frame 
0xfe01341fa6d0

ath10k_core_start() at ath10k_core_start+0x5d1/frame 0xfe01341fa780
ath10k_core_probe_fw() at ath10k_core_probe_fw+0x2d9/frame 
0xfe01341fa830
attempt_ath10k_core_probe_fw() at 
attempt_ath10k_core_probe_fw+0x18/frame 0xfe01341fa890
ath10k_core_register_work() at ath10k_core_register_work+0x27/frame 
0xfe01341fa8e0
taskqueue_run_locked() at taskqueue_run_locked+0x10c/frame 
0xfe01341fa940
taskqueue_thread_loop() at taskqueue_thread_loop+0x88/frame 
0xfe01341fa970

fork_exit() at fork_exit+0x84/frame 0xfe01341fa9b0
fork_trampoline() at fork_trampoline+0xe/frame 0xfe01341fa9b0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
KDB: enter: panic

__curthread () at /usr/src/sys/amd64/include/pcpu.h:246
246 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" 
(OFFSETOF_CURTHREAD));

(kgdb) up 15
#15 0x8410055e in __ath10k_htt_rx_ring_fill_n 
(htt=0xfe00aaccc8f8, num=1023) at ../../dev/athp/if_athp_htt_rx.c:226

warning: Source file is more recent than executable.
226 TAILQ_INSERT_TAIL(>rx_ring.skb_table[SKB_RX_HASH(skb->mb.paddr)],
(kgdb) list
221 
htt->rx_ring.netbufs_ring[idx]);
222
223 if (htt->rx_ring.in_ord_rx) {
224 ATH10K_SKB_RXCB(skb)->paddr = skb->mb.paddr;
225 /* 
hash_add */
226 TAILQ_INSERT_TAIL(>rx_ring.skb_table[SKB_RX_HASH(skb->mb.paddr)],
227
 skb, next);
228 }
229
230 num--;



___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


ath10k driver status?

2019-02-03 Thread Anthony Jenkins via freebsd-wireless
What is the current status of the Atheros ath10k driver effort?  I have 
a QCA6174 80211ac card in my new laptop.


none9@pci0:59:0:0:  class=0x028000 card=0x15351a56 chip=0x003e168c 
rev=0x32 hdr=0x00

    vendor = 'Qualcomm Atheros'
    device = 'QCA6174 802.11ac Wireless Network Adapter'
    class  = network

I pulled/built/loaded 107d83e8 from https://github.com/erikarn/athp.git 
but it panics my kernel whenever i load it:


Fatal trap 9: general protection fault while in kernel mode
cpuid = 8; apic id = 08
instruction pointer = 0x20:0x826089ce
stack pointer   = 0x28:0xfe00aa8275f0
frame pointer   = 0x28:0xfe00aa827650
code segment    = base 0x0, limit 0xf, type 0x1b
    = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags    = interrupt enabled, resume, IOPL = 0
current process = 0 (athp0 ath10k_at_wq)
trap number = 9
panic: general protection fault
cpuid = 8
time = 1547866595
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
0xfe00aa827300

vpanic() at vpanic+0x1b4/frame 0xfe00aa827360
panic() at panic+0x43/frame 0xfe00aa8273c0
trap_fatal() at trap_fatal+0x369/frame 0xfe00aa827410
trap() at trap+0x6c/frame 0xfe00aa827520
calltrap() at calltrap+0x8/frame 0xfe00aa827520
--- trap 0x9, rip = 0x826089ce, rsp = 0xfe00aa8275f0, rbp = 
0xfe00aa827650 ---
__ath10k_htt_rx_ring_fill_n() at __ath10k_htt_rx_ring_fill_n+0x2ae/frame 
0xfe00aa827650
ath10k_htt_rx_ring_fill_n() at ath10k_htt_rx_ring_fill_n+0x1b/frame 
0xfe00aa827670
ath10k_htt_rx_ring_refill() at ath10k_htt_rx_ring_refill+0x65/frame 
0xfe00aa8276b0

ath10k_core_start() at ath10k_core_start+0x5d1/frame 0xfe00aa827770
ath10k_core_probe_fw() at ath10k_core_probe_fw+0x2ef/frame 
0xfe00aa827830
attempt_ath10k_core_probe_fw() at 
attempt_ath10k_core_probe_fw+0x18/frame 0xfe00aa827890
ath10k_core_register_work() at ath10k_core_register_work+0x27/frame 
0xfe00aa8278e0
taskqueue_run_locked() at taskqueue_run_locked+0x10c/frame 
0xfe00aa827940
taskqueue_thread_loop() at taskqueue_thread_loop+0x88/frame 
0xfe00aa827970

fork_exit() at fork_exit+0x84/frame 0xfe00aa8279b0
fork_trampoline() at fork_trampoline+0xe/frame 0xfe00aa8279b0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
KDB: enter: panic

warning: the debug information found in 
"/usr/lib/debug//boot/modules/if_athp.ko.debug" does not match 
"/boot/modules/if_athp.ko" (CRC mismatch).


warning: the debug information found in 
"/usr/lib/debug//boot/modules/athp_QCA6174_hw3.0_board.bin.ko.debug" 
does not match "/boot/modules/athp_QCA6174_hw3.0_board.bin.ko" (CRC 
mismatch).


warning: the debug information found in 
"/usr/lib/debug//boot/modules/athp_QCA6174_hw3.0_firmware-4.bin.ko.debug" 
does not match "/boot/modules/athp_QCA6174_hw3.0_firmware-4.bin.ko" (CRC 
mismatch).


__curthread () at ./machine/pcpu.h:230
230 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" 
(OFFSETOF_CURTHREAD));

(kgdb) where
#0  __curthread () at ./machine/pcpu.h:230
#1  doadump (textdump=) at 
/usr/src/sys/kern/kern_shutdown.c:371
#2  0x8041c35b in db_dump (dummy=, 
dummy2=, dummy3=, dummy4=)

    at /usr/src/sys/ddb/db_command.c:574
#3  0x8041c11d in db_command (last_cmdp=, 
cmd_table=, dopager=1)

    at /usr/src/sys/ddb/db_command.c:481
#4  0x8041beb4 in db_command_loop () at 
/usr/src/sys/ddb/db_command.c:534
#5  0x8041f05f in db_trap (type=, code=out>) at /usr/src/sys/ddb/db_main.c:252
#6  0x807b7e63 in kdb_trap (type=3, code=0, tf=) 
at /usr/src/sys/kern/subr_kdb.c:692
#7  0x80af191a in trap (frame=0xfe00aa827230) at 
/usr/src/sys/amd64/amd64/trap.c:619

#8  
#9  kdb_enter (why=0x80c3ff7b "panic", msg=) at 
/usr/src/sys/kern/subr_kdb.c:479
#10 0x80770021 in vpanic (fmt=, 
ap=0xfe00aa8273a0) at /usr/src/sys/kern/kern_shutdown.c:866
#11 0x8076fdb3 in panic (fmt=0x81115b38  
"/\252\301\200\377\377\377\377")

    at /usr/src/sys/kern/kern_shutdown.c:804
#12 0x80af1d39 in trap_fatal (frame=0xfe00aa827530, eva=0) 
at /usr/src/sys/amd64/amd64/trap.c:929
#13 0x80af117c in trap (frame=0xfe00aa827530) at 
/usr/src/sys/amd64/amd64/trap.c:217

#14 
#15 0x826089ce in __ath10k_htt_rx_ring_fill_n () from 
/boot/modules/if_athp.ko
#16 0x82605c4b in ath10k_htt_rx_ring_fill_n () from 
/boot/modules/if_athp.ko
#17 0x82605bd5 in ath10k_htt_rx_ring_refill () from 
/boot/modules/if_athp.ko

#18 0x825d1851 in ath10k_core_start () from /boot/modules/if_athp.ko
#19 0x825d2d3f in ath10k_core_probe_fw () from 
/boot/modules/if_athp.ko
#20 0x825d6048 in attempt_ath10k_core_probe_fw () from 
/boot/modules/if_athp.ko
#21 0x825d40c7 in ath10k_core_register_work () from 
/boot/modules/if_athp.ko
#22 0x807ca6ac in taskqueue_run_locked 

Re: Ralink RT3290 wifi+bluetooth support?

2016-02-20 Thread Anthony Jenkins via freebsd-wireless
Oh sorry... I'm adding it to ral(4).

Sent from Yahoo Mail on Android 
 
  On Fri, Feb 19, 2016 at 20:51, Adrian Chadd<adrian.ch...@gmail.com> wrote:   
WHich driver family is it?


-a


On 19 February 2016 at 15:55, Anthony Jenkins via freebsd-wireless
<freebsd-wireless@freebsd.org> wrote:
> The Ralink RT3290 PCIe card is supported in Linux but not in FreeBSD.  I'm
> trying to port the Linux bits to FreeBSD, unless someone else has already
> beat me to it...has anyone?  I added the PCI device ID and most of the
> firmware bits, but there's lots of stuff left to do...right now what I have
> panics in the init code.
>
> Thanks,
> Anthony
> ___
> freebsd-wireless@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
  
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"

Ralink RT3290 wifi+bluetooth support?

2016-02-19 Thread Anthony Jenkins via freebsd-wireless
The Ralink RT3290 PCIe card is supported in Linux but not in FreeBSD.  
I'm trying to port the Linux bits to FreeBSD, unless someone else has 
already beat me to it...has anyone?  I added the PCI device ID and most 
of the firmware bits, but there's lots of stuff left to do...right now 
what I have panics in the init code.


Thanks,
Anthony
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: Atheros AR9565 detected, not working

2015-01-10 Thread Anthony Jenkins via freebsd-wireless
Ahhh... make in the module dir, not good?  I've since done a kernel build and 
I noticed it's not showing up (as much).  Why would building the kernel module 
that way cause that behavior?

Anthony
  From: Adrian Chadd adr...@freebsd.org
 To: Anthony Jenkins anthony.b.jenk...@att.net 
Cc: Anthony Jenkins scoobi_...@yahoo.com; wirel...@freebsd.org 
wirel...@freebsd.org 
 Sent: Friday, January 9, 2015 4:00 PM
 Subject: Re: Atheros AR9565 detected, not working
   
Hm, are you buliding as a module by doing make in the module dir? or
by doing a buildkernel?



-a




On 7 January 2015 at 21:10, Anthony Jenkins anthony.b.jenk...@att.net wrote:
 Removing just the ar9300_enable_rf_kill() bit works too, but now ath(4) 
 endlessly spews

    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=3, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=2, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=2, nbufs=128?
    ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
    ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?

 Also changed GPIO patch to not block/just/ pin 11 ops instead of all pins as 
 in previous patch, but if allowing all pins is kosher I'd prefer that.

 Anthony

 On 01/07/2015 09:08, Anthony Jenkins wrote:
 Hi Adrian,

 Just letting you know I haven't died in a shootout with the US FBI or 
 anything, just been working on (and suprisingly fixing) issues with my HP 
 Envy Sleekbook 6 since the holidays.  I'll be cleaning up my patches and 
 posting to the wiki this week (hopefully).  Also still sitting on that ACPI 
 patch for the RTC CMOS handler.

 So, would you mind trying your patch again but only with the bits that
 allow the GPIO pins to be enabled? If that works, then I'll commit
 that
 Just to be clear, instead of commenting out the early exits in the GPIO 
 readers/writers for certain GPIO addresses, I should selectively give the 
 AR9565 a pass?  ...or do you want me to /just/ comment out the early exits, 
 and revert the added call to ar9300_enable_rf_kill() and see if that works?  
 I don't like those early exit bits anyway...
 In parallel I'm going to have to tidy up the rfkill capability
 API to correctly set bits - I'll likely expand the field in the driver
 and have the pre-AR9300 chipset code error out if an out-of-bounds
 gpio value is sent.
 Excellent!  Anything I can help with?  We /have/ an rfkill API?  ...because 
 I need some way to connect my newly-fixed laptop wifi-enable key to some 
 function to enable/disable the radios.  Right now I'm just throwing an event 
 over to devd(8).

 Thanks,
 Anthony

 On 12/23/2014 13:06, Adrian Chadd wrote:
 On 22 December 2014 at 14:57, Adrian Chadd adr...@freebsd.org wrote:

 Ok, let me go see what's going on.
 I dislike when I say let me see what's going on and then I .. see
 what's going on.

 So:

 * the ar5212 HAL does the right thing - it checks the rfkill setup in
 ar5212Reset() and enables it if required
 * it also populates the rfkill data from EEPROM at attach time
 * the sysctl code just grabs the rfkill /eeprom field/ and .. well,
 that's the API. So I have to see if that's the same for the AR9300 or
 not. Grr.

 Well, it kinda is:

 ar9300eep.h:#define EEP_RFSILENT_ENABLED        0x0001  /* bit 0:
 enabled/disabled */
 ar9300eep.h:#define EEP_RFSILENT_ENABLED_S      0      /* bit 0:
 enabled/disabled */
 ar9300eep.h:#define EEP_RFSILENT_POLARITY      0x0002  /* bit 1: polarity */
 ar9300eep.h:#define EEP_RFSILENT_POLARITY_S    1      /* bit 1: polarity */
 ar9300eep.h:#define EEP_RFSILENT_GPIO_SEL      0x00fc  /* bits 2..7:
 gpio PIN */
 ar9300eep.h:#define EEP_RFSILENT_GPIO_SEL_S    2      /* bits 2..7:
 gpio PIN */

 .. but on the AR5212:

 ../ah_eeprom_v1.h:#define AR_EEPROM_RFSILENT_GPIO_SEL    0x001c
 ../ah_eeprom_v1.h:#define AR_EEPROM_RFSILENT_GPIO_SEL_S    2
 ../ah_eeprom_v1.h:#define AR_EEPROM_RFSILENT_POLARITY    0x0002
 ../ah_eeprom_v1.h:#define AR_EEPROM_RFSILENT_POLARITY_S    1
 ../ah_eeprom_v3.h:#define    AR_EEPROM_RFSILENT    0x0f    /* RF
 Silent/Clock Run Enable */
 ../ah_eeprom_v3.h:#define AR_EEPROM_RFSILENT_GPIO_SEL    0x001c
 ../ah_eeprom_v3.h:#define 

Re: Atheros AR9565 detected, not working

2014-12-22 Thread Anthony Jenkins via freebsd-wireless
Will do.  I'm actually thinking about reverting my changes just to see if stock 
ath(4) works (it's been a looong while since I played with bringing it up).  I 
still occasionally see the same behavior I saw before my changes.

I'm using a recent Linux kernel (which works out of the box) to get it working 
in FreeBSD - the keyboard wi-fi LED and hotkey work perfectly there.

Thanks,
Anthony


From: Adrian Chadd adr...@freebsd.org
To: Anthony Jenkins scoobi_...@yahoo.com 
Cc: wirel...@freebsd.org wirel...@freebsd.org 
Sent: Sunday, December 21, 2014 9:39 PM
Subject: Re: Atheros AR9565 detected, not working


Hi!

ok, how'd you build things? a module, or in the kernel?

You need to (a) build it using 'make buildkernel / make installkernel'
and (b) ensure ATH_ENABLE_11N is in your kernel configuration.

The GPIO bits are a bit odd - let me check the other chipset drivers.

Can you compile the tools in src/tools/tools/ath/ - then run this:

ath_prom_dump -i ath0 -d /tmp/ath.dump
ath_ee_9300_print /tmp/ath.dump  /tmp/ath.txt

then email the contents of ath.txt . It'll include the GPIO pin id.

Thanks!



-adrian



On 18 December 2014 at 11:53, Anthony Jenkins scoobi_...@yahoo.com wrote:
 The attached patch seems to get my rfkill GPIO working.  It seems 
 ar9300_enable_rf_kill() is never called.  I added a call to it after 
 ath_hal_enable_rfkill(), but this is probably not the right place (I see it 
 called several times while the interface is up).

 I also found several spots in the GPIO handling code which give up if the 
 GPIO pin is 8, 9, 11 or greater than 13; my rfkill GPIO pin is 11 (0x0B).  I 
 commented these out:


 if ((gpio == AR9382_GPIO_PIN_8_RESERVED)  ||
 (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
 (gpio == AR9382_GPIO_9_INPUT_ONLY))
 {
 return AH_FALSE;
 }



 if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
 (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
 (gpio  AR9382_MAX_GPIO_INPUT_PIN_NUM))
 {
 return;
 }


 Haven't narrowed down which is responsible for me being able to send this 
 email using my AR9565.  Also I'm getting flooded with these messages since 
 moving ath  wlan out of the kernel...my patch broke something, no?

 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?


 Anthony
 
 From: Adrian Chadd adr...@freebsd.org
 To: Anthony Jenkins scoobi_...@yahoo.com
 Cc: freebsd-wireless@freebsd.org freebsd-wireless@freebsd.org
 Sent: Monday, July 29, 2013 10:44 AM
 Subject: Re: Atheros AR9565 detected, not working


 Cool, thanks.

 Please make sure you post patches for all the things you fix. I'd love
 to see this kind of thing work out of the box. :)


 -adrian

 On 29 July 2013 07:36, Anthony Jenkins scoobi_...@yahoo.com wrote:
 Thanks Adrian,

 I've managed to fix a few things on this laptop, the remaining stuff is
 BIOS/ACPI related.  acpi_hp(4) isn't working, has something to do with WMI.
 Hoping if I fix the ACPI stuff I can
 have me AR9565 working.  I'll poke
 around and report back; the RFKill suggestion is a good place to start
 looking.

 Thanks,
 Anthony


 On 07/29/13 10:30, Adrian Chadd wrote:

 Hm, maybe rfkill is set?

 The AR9565 is supported. I have the reference NICs from Atheros; they
 work just fine.

 It may be some kind of ACPI setting to enable/disable RFKill so the
 radio side is actually enabled.

 I'm sorry, I don't have much more than that to offer without having
 the laptop here.

 If someone's willing to send me one, I'll get 10 + wireless working on
 it and then hand it over to ixsystems to join the 'stuff we really
 should get pcbsd running smoothly on' pile. They're about $500 off of

 amazon.com.

 Thanks,



 -adrian

 On 29 July 2013 07:21, Anthony Jenkins scoobi_...@yahoo.com wrote:

 I just got an HP ENVY Sleekbook 6z-1100 laptop hoping it came with a
 FreeBSD-supported wireless NIC.  It has an Atheros AR9565 and looking at
 the
 logs it _seems_ like it should be working, but I get no network traffic.
 I
 haven't started the Atheros debugging procedure yet, save to compile in
 option AH_DEBUG and move ath(4) out of the kernel  to a module to
 facilitate changes.  Works (of course) in Win8 which came with laptop.
 Wireless enabled LED is amber (disabled) in FreeBSD, goes from amber
 to
 white (enabled) when I boot the Win8 HDD.

 Here's various logs and misc. system info.  What should I try next?
 Thanks
 in advance!

 [root@laptop /usr/src]# uname -a n
 FreeBSD laptop.qtchat.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Sat Jul
 27
 23:45:30 EDT 2013 

Re: Atheros AR9565 detected, not working

2014-12-22 Thread Anthony Jenkins via freebsd-wireless
I'll have to re-add the printf()s, but I'm pretty sure I saw 0x0B (of course it 
could have been 0x08 I saw, but neither of those would make it through the 
function - both 0x0B and 0x08 are blocked).

Anthony

On 12/22/2014 14:51, Adrian Chadd wrote:
 See, that's where it's odd:

 | EepromWriteGpio: 16, WlanDisableGpio: 0, WlanLedGpio: 8
 RxBandSelectGpio: 255 |

 .. how'd you figure out it's GPIO 11?



 -adrian


 On 22 December 2014 at 11:39, Anthony Jenkins scoobi_...@yahoo.com wrote:
 Logs attached.

 Thanks,
 Anthony

 On 12/22/2014 11:21, Adrian Chadd wrote:
 Yeah, there's no GPIO check like there is in the reference code.

 The fact it says AR9382 is pretty telling. That's like it's asking for
 a very specific NIC with very specific GPIO mappings. :(



 -adrian


 On 22 December 2014 at 06:03, Anthony Jenkins scoobi_...@yahoo.com wrote:
 Will do.  I'm actually thinking about reverting my changes just to see if 
 stock ath(4) works (it's been a looong while since I played with bringing 
 it up).  I still occasionally see the same behavior I saw before my 
 changes.

 I'm using a recent Linux kernel (which works out of the box) to get it 
 working in FreeBSD - the keyboard wi-fi LED and hotkey work perfectly 
 there.

 Thanks,
 Anthony

 
 From: Adrian Chadd adr...@freebsd.org
 To: Anthony Jenkins scoobi_...@yahoo.com
 Cc: wirel...@freebsd.org wirel...@freebsd.org
 Sent: Sunday, December 21, 2014 9:39 PM
 Subject: Re: Atheros AR9565 detected, not working


 Hi!

 ok, how'd you build things? a module, or in the kernel?

 You need to (a) build it using 'make buildkernel / make installkernel'
 and (b) ensure ATH_ENABLE_11N is in your kernel configuration.

 The GPIO bits are a bit odd - let me check the other chipset drivers.

 Can you compile the tools in src/tools/tools/ath/ - then run this:

 ath_prom_dump -i ath0 -d /tmp/ath.dump
 ath_ee_9300_print /tmp/ath.dump  /tmp/ath.txt

 then email the contents of ath.txt . It'll include the GPIO pin id.

 Thanks!



 -adrian



 On 18 December 2014 at 11:53, Anthony Jenkins scoobi_...@yahoo.com wrote:
 The attached patch seems to get my rfkill GPIO working.  It seems 
 ar9300_enable_rf_kill() is never called.  I added a call to it after 
 ath_hal_enable_rfkill(), but this is probably not the right place (I see 
 it called several times while the interface is up).

 I also found several spots in the GPIO handling code which give up if the 
 GPIO pin is 8, 9, 11 or greater than 13; my rfkill GPIO pin is 11 (0x0B). 
  I commented these out:


 if ((gpio == AR9382_GPIO_PIN_8_RESERVED)  ||
 (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
 (gpio == AR9382_GPIO_9_INPUT_ONLY))
 {
 return AH_FALSE;
 }



 if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
 (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
 (gpio  AR9382_MAX_GPIO_INPUT_PIN_NUM))
 {
 return;
 }


 Haven't narrowed down which is responsible for me being able to send this 
 email using my AR9565.  Also I'm getting flooded with these messages 
 since moving ath  wlan out of the kernel...my patch broke something, no?

 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
 ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
 ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?


 Anthony
 
 From: Adrian Chadd adr...@freebsd.org
 To: Anthony Jenkins scoobi_...@yahoo.com
 Cc: freebsd-wireless@freebsd.org freebsd-wireless@freebsd.org
 Sent: Monday, July 29, 2013 10:44 AM
 Subject: Re: Atheros AR9565 detected, not working


 Cool, thanks.

 Please make sure you post patches for all the things you fix. I'd love
 to see this kind of thing work out of the box. :)


 -adrian

 On 29 July 2013 07:36, Anthony Jenkins scoobi_...@yahoo.com wrote:
 Thanks Adrian,

 I've managed to fix a few things on this laptop, the remaining stuff is
 BIOS/ACPI related.  acpi_hp(4) isn't working, has something to do with 
 WMI.
 Hoping if I fix the ACPI stuff I can
 have me AR9565 working.  I'll poke
 around and report back; the RFKill suggestion is a good place to start
 looking.

 Thanks,
 Anthony


 On 07/29/13 10:30, Adrian Chadd wrote:
 Hm, maybe rfkill is set?

 The AR9565 is supported. I have the reference NICs from Atheros; they
 work just fine.

 It may be some kind of ACPI setting to enable/disable RFKill so the
 radio side is actually enabled.

 I'm sorry, I don't have much more than that to offer without having
 the laptop here.

 If someone's willing to send me one, I'll get 10 + wireless working on
 it and then hand it over to ixsystems to join the 'stuff we really
 should get pcbsd running smoothly on' pile. They're about $500 off 

Re: Atheros AR9565 detected, not working

2014-12-22 Thread Anthony Jenkins via freebsd-wireless
On 12/22/2014 15:22, Adrian Chadd wrote:
 On 22 December 2014 at 11:59, Anthony Jenkins scoobi_...@yahoo.com wrote:
 I'll have to re-add the printf()s, but I'm pretty sure I saw 0x0B (of course 
 it could have been 0x08 I saw, but neither of those would make it through 
 the function - both 0x0B and 0x08 are blocked).
 Please do. I'd like to fix up the HAL and driver to use the EEPROM
 provided LED and RFKILL GPIO fields if they're populated and valid.
Here's the chunk of boot messages for ath(4) on my laptop; it was 0x0B as I 
originally thought:

Dec 22 16:47:59 ajenkins-hplaptop kernel: pcib2: allocated memory range 
(0xf010-0xf017) for rid 10 of pci0:2:0:0
Dec 22 16:47:59 ajenkins-hplaptop kernel: pcib2: matched entry for 2.0.INTA
Dec 22 16:47:59 ajenkins-hplaptop kernel: pcib2: slot 0 INTA hardwired to IRQ 17
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Qualcomm Atheros AR9565 mem 
0xf010-0xf017 irq 17 at device 0.0 on pci2
Dec 22 16:47:59 ajenkins-hplaptop kernel: ioapic0: routing intpin 17 (PCI IRQ 
17) to lapic 16 vector 53
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: WB335 1-ANT card detected
Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_attach: calling 
ar9300_hw_attach
Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_hw_attach: calling 
ar9300_eeprom_attach
Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_flash_map: unimplemented for 
now
Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from DRAM
Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from EEPROM
Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from Flash
Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from Flash
Dec 22 16:47:59 ajenkins-hplaptop kernel: Restoring Cal data from OTP
Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_hw_attach: 
ar9300_eeprom_attach returned 0
Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_fill_capability_info: 
ah_rfsilent=0x2d
Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_fill_capability_info: 
ah_gpio_select=0x0b
Dec 22 16:47:59 ajenkins-hplaptop kernel: ar9300_fill_capability_info: 
ah_polarity=0x00
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: RX status length: 48
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: RX buffer size: 4096
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: TX descriptor length: 128
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: TX status length: 36
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: TX buffers per descriptor: 4
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: ath_edma_setup_rxfifo: type=0, 
FIFO depth = 16 entries
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: ath_edma_setup_rxfifo: type=1, 
FIFO depth = 128 entries
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] enabling HT modes
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] enabling short-GI in 20MHz 
mode
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] 1 stream STBC receive 
enabled
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: [HT] 1 RX streams; 1 TX streams
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 
11Mbps
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 
11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 1T1R
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 20MHz
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 6.5Mbps - 65Mbps
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 20MHz SGI
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 7Mbps - 72Mbps
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 40MHz:
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 13.5Mbps - 135Mbps
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 11ng MCS 40MHz SGI:
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: MCS 0-7: 15Mbps - 150Mbps
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: AR9565 mac 704.0 RF5110 phy 
1638.6
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: 2GHz radio: 0x; 5GHz radio: 
0x
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 1 for WME_AC_BE 
traffic
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 0 for WME_AC_BK 
traffic
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 2 for WME_AC_VI 
traffic
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 3 for WME_AC_VO 
traffic
Dec 22 16:47:59 ajenkins-hplaptop kernel: ath0: Use hw queue 8 for CAB traffic

Here's the printf()s in the code:

/*
 * Fill all software cached or static hardware state information.
 * Return failure if capabilities are to come from EEPROM and
 * cannot be read.
 */
HAL_BOOL
ar9300_fill_capability_info(struct ath_hal *ah)
{
...
ahpriv-ah_rfsilent = ar9300_eeprom_get(ahp, EEP_RF_SILENT);
ath_hal_printf(ah, %s: ah_rfsilent=0x%02x\n, __func__, 
ahpriv-ah_rfsilent);
if (ahpriv-ah_rfsilent  EEP_RFSILENT_ENABLED) {
ahp-ah_gpio_select = MS(ahpriv-ah_rfsilent, EEP_RFSILENT_GPIO_SEL);
ath_hal_printf(ah, %s: 

Re: Atheros AR9565 detected, not working

2014-12-18 Thread Anthony Jenkins via freebsd-wireless
The attached patch seems to get my rfkill GPIO working.  It seems 
ar9300_enable_rf_kill() is never called.  I added a call to it after 
ath_hal_enable_rfkill(), but this is probably not the right place (I see it 
called several times while the interface is up).

I also found several spots in the GPIO handling code which give up if the GPIO 
pin is 8, 9, 11 or greater than 13; my rfkill GPIO pin is 11 (0x0B).  I 
commented these out:


if ((gpio == AR9382_GPIO_PIN_8_RESERVED)  ||
(gpio == AR9382_GPIO_PIN_11_RESERVED) ||
(gpio == AR9382_GPIO_9_INPUT_ONLY))
{
return AH_FALSE;
}



if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
(gpio == AR9382_GPIO_PIN_11_RESERVED) ||
(gpio  AR9382_MAX_GPIO_INPUT_PIN_NUM))
{
return;
}


Haven't narrowed down which is responsible for me being able to send this email 
using my AR9565.  Also I'm getting flooded with these messages since moving ath 
 wlan out of the kernel...my patch broke something, no?

ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?
ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=1, nbufs=128?
ath0: ath_edma_rxbuf_alloc: nothing on rxbuf?!
ath0: ath_edma_rxfifo_alloc: Q1: alloc failed: i=0, nbufs=128?


Anthony

From: Adrian Chadd adr...@freebsd.org
To: Anthony Jenkins scoobi_...@yahoo.com 
Cc: freebsd-wireless@freebsd.org freebsd-wireless@freebsd.org 
Sent: Monday, July 29, 2013 10:44 AM
Subject: Re: Atheros AR9565 detected, not working


Cool, thanks.

Please make sure you post patches for all the things you fix. I'd love
to see this kind of thing work out of the box. :)


-adrian

On 29 July 2013 07:36, Anthony Jenkins scoobi_...@yahoo.com wrote:
 Thanks Adrian,

 I've managed to fix a few things on this laptop, the remaining stuff is
 BIOS/ACPI related.  acpi_hp(4) isn't working, has something to do with WMI.
 Hoping if I fix the ACPI stuff I can
have me AR9565 working.  I'll poke
 around and report back; the RFKill suggestion is a good place to start
 looking.

 Thanks,
 Anthony


 On 07/29/13 10:30, Adrian Chadd wrote:

 Hm, maybe rfkill is set?

 The AR9565 is supported. I have the reference NICs from Atheros; they
 work just fine.

 It may be some kind of ACPI setting to enable/disable RFKill so the
 radio side is actually enabled.

 I'm sorry, I don't have much more than that to offer without having
 the laptop here.

 If someone's willing to send me one, I'll get 10 + wireless working on
 it and then hand it over to ixsystems to join the 'stuff we really
 should get pcbsd running smoothly on' pile. They're about $500 off of

amazon.com.

 Thanks,



 -adrian

 On 29 July 2013 07:21, Anthony Jenkins scoobi_...@yahoo.com wrote:

 I just got an HP ENVY Sleekbook 6z-1100 laptop hoping it came with a
 FreeBSD-supported wireless NIC.  It has an Atheros AR9565 and looking at
 the
 logs it _seems_ like it should be working, but I get no network traffic.
 I
 haven't started the Atheros debugging procedure yet, save to compile in
 option AH_DEBUG and move ath(4) out of the kernel  to a module to
 facilitate changes.  Works (of course) in Win8 which came with laptop.
 Wireless enabled LED is amber (disabled) in FreeBSD, goes from amber
to
 white (enabled) when I boot the Win8 HDD.

 Here's various logs and misc. system info.  What should I try next?
 Thanks
 in advance!

 [root@laptop /usr/src]# uname -a n
 FreeBSD laptop.qtchat.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Sat Jul
 27
 23:45:30 EDT 2013 r...@laptop.qtchat.org:/usr/obj/usr/src/sys/MYKERNEL
 amd64

 [root@laptop /usr/src]# dmesg
 Copyright (c) 1992-2013 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents
of the University of California. All rights reserved.
 FreeBSD is a registered trademark of The FreeBSD Foundation.
 FreeBSD 10.0-CURRENT #0: Sat Jul 27 23:45:30 EDT 2013
  r...@laptop.qtchat.org:/usr/obj/usr/src/sys/MYKERNEL amd64
 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
 module_register: module pci/xhci already exists!
 Module pci/xhci failed to register: 17
 CPU: AMD A10-4655M APU with Radeon(tm) HD Graphics   (1996.31-MHz
 K8-class
 CPU)
Origin = AuthenticAMD  Id = 0x610f01  Family = 0x15  Model = 0x10
 Stepping = 1


Features=0x178bfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT

 Features2=0x3e98320bSSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C
AMD Features=0x2e500800SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM
AMD

 Features2=0x1abbfffLAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,b17,NodeId,TBM,b23,b24
Standard Extended Features=0x8BMI1
TSC: P-state