Git Product home page Git Product logo

alx's Introduction

alx standalone development tree

The puropose of this development tree is to enable us to do development on alx for both BSD and Linux with a single unified repository. This enables us to synchronize fixes for both BSD and Linux. The idea is to help end typical proprietary driver development for good:

http://www.youtube.com/watch?v=9P-r3H0bY8c

Linux support

Linux support targets the alx driver to be built in synch with linux-next.git as the base development tree. Backport kernel support is provided by utilizing the compat-drivers framework.

To build for linux you will need a few trees. We have scripts to let you get all that you need:

cd ~
git clone git://github.com/mcgrof/compat.git
cd compat
./bin/get-compat-trees

cd ~
mkdir unified/
git clone git://github.com/mcgrof/alx.git

cd alx
./make linux

Contributions

Contributions to compat follow the same mechanisms as used in the Linux kernel, this means you should provide as Singed-off-by tag as documented on the Developer's Certificate of Origin 1.1.

Submitting patches

compat and compat-drivers contributions follow the contribution model implemented by the Linux kernel. Patches or pull requests for compat and compat-drivers must have be signed-offed. If you don't sign off on them they will not accepted. This means adding a line that says "Signed-off-by: Name email" at the end of each commit, indicating that you wrote the code and have the right to pass it on as an open source patch. For exact definition of what the Signed-off-by tag is you can read the definition of the "Developer's Certificate of Origin 1.1", which you can read here:

http://gerrit.googlecode.com/svn/documentation/2.0/user-signedoffby.html

You can send patches as follows:

BSD support

TBD

alx's People

Contributors

benmcollins avatar kamalmostafa avatar mcgrof avatar xhuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alx's Issues

Network interface renamed when unload/load alx

Hi,

On Ubuntu 14.04.2 when you unload and then reload the alx module, the NIC is always renamed to eth0.

On my computer, the main network interface is named p19p1 (name given by biosdevname).
When doing :
sudo rmmod alx
sudo modprobe alx
the interface is renamed to eth0.

It is a little bit annoying because the module is unload when the computer is suspended. So when resuming from suspend, the network stops working...

I found a workaround by modifying the udev rules :
sudo cp /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/10-network.rules
sudo nano /etc/udev/rules.d/10-network.rules

Changing at the end of the line :
KERNEL=="p19p1", NAME="eth0"

And by modifying /etc/network/interfaces :

auto p19p1

iface p19p1 inet dhcp

auto eth0
iface eth0 inet dhcp

But I think more investigation is needed to make it works ot of the box


OS : Ubuntu 14.04.2
Kernel : 3.16.0-37-generic
NIC : Qualcomm Atheros AR816x/AR817x Ethernet

alx drivers fails to build in 3.7.x Arch linux kernel for device AR8161

