From owner-freebsd-wireless@FreeBSD.ORG Tue Mar 12 22:07:02 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 E9BFA3B8; Tue, 12 Mar 2013 22:07:02 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com [209.85.219.53]) by mx1.freebsd.org (Postfix) with ESMTP id A175AAF1; Tue, 12 Mar 2013 22:07:02 +0000 (UTC) Received: by mail-oa0-f53.google.com with SMTP id m1so406054oag.12 for ; Tue, 12 Mar 2013 15:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=iCa8f5W1l+68Dw+lQKL/c4jyEPac++BKkEvvb2/qzlE=; b=U8P48fZKfM26gR5WpI7BpPKyjEEoXa+uKHTBewLS00dk0xtvo/8oUIQRW08LwiUK+R b3KHbt6TidwNnOmJJ2BD3w9mbjTmfIjWuZd7UWgtJ0asRrBdLBa8w/43uxUjZxiumGcR RRKrlM9lVAQAz0MX7O8fS8DCVPLM4ovyLdIlMMWHrzsOtD38+X+0b/0cWU+23PBm74uw nHl/85fcQgnr3Q3LsMVbJFq9tAs5icpbcTPQY9Ycy+ZgplsG0/hNla6PPM4mU4FLmmli SUweNcZKVnW3/yUgbV28Fj42bMGFatQkcZJDFDD+Vz9kmY7v78EBB4bUefVAycmTBz+1 H0cA== X-Received: by 10.182.221.4 with SMTP id qa4mr13834521obc.100.1363126021951; Tue, 12 Mar 2013 15:07:01 -0700 (PDT) Received: from [192.168.1.14] (c-98-212-197-211.hsd1.il.comcast.net. [98.212.197.211]) by mx.google.com with ESMTPS id d10sm23875745oeh.7.2013.03.12.15.06.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 15:07:01 -0700 (PDT) Message-ID: <513FA6FC.5040809@gmail.com> Date: Tue, 12 Mar 2013 17:06:52 -0500 From: Joshua Isom User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: Fine, OK, here's my initial AR9380/AR9485 support References: <513d3ae3.08c2440a.59a6.63b2@mx.google.com> <513DA767.6010208@gmail.com> <513E6AF5.9010304@gmail.com> <513E7924.3060302@gmail.com> <513F9A4B.5030704@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 12 Mar 2013 22:07:03 -0000 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