Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#12328 closed enhancement (fixed)

Driver for Atheros Killer E2200

Reported by: lorglas Owned by: korli
Priority: normal Milestone: Unscheduled
Component: Network & Internet Version: R1/Development
Keywords: Atheros Killer E2200 Cc:
Blocked By: Blocking:
Platform: All


Hello everybody,

I need a driver for the Qualcomm Atheros Killer E2200 Gigabit Ethernet Controller.

lspci from ubuntu shows: 03:00.0 Ethernet controller: Qualcomm Atheros Killer E2200 Gigabit Ethernet Controller (rev 13)

Best Regards.

Attachments (2)

0001-Sync-atheros813x-with-FreeBSD-11-with-extra-pci-ids.patch (84.2 KB ) - added by i80and 4 years ago.
0001-Sync-atheros813x-with-FreeBSD-v2.patch (90.2 KB ) - added by i80and 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by i80and, 4 years ago

patch: 01

comment:2 by i80and, 4 years ago

Attached a patch that updates the atheros813x driver to the version in FreeBSD 11, with a few tweaks from future commits to theoretically support Killer E2400 and E2500.

Tested on my own Killer E2200. Seems to work fine (posting this using it), with one caveat: if I disable the interface and bring it back up, there's no default route autoconfigured. But I'm dubious that's a driver issue.

comment:3 by i80and, 4 years ago

(Additional caveat: the FreeBSD compat interface doesn't have the new atomic counting primitives, so I retained the existing ifp->if_oerrors += ... logic)

comment:4 by pulkomandy, 4 years ago

Owner: changed from nobody to korli
Status: newassigned

Would it be possible to implement these atomic counting primitives? I guess they would just be wrappers around atomic_add and the like? It would be nice to keep the driver as close as possible to the FreeBSD one and extend the compatibility layer, making it easier to update other drivers too.

comment:5 by i80and, 4 years ago

It's not really possible to properly replicate counter(9) right now AFAICS. The FreeBSD implementation is actually quite sophisticated.

I added a simulation of if_inc_counter() using atomic_add so that the alc driver can be dropped in verbatim, but its semantics aren't exactly the same.

comment:6 by pulkomandy, 4 years ago

Resolution: fixed
Status: assignedclosed

Applied in hrev50891, thanks!

I made just one style fix, in the compatibility layer: we always leave two blank lines (not just one) between functions. Code imported from FreeBSD does not need to follow our coding guidelines, but this file does.

comment:7 by axeld, 4 years ago

Why wouldn't it be possible to implement counter like it's done in FreeBSD? While it's perfectly fine to do it like you did in the context of this patch, there shouldn't be any reasons it couldn't be done in Haiku. We already have per CPU data structures (cpu_ent) that lives in a simple array. So at least maintaining a per CPU section there or a similar array for counters would definitely be feasible.

I haven't looked at the FreeBSD implementation; it would be interesting to see how they read the data back. I guess the PPC way of doing atomics (read, then read again to see if something changed) would be a good way to work around having to resort to something like call_all_cpus().

comment:8 by lorglas, 4 years ago

The driver is working on my msi laptop. thanks

Note: See TracTickets for help on using tickets.