Bug 18738

Summary: acx-mac80211 module not built after upgrade kernel to 4.4.13.mga5-1-1.mga5
Product: Mageia Reporter: kalagani kalagani <kalagani>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: tmb
Version: 5   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
URL: http://www.mageialinux-online.org/forum/topic-22269-1+acx-mac80211-non-construit-apres-upgrade-kernel.php#m214195
Whiteboard:
Source RPM: kernel-server-4.4.13-1.mga5-1-1.mga5 CVE:
Status comment:

Description kalagani kalagani 2016-06-19 17:56:21 CEST
Description of problem:
The acx-mac80211 wifi module not built after upgrade kernel to 4.4.13.mga5-1-1.mga5
while always built and installed with all previously kernel
dkms status
acx-mac80211, git, 3.19.8-server-3.mga5, x86_64: installed 
acx-mac80211, git, 4.1.15-server-2.mga5, x86_64: installed 
acx-mac80211, git, 4.1.8-server-1.mga5, x86_64: installed

log from the /var/boot/boot.log
could not find module by name='acx_mac80211'
.
acx-mac80211 (git): Installing module.
...................(bad exit status: 10)
  Build failed.  Installation skipped.
.
Nota: I am using this wifi chipset since 2014 without pb till this upgrade!

How reproducible:
1) install the right firmware
cd /lib/firmware
for i in "" c16 c17 r16 r17 ; do wget -P /lib/firmware http://acx100.erley.org/fw/acx111_1.2.1.34/tiacx111$i ; done
2) load pilot
cd /usr/local/src
git clone http://git.code.sf.net/p/acx100/acx-mac80211 acx100-acx-mac80211
3) rename/displace
mv acx100-acx-mac80211 /usr/src/acx-mac80211-git
4) add to the DKMS tree
dkms add -m acx-mac80211 -v git
Note: details on forum
http://www.mageialinux-online.org/forum/topic-18541-1+cartes-wifi-a-chipset-texas-instrument-acx100-111-et-tnetw1450.php#m178345

Steps to Reproduce:
1. make previously steps 1) to 4)
2. reboot PC then see the /var/boot/boot.log
3. or manualy buit
dkms build -m acx-mac80211 -v git
in this last case result is:
Preparing kernel 4.4.13-server-1.mga5 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper.....
using /proc/config.gz
make oldconfig.....
make prepare....

Building module:
cleaning build area....
'make' all KVERSION=4.4.13-server-1.mga5........(bad exit status: 2)

Error! Bad return status for module build on kernel: 4.4.13-server-1.mga5 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/acx-mac80211/git/build/ for more information.

and the make.log is:
DKMS make.log for acx-mac80211-git for kernel 4.4.13-server-1.mga5 (x86_64)
dim. juin 19 17:45:43 CEST 2016
echo "make is "standalone build""
make is standalone build
make -C /lib/modules/4.4.13-server-1.mga5/build M=/var/lib/dkms/acx-mac80211/git/build CONFIG_ACX_MAC80211=m CONFIG_ACX_MAC80211_PCI=y CONFIG_ACX_MAC80211_USB=m CONFIG_ACX_MAC80211_MEM=m EXTRA_CFLAGS=" -DCONFIG_
ACX_MAC80211=1  -DCONFIG_ACX_MAC80211_USB=1  -DCONFIG_ACX_MAC80211_MEM=1  -DCONFIG_ACX_MAC80211_PCI=1 -DACX_GIT_VERSION=\\\"v20130127-4-gb6fc314\\\"" modules
make[1]: Entering directory '/usr/src/kernel-4.4.13-server-1.mga5'
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/pci.o
/var/lib/dkms/acx-mac80211/git/build/pci.c:677:2: attention : initialization from incompatible pointer type
  .hw_scan  = acx_op_hw_scan,
  ^
/var/lib/dkms/acx-mac80211/git/build/pci.c:677:2: attention : (near initialization for âacxpci_hw_ops.hw_scanâ)
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/usb.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/mem.o
/var/lib/dkms/acx-mac80211/git/build/mem.c:1827:2: attention : initialization from incompatible pointer type
  .hw_scan  = acx_op_hw_scan,
  ^
/var/lib/dkms/acx-mac80211/git/build/mem.c:1827:2: attention : (near initialization for âacxmem_hw_ops.hw_scanâ)
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/common.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/merge.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/debug.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/cmd.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/ie.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/init.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/utils.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/cardsetting.o
/var/lib/dkms/acx-mac80211/git/build/cardsetting.c: In function âacx1xx_update_antennaâ:
/var/lib/dkms/acx-mac80211/git/build/cardsetting.c:592:27: attention : argument to âsizeofâ in âmemsetâ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-point
er-memaccess]
  memset(antenna, 0, sizeof(antenna));
                           ^
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/tx.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/rx.o
  CC [M]  /var/lib/dkms/acx-mac80211/git/build/main.o
/var/lib/dkms/acx-mac80211/git/build/main.c: In function âacx_init_ieee80211â:
/var/lib/dkms/acx-mac80211/git/build/main.c:500:12: erreur: assignment to expression with array type
  hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
            ^
