From owner-freebsd-wireless@FreeBSD.ORG Thu Mar 14 00:30:21 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 248E09DE for ; Thu, 14 Mar 2013 00:30:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [IPv6:2a00:1450:400c:c03::22b]) by mx1.freebsd.org (Postfix) with ESMTP id A9B06711 for ; Thu, 14 Mar 2013 00:30:20 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id u54so1632968wey.16 for ; Wed, 13 Mar 2013 17:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=HliD0mKgHWNOw8oyjFUwG14qDHU5y+3HvS/g5MD6Vic=; b=PJgVOrD/jw4A1mTf8BbQEUB1yMvMZw1obcm52XrGWepOUmkFyqDXV+1Sc6ZlU1OsZ4 H5g207XvzNCho0Lcg8KUXojP7YRvWmVFDI3pDsSLzSGIsqA5w8Oz1FrIijSiJNGapvBd uNeDSbgetjDhp6oIMz9K7VJqmbJ+EnTNwFSPBOUW6NkZnHSVYxd/hTP+Id2Tnyn877zM za5O4NGrYWLSMsKihg9WlD9iyJ2NgUYbMGkWNvBY7MUHheuAm8NaoeVt4y7Ie9uEvZeL z1VFfmF9PXeU6bQH4GlnnFmmW3aQENK1+OxTRSPlNpMD0pUxgTBf/7ZZArbplH4DLQGf TeNA== MIME-Version: 1.0 X-Received: by 10.194.20.40 with SMTP id k8mr564138wje.16.1363221019879; Wed, 13 Mar 2013 17:30:19 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.111.201 with HTTP; Wed, 13 Mar 2013 17:30:19 -0700 (PDT) In-Reply-To: <513FA6FC.5040809@gmail.com> References: <513d3ae3.08c2440a.59a6.63b2@mx.google.com> <513DA767.6010208@gmail.com> <513E6AF5.9010304@gmail.com> <513E7924.3060302@gmail.com> <513F9A4B.5030704@gmail.com> <513FA6FC.5040809@gmail.com> Date: Wed, 13 Mar 2013 17:30:19 -0700 X-Google-Sender-Auth: qV4PyrIkY7tU-Jng-CVP2Af6SCI Message-ID: Subject: Re: Fine, OK, here's my initial AR9380/AR9485 support From: Adrian Chadd To: Joshua Isom Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2013 00:30:21 -0000 Hi, I've fixed some warnings - please update the git repo youre using. I've also added some clang workarounds in the MAkefile (see the bottom of the file for the two lines to update) - so please svn update in sys/modules/ath/ Hopefully that works enough for you! Please let me know what other build errors you're seeing. Thanks, Adrian On 12 March 2013 15:06, Joshua Isom wrote: > On 3/12/2013 4:14 PM, Adrian Chadd wrote: >> >> On 12 March 2013 14:12, Joshua Isom wrote: >>> >>> I had to remove the /sys/ from the PATH and CFLAGS to point to the right >>> directory, it's still failing with warnings. I tried gcc and clang. I'll >>> try to see how much I can patch myself without knowing the code at all. >> >> >> Hi, >> >> Where's it failing with warnings with gcc? >> >> I do gcc builds all the time and I get no warnings. But my primary >> station/laptop testing atm is on 9-STABLE (my access points run -HEAD >> atm.) >> >> Thanks, >> >> >> Adrian >> > > Here's the build log from clang. The most obvious different things are > ar9300_gpio.c's comparisons with a constant. > >> ===> ath (all) >> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc >> -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath >> -I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. >> -I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ >> -DHAVE_KERNEL_OPTION_HEADERS -include >> /usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq >> -fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH >> -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse >> -msoft-float -fno-asynchronous-unwind-tables -ffreestanding >> -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector >> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >> -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs >> -fdiagnostics-show-option -Wno-error-tautological-compare >> -Wno-error-empty-body -Wno-error-parentheses-equality -c >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ > > ath/ath > _hal/ar9300/ar9300_radio.c >> >> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc >> -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath >> -I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. >> -I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ >> -DHAVE_KERNEL_OPTION_HEADERS -include >> /usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq >> -fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH >> -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse >> -msoft-float -fno-asynchronous-unwind-tables -ffreestanding >> -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector >> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >> -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs >> -fdiagnostics-show-option -Wno-error-tautological-compare >> -Wno-error-empty-body -Wno-error-parentheses-equality -c >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ > > ath/ath > _hal/ar9300/ar9300_reset.c >> >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c:83:27: >> error: unused variable 'ichan' [-Werror,-Wunused-variable] >> >> HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan); >> ^ >> 1 error generated. >> *** [ar9300_radio.o] Error code 1 >> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc >> -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath >> -I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. >> -I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ >> -DHAVE_KERNEL_OPTION_HEADERS -include >> /usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq >> -fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH >> -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse >> -msoft-float -fno-asynchronous-unwind-tables -ffreestanding >> -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector >> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >> -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs >> -fdiagnostics-show-option -Wno-error-tautological-compare >> -Wno-error-empty-body -Wno-error-parentheses-equality -c >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ > > ath/ath > _hal/ar9300/ar9300_gpio.c >> >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c:2809:52: >> error: variable 'modes_txgaintable_index' is uninitialized when used here >> [-Werror,-Wuninitialized] >> REG_WRITE_ARRAY(&ahp->ah_ini_modes_txgain, >> modes_txgaintable_index, >> ^~~~~~~~~~~~~~~~~~~~~~~ >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300.h:904:85: >> note: expanded from macro 'REG_WRITE_ARRAY' >> >> OS_REG_WRITE(ah, INI_RA((iniarray), (r), 0), >> INI_RA((iniarray), r, (column)));\ >> >> ^ >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300.h:323:99: >> note: expanded from macro 'INI_RA' >> >> #define INI_RA(iniarray, row, column) (((iniarray)->ia_array)[(row) * >> ((iniarray)->ia_columns) + (column)]) >> >> ^ >> /root/ATH/head/sys/modules/ath/../../dev/ath/ah_osdep.h:119:68: note: >> expanded from macro 'OS_REG_WRITE' >> #define OS_REG_WRITE(_ah, _reg, _val) ath_hal_reg_write(_ah, _reg, _val) >> ^ >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c:2609:47: >> note: initialize the variable 'modes_txgaintable_index' to silence this >> warning >> >> u_int modes_index, modes_txgaintable_index, freq_index; >> ^ >> = 0 >> 1 error generated. >> *** [ar9300_reset.o] Error code 1 >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:63:15: >> error: cast to 'volatile u_int32_t *' (aka 'volatile unsigned int *') from >> smaller integer type 'unsigned int' [-Werror,-Wint-to-pointer-cast] >> >> address = (volatile u_int32_t *)(AR9340_SOC_GPIO_FUN0 + (out_func*4)); >> ^ >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:159:25: >> warning: comparison of constant 20 with expression of type >> 'HAL_GPIO_MUX_TYPE' is always true >> [-Wtautological-constant-out-of-range-compare] >> >> if (hal_signal_type < ARRAY_LENGTH(mux_signal_conversion_table)) >> ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:271:23: >> warning: comparison of constant 20 with expression of type >> 'HAL_GPIO_MUX_TYPE' is always true >> [-Wtautological-constant-out-of-range-compare] >> >> if (halSignalType < ARRAY_LENGTH(mux_signal_conversion_table)) >> ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> 2 warnings and 1 error generated. >> *** [ar9300_gpio.o] Error code 1 >> 3 errors >> >> `all' not remade because of errors. >> *** [all] Error code 2 >> 1 error >> *** [modules-all] Error code 2 >> 1 error >> `all' not remade because of errors. >> *** [buildkernel] Error code 2 >> 1 error >> *** [buildkernel] Error code 2 >> 1 error > >