alx drivers doesnt build in in 3.7.4 kernel.
make
./scripts/gen-compat-autoconf.sh /home/flexible/Downloads/compat-wireless-2012-12-18-p/.config /home/flexible/Downloads/compat-wireless-2012-12-18-p/config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/3.7.4-1-ARCH/build M=/home/flexible/Downloads/compat-wireless-2012-12-18-p modules
make[1]: Entering directory /usr/src/linux-3.7.4-1-ARCH' CC [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/main.o CC [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/compat-3.8.o LD [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/compat.o scripts/Makefile.build:44: /home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx/Makefile: No such file or directory make[4]: *** No rule to make target/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx/Makefile'. Stop.
make[3]: *** [/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx] Error 2
make[2]: *** [/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros] Error 2
make[1]: *** [module/home/flexible/Downloads/compat-wireless-2012-12-18-p] Error 2
make[1]: Leaving directory `/usr/src/linux-3.7.4-1-ARCH'
make: *** [modules] Error 2
[root@arch compat-wireless-2012-12-18-p]#

Any idea how to handle this?

alx swaps VLAN Bytes

Using alx with 8021q (vlan) gives some serious issues.
For example:
Incoming Packets, tagged with VLAN 2 (0x0002) are treated as VLAN 512 (0x0200).
If sending packets tagged with VLAN 2 (0x0002) the packets are correctly leaving the AR8161 NIC.

Correct working Side:

ping 192.168.0.50 -I eth0.2

tcpdump -vv -ttt -e -n -i eth0

xx:xx:xx:xx:xx:xx > xx:xx:xx:xx:xx:xx, ethertype 802.1Q (0x8100), vlan 2, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.0.1 > 192.168.0.50: ICMP echo request

ALX-Side:

tcpdump -vv -ttt -e -n -i alx0

xx:xx:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), vlan 512, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.50 tell 192.168.0.1

Alx fails to build with kernel 3.10-rc3

I was trying to build the alx driver for the newest linux rc (been trying since rc1) following error

drivers/net/ethernet/atheros/alx/alx_main.c: In function 'alx_dispatch_skb':
drivers/net/ethernet/atheros/alx/alx_main.c:694:4: error: too few arguments to function '__vlan_hwaccel_put_tag'
In file included from drivers/net/ethernet/atheros/alx/alx_main.c:22:0:
include/linux/if_vlan.h:237:31: note: declared here
drivers/net/ethernet/atheros/alx/alx_main.c: In function 'alx_set_vlan_mode':
drivers/net/ethernet/atheros/alx/alx_main.c:1132:17: error: 'NETIF_F_HW_VLAN_RX' undeclared (first use in this function)
drivers/net/ethernet/atheros/alx/alx_main.c:1132:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ethernet/atheros/alx/alx_main.c: In function 'alx_fix_features':
drivers/net/ethernet/atheros/alx/alx_main.c:1148:17: error: 'NETIF_F_HW_VLAN_RX' undeclared (first use in this function)
drivers/net/ethernet/atheros/alx/alx_main.c:1149:15: error: 'NETIF_F_HW_VLAN_TX' undeclared (first use in this function)
drivers/net/ethernet/atheros/alx/alx_main.c: In function 'alx_set_features':
drivers/net/ethernet/atheros/alx/alx_main.c:1166:18: error: 'NETIF_F_HW_VLAN_RX' undeclared (first use in this function)
drivers/net/ethernet/atheros/alx/alx_main.c: In function 'alx_probe':
drivers/net/ethernet/atheros/alx/alx_main.c:2613:10: error: 'NETIF_F_HW_VLAN_RX' undeclared (first use in this function)
drivers/net/ethernet/atheros/alx/alx_main.c:2616:43: error: 'NETIF_F_HW_VLAN_TX' undeclared (first use in this function)
make[5]: *** [drivers/net/ethernet/atheros/alx/alx_main.o] Error 1
make[4]: *** [drivers/net/ethernet/atheros/alx] Error 2
make[3]: *** [drivers/net/ethernet/atheros] Error 2
make[2]: *** [drivers/net/ethernet] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

please help
I was using another way than the one in the Readme after trying that one I get:

Origin remote URL: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
This is a linux-next.git compat-drivers release

Base tree: linux-next.git
Base tree version: next-20130604
compat.git: compat-2013-03-28-4
compat-drivers release: compat-drivers-2013-03-28-5
Code metrics archive: http://bit.ly/H6BTF7
Copying compat/ ...
Copying include/ ...
Copying udev/ ...
Copying scripts/check_config.sh ...
Copying scripts/check_depmod ...
Copying scripts/compress_modules ...
Copying scripts/gen-compat-autoconf.sh ...
Copying scripts/modlib.sh ...
Copying scripts/update-initramfs ...
Copying scripts/skip-colors ...
Copying .compat_base ...
Copying .compat_base_tree ...
Copying .compat_base_tree_version ...
Copying .compat_version ...
Copying config.mk ...
Copying patches/unified-drivers/network/0001-backport-alx.patch ...

Synched with compat-drivers-2013-03-28-5
patching file alx_main.c
make -C target/linux/
make[1]: Entering directory `/home/anagromataf/drivers/alx/target/linux'
make -C /lib/modules/3.10.0-rc3/build M=/home/anagromataf/drivers/alx/target/linux modules
make[2]: Entering directory `/opt/src/linux-3.10-rc3'
/home/anagromataf/drivers/alx/target/linux/config.mk:254: "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m."
  CC [M]  /home/anagromataf/drivers/alx/target/linux/compat/main.o
In file included from /home/anagromataf/drivers/alx/target/linux/include/linux/compat-2.6.h:75:0,
                 from <command-line>:0:
/home/anagromataf/drivers/alx/target/linux/include/linux/compat-3.10.h:91:52: warning: 'struct fb_info' declared inside parameter list [enabled by default]
/home/anagromataf/drivers/alx/target/linux/include/linux/compat-3.10.h:91:52: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
/home/anagromataf/drivers/alx/target/linux/include/linux/compat-3.10.h: In function 'backport_fb_enable_skip_vt_switch':
/home/anagromataf/drivers/alx/target/linux/include/linux/compat-3.10.h:93:6: error: dereferencing pointer to incomplete type
make[4]: *** [/home/anagromataf/drivers/alx/target/linux/compat/main.o] Error 1
make[3]: *** [/home/anagromataf/drivers/alx/target/linux/compat] Error 2
make[2]: *** [_module_/home/anagromataf/drivers/alx/target/linux] Error 2
make[2]: Leaving directory `/opt/src/linux-3.10-rc3'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/home/anagromataf/drivers/alx/target/linux'
make: *** [linux] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.