/var/lib/dkms/acx-mac80211/git/build/main.c:528:12: erreur: assignment to expression with array type
  hw->flags |= IEEE80211_HW_SIGNAL_UNSPEC;
            ^
/var/lib/dkms/acx-mac80211/git/build/main.c: In function âacx_op_configure_filterâ:
/var/lib/dkms/acx-mac80211/git/build/main.c:948:19: erreur: âFIF_PROMISC_IN_BSSâ undeclared (first use in this function)
  *total_flags &= (FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL
                   ^
/var/lib/dkms/acx-mac80211/git/build/main.c:948:19: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/acx-mac80211/git/build/main.c: In function âacx_op_hw_scanâ:
/var/lib/dkms/acx-mac80211/git/build/main.c:1085:41: attention : passing argument 2 of âieee80211_probereq_getâ from incompatible pointer type
  skb = ieee80211_probereq_get(adev->hw, adev->vif, ssid, ssid_len,
                                         ^
In file included from /var/lib/dkms/acx-mac80211/git/build/main.c:22:0:
include/net/mac80211.h:4183:17: note: expected âconst u8 *â but argument is of type âstruct ieee80211_vif *â
 struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
                 ^
scripts/Makefile.build:258: recipe for target '/var/lib/dkms/acx-mac80211/git/build/main.o' failed
make[2]: *** [/var/lib/dkms/acx-mac80211/git/build/main.o] Error 1
Makefile:1378: recipe for target '_module_/var/lib/dkms/acx-mac80211/git/build' failed
make[1]: *** [_module_/var/lib/dkms/acx-mac80211/git/build] Error 2
make[1]: Leaving directory '/usr/src/kernel-4.4.13-server-1.mga5'
Makefile:68: recipe for target 'all' failed
make: *** [all] Error 2
Comment 1 Thomas Backlund 2016-06-19 18:28:49 CEST
Not our bug.

you are using an out-of-tree module from an external site, so it's that upstream that need to fix support for kernel 4.4 series...

Out of curiosity... what hw do you have that needs an out-of-tree code ?

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => INVALID
Severity: major => normal

Comment 2 kalagani kalagani 2016-06-19 21:58:42 CEST
(In reply to Thomas Backlund from comment #1)
> Not our bug.
> 
> you are using an out-of-tree module from an external site, so it's that
> upstream that need to fix support for kernel 4.4 series...
> 
> Out of curiosity... what hw do you have that needs an out-of-tree code ?

Not our bug!!!
This out-of-tree module without change build with the previously kernel series 3.9 and 4.1, so no with the 4.4!
It is why I am thinking changes in the 4.4 kernel series causes the NOK built!

My hw board is a Netgear WG311v2
lspci -v
0000:2c:09.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface
        Subsystem: Netgear WG311v2 802.11g Wireless PCI Adapter
        Flags: bus master, medium devsel, latency 32, IRQ 23
        Memory at fb020000 (32-bit, non-prefetchable) [size=8K]
        Memory at fb000000 (32-bit, non-prefetchable) [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: acx_pci
        Kernel modules: acx_mac80211
Comment 3 Thomas Backlund 2016-06-19 22:20:03 CEST
(In reply to kalagani kalagani from comment #2)
> (In reply to Thomas Backlund from comment #1)
> > Not our bug.
> > 
> > you are using an out-of-tree module from an external site, so it's that
> > upstream that need to fix support for kernel 4.4 series...
> > 
> > Out of curiosity... what hw do you have that needs an out-of-tree code ?
> 
> Not our bug!!!
> This out-of-tree module without change build with the previously kernel
> series 3.9 and 4.1, so no with the 4.4!
> It is why I am thinking changes in the 4.4 kernel series causes the NOK
> built!
> 

I _know_ the upstream kernel code has changed. This always happends from time to time... sometimes even between kernel releases... 

But its the job of the maintainers of out-of-tree code to keep up with the changes... not ours to wait for them to catch uo... nVidia does it for their drivers, Amd for theirs, virtualbox for theirs, xtables-addons for theirs and so on...

I do patch drivers we provide in our repos if upstream does not provide fixes, but for out-of-tree code... file a bug with them... and poit out to them that pushing the driver upstream to kernel.org kernels would avoid breakages like this...
Comment 4 kalagani kalagani 2016-06-23 11:50:01 CEST
Hi Thomas,
I understood...thanks for explanation!

Dependances for this module are
modprobe --show-depends acx_mac80211
insmod /lib/modules/4.1.15-server-2.mga5/kernel/drivers/usb/common/usb-common.ko.xz 
insmod /lib/modules/4.1.15-server-2.mga5/kernel/drivers/usb/core/usbcore.ko.xz 
insmod /lib/modules/4.1.15-server-2.mga5/kernel/net/rfkill/rfkill.ko.xz 
insmod /lib/modules/4.1.15-server-2.mga5/kernel/net/wireless/cfg80211.ko.xz 
insmod /lib/modules/4.1.15-server-2.mga5/kernel/net/mac80211/mac80211.ko.xz 

I modified code in main.c of module to avoid errors due to new 4.4.13 mac80211.h API.
Miraculously, built is OK and then wifi connection also!
But my modifications are not fulfilling, (test kernel version...)
so do you know from which kernel this API change?
Or where find modifications about kernels?