Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    LAN Driver, Qualcomm Atheros AR8171

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    43 Posts 6 Posters 17.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • arrmoA
      arrmo
      last edited by

      Makes sense, and thanks for taking the time to explain - much appreciated!

      I did have a VM for FreeBSD, that's how I built the "older" alx driver (earlier in this thread). I say "did" because I removed it earlier today, it was having all sorts of issues … :(. But the older driver works, not much reason to build a newer add-on, just thought I could perhaps remove the extra file (and use the driver in the kernel).

      Thanks again!

      1 Reply Last reply Reply Quote 0
      • A
        Alex 0
        last edited by

        Hello,
        maybe i just misunderstood some point of the conversation (I'm really new to FreeBSD), but I'm really struggling with that driver. I'm using pfSense 2.1.5 so I can't take the mere driver you've attached on one of your answer (exec format error if I try to kldload it). So I installed a VM with FreeBSD 8.3 to compile it but I end with a load of errors :
        Warning: Object directory not changed from original /root/alx-freebsd-master
        cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I@ -I@/contrib/altq -finline-limit=8000 –param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c if_alx.c
        In file included from if_alx.c:54:
        alx_hw.h:512: error: expected specifier-qualifier-list before 'bool'
        alx_hw.h:604: error: expected declaration specifiers or '...' before 'bool'
        alx_hw.h:606: error: expected declaration specifiers or '...' before 'bool'
        alx_hw.h:606: error: expected declaration specifiers or '...' before 'bool'
        alx_hw.h:608: error: expected declaration specifiers or '...' before 'bool'
        alx_hw.h:616: error: expected declaration specifiers or '...' before 'bool'
        alx_hw.h:624: error: expected '=', ',', ';', 'asm' or 'attribute' before 'alx_phy_configed'
        alx_hw.h:626: error: expected declaration specifiers or '...' before 'bool'
        alx_hw.h:627: error: expected declaration specifiers or '...' before 'bool'
        alx_hw.h:656: error: expected '=', ',', ';', 'asm' or 'attribute' before 'alx_get_phy_info'
        if_alx.c: In function 'alx_identify_hw':
        if_alx.c:479: error: 'struct alx_hw' has no member named 'ptrn_ofs'
        if_alx.c:480: error: 'struct alx_hw' has no member named 'max_ptrns'
        if_alx.c:482: error: 'struct alx_hw' has no member named 'ptrn_ofs'
        if_alx.c:483: error: 'struct alx_hw' has no member named 'max_ptrns'
        if_alx.c: In function 'alx_init_sw':
        if_alx.c:530: error: 'struct alx_hw' has no member named 'sleep_ctrl'
        if_alx.c:535: error: 'struct alx_hw' has no member named 'link_up'
        if_alx.c:535: error: 'false' undeclared (first use in this function)
        if_alx.c:535: error: (Each undeclared identifier is reported only once
        if_alx.c:535: error: for each function it appears in.)
        if_alx.c:536: error: 'struct alx_hw' has no member named 'link_duplex'
        if_alx.c:537: error: 'struct alx_hw' has no member named 'link_speed'
        if_alx.c:538: error: 'struct alx_hw' has no member named 'adv_cfg'
        if_alx.c:541: error: 'struct alx_hw' has no member named 'flowctrl'
        if_alx.c:550: error: 'struct alx_hw' has no member named 'is_fpga'
        if_alx.c: In function 'alx_reset':
        if_alx.c:944: error: 'bool' undeclared (first use in this function)
        if_alx.c:944: error: expected ';' before 'phy_cfged'
        if_alx.c:951: error: 'phy_cfged' undeclared (first use in this function)
        cc1: warnings being treated as errors
        if_alx.c:951: warning: implicit declaration of function 'alx_phy_configed'
        if_alx.c:951: warning: nested extern declaration of 'alx_phy_configed'
        if_alx.c:953: error: 'struct alx_hw' has no member named 'hib_patch'
        if_alx.c:953: error: too many arguments to function 'alx_reset_phy'
        if_alx.c: In function 'alx_update_link':
        if_alx.c:965: error: 'bool' undeclared (first use in this function)
        if_alx.c:965: error: expected ';' before 'link_up'
        if_alx.c:973: error: 'link_up' undeclared (first use in this function)
        if_alx.c:973: error: too many arguments to function 'alx_get_phy_link'
        if_alx.c:977: error: 'struct alx_hw' has no member named 'link_up'
        if_alx.c:981: error: 'struct alx_hw' has no member named 'link_speed'
        if_alx.c:981: error: 'struct alx_hw' has no member named 'link_duplex'
        if_alx.c:982: error: 'prev_link_up' undeclared (first use in this function)
        if_alx.c:982: error: 'struct alx_hw' has no member named 'link_up'
        if_alx.c:984: error: 'struct alx_hw' has no member named 'link_up'
        if_alx.c:989: error: 'struct alx_hw' has no member named 'link_duplex'
        if_alx.c:990: error: 'struct alx_hw' has no member named 'link_speed'
        if_alx.c:990: error: 'struct alx_hw' has no member named 'link_duplex'
        if_alx.c:992: error: 'struct alx_hw' has no member named 'link_speed'
        if_alx.c:992: error: too many arguments to function 'alx_post_phy_link'
        if_alx.c:993: error: too many arguments to function 'alx_enable_aspm'
        if_alx.c:998: error: 'struct alx_hw' has no member named 'link_duplex'
        if_alx.c:999: error: 'struct alx_hw' has no member named 'link_speed'
        if_alx.c:1010: error: too many arguments to function 'alx_configure_rss'
        if_alx.c:1011: error: 'false' undeclared (first use in this function)
        if_alx.c:1011: error: too many arguments to function 'alx_enable_aspm'
        if_alx.c:1012: error: too many arguments to function 'alx_post_phy_link'
        if_alx.c: In function 'alx_media_status':
        if_alx.c:1231: error: 'struct alx_hw' has no member named 'link_up'
        if_alx.c:1238: error: 'struct alx_hw' has no member named 'link_duplex'
        if_alx.c:1247: error: 'struct alx_hw' has no member named 'link_duplex'
        if_alx.c:1251: error: 'struct alx_hw' has no member named 'link_speed'
        if_alx.c:1263: error: 'struct alx_hw' has no member named 'link_speed'
        if_alx.c: In function 'alx_start_locked':
        if_alx.c:1388: error: 'struct alx_hw' has no member named 'link_up'
        if_alx.c: In function 'alx_attach':
        if_alx.c:1437: error: 'bool' undeclared (first use in this function)
        if_alx.c:1437: error: expected ';' before 'phy_cfged'
        if_alx.c:1478: error: 'phy_cfged' undeclared (first use in this function)
        if_alx.c:1480: error: 'struct alx_hw' has no member named 'hib_patch'
        if_alx.c:1480: error: too many arguments to function 'alx_reset_phy'
        if_alx.c:1490: error: 'struct alx_hw' has no member named 'adv_cfg'
        if_alx.c:1490: error: 'struct alx_hw' has no member named 'flowctrl'
        if_alx.c:1514: warning: implicit declaration of function 'alx_get_phy_info'
        if_alx.c:1514: warning: nested extern declaration of 'alx_get_phy_info'
        *** Error code 1

        Stop in /root/alx-freebsd-master.

        I alos tried to recompile the kernel of the VM adding "device miibus" and "device alc" in the kernel config, but when I try to load the generated driver in pfSense, it tells me that it is already existing (which is true after verifying with kldstat -v). So I tried to stop it to be able to put the new driver (kldunload), the fact is it merely freeze the system and I can't do anything ecept reloading my ssh connection to the pfSense machine (it freezes the system even if I work on it with a keyboard and a screen). I'm quite sure I'm doing something wrong, but I can't figure what. Any suggestion ?

        1 Reply Last reply Reply Quote 0
        • arrmoA
          arrmo
          last edited by

          Hi,

          The VM that I used to build it was PC-BSD … a completely separate machine (with all the needed build tools, those don't come with pfSense).

          Hope that helps!

          1 Reply Last reply Reply Quote 0
          • A
            Alex 0
            last edited by

            Hi arrmo,
            thx for your help, I tried to compile the driver under PC-BSD, it compiled but when I try to load the module on pfSense I have a Exec Format Error.
            Edit : my fault, I do not have taken the PC BSD release corresponding to FRee BSD 8.3 but the latest. I will try again tomorrow.

            1 Reply Last reply Reply Quote 0
            • A
              Alex 0
              last edited by

              Hi,
              I finally suceeded compiling the driver under FreebSD 8.3 on VM, including stdbool.h in alx_hw.h. My Atheros AR8171 is now recognized by pfSense. Thanks for your help :)

              1 Reply Last reply Reply Quote 0
              • arrmoA
                arrmo
                last edited by

                Excellent, glad to hear it. Have fun!

                1 Reply Last reply Reply Quote 0
                • A
                  Alex 0
                  last edited by

                  Well, maybe I've spoken too fast… The ethernet interface is recognized, but trying to connect it, I see "statuts : no carrier" when I do a ifconfig on alx0, even if it's directly plugged to a SFRBox with a ethernet wire. I will continue to search why I have this issue

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    Hmm, disappointing. Do you see link leds at either end?

                    1 Reply Last reply Reply Quote 0
                    • A
                      Alex 0
                      last edited by

                      Yes, leds are ON on the box and the pfSense, blinking from time to time.

                      1 Reply Last reply Reply Quote 0
                      • arrmoA
                        arrmo
                        last edited by

                        Very odd … :(. Seems like it's up, but seems to say no. What does media say (under ifconfig)?

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          With 2.2 just around the corner (hopefully) at this point I have to say it's probably not worth putting too much effort into. Just run 2.2RC with the other kernel module.
                          Since the alx driver was developed against FreeBSD 10 it may require significant backporting to make it work with 8.3.  :-\

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • A
                            Alex 0
                            last edited by

                            Hello,
                            as you suggested, I switched on pfSense 2.2 RC on my machine. I tried to compile the driver under VM with FreeBSD 10.1, it compiled well but the kldload didn't work, so I took the one provided by arrmo, and this time it works : the alx0 have a dhcp lease when plugged to a SFR Box. Now I will perform tests to verify tu upload and download ratio ;)

                            EDIT : I configured my network as I planned (Captive portal + Freeradius + external MySQL database), and the debit, when I'm the only client, is almost the same as a connection not passing through pfSense. I built this for a LAN party in March, so i'll see in a few month if the custom driver bear the load ;)
                            Anyway, thx for your help and advices !

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.