Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails fo kernel 4.2. #40

Closed
ghost opened this issue Oct 9, 2015 · 9 comments
Closed

Build fails fo kernel 4.2. #40

ghost opened this issue Oct 9, 2015 · 9 comments

Comments

@ghost
Copy link

ghost commented Oct 9, 2015

The following error turns up when trying to build the driver for kernel 4.2.3, using gcc-4.9.3:

$ KERNELRELEASE=4.2.3 make
...
mt7601u/init.c:599:12: error: assignment to expression with array type
hw->flags = IEEE80211_HW_SIGNAL_DBM |

GCC Version:

x86_64-pc-linux-gnu-gcc --version
x86_64-pc-linux-gnu-gcc (Gentoo 4.9.3 p1.0, pie-0.6.2) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

@cosmicnag
Copy link

+1 same here for latest arch kernel

@RohanPrabhuNomadly
Copy link

Does anyone have any update as to whether this builds or not for 4.3?

@ghost
Copy link
Author

ghost commented Nov 26, 2015

On Thursday 26 November 2015 08:03:48 Rohan Prabhu wrote:

Does anyone have any update as to whether this builds or not for 4.3?


Reply to this email directly or view it on GitHub:
#40 (comment)

Didn't give it a try, as long as for any other reasons, I should stay in 

4.1 for now.

@kuba-moo
Copy link
Owner

@RohanPrabhuNomadly 4.3 does not need this driver any more. The problem with 4.2 was that it was missing last few patches which fixed DMA issues, 4.3 already contains them, so in-kernel driver should work OK.

@RohanPrabhuNomadly
Copy link

The problem is that in 4.3, whenever I use this driver in linux 4.2.5 or 4.3.1, my linux entirely freezes after a certain amount of data that is sent (I know this because if I don't open any applications which uses network data, then it doesn't freeze). But if I am sending/receiving data, then after a certain amount of time, it freezes and crashes invariably (rebooting is the only option, I cannot even switch to another vt, I cannot ssh/telnet into my machine). The only thing that worked for me was to downgrade to 4.1 (where this driver still compiles and back then I was using 4.2.1 I think) and then use it. Using a rolling release like arch has it's own series of problems when you downgrade selectively (especially if it is the kernel), and recently when I upgraded to 4.2.5, it freezes again. I have no idea where to even begin if I have to troubleshoot. All the logs seem fine, there is no kernel panic, just a plain ol' system freeze.

@EchoUSB
Copy link

EchoUSB commented Dec 19, 2015

If you change that to the following, it will compile and work.
Not sure if this fixes kernel panics/freeze, but at least it compiles and works

hw->flags[0] = IEEE80211_HW_PS_NULLFUNC_STACK |
IEEE80211_HW_SUPPORTS_HT_CCK_RATES |
#ifdef MAC80211_IS_PATCHED
IEEE80211_HW_TX_STATS_EVERY_MPDU |
#endif
0;

That's really quick and dirty because I have no idea what I'm doing, but it should be good

EDIT: Not 100% sure but it looks like it solved the freezing issue.
However my speed went from 50Mbps with driver included in kernel to 13 Mbps, not sure if it's related

maurossi added a commit to maurossi/acx100-acx-mac80211 that referenced this issue Jan 5, 2016
This patch allows to build acx100-acx-mac80211 with kernel 4.2

By removing FIF_PROMISC_IN_BSS we get rid of the following error:

~/acx100-acx-mac80211/main.c:948:19: error: ‘FIF_PROMISC_IN_BSS’ undeclared (first use in this function)
  *total_flags &= (FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL
                   ^

The changes suggested here: kuba-moo/mt7601u#40
helped solve the following building errors:

~/acx100-acx-mac80211/main.c:500:12: error: assignment to expression with array type
  hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
            ^

~/acx100-acx-mac80211/main.c:528:12: error: assignment to expression with array type
  hw->flags |= IEEE80211_HW_SIGNAL_UNSPEC;
            ^
@RohanPrabhuNomadly
Copy link

I didn't try the changes as mentioned in this thread, but updating to the 4.3 kernel fixed the system freeze issues for me. In one of the other issues (can't recall which) it is mentioned that it is fixed by a couple of commits esp relating to logging the rx/tx on the device which are there in 4.3 and not in 4.2. I was waiting for 4.3 to be rolled out on arch core, looks like it happened just a couple of days ago. After a system update, everything works fine.

@kuba-moo
Copy link
Owner

Build on v4.2 should be now fixed!

@iamashwin26
Copy link

Why am i still getting this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants