kuba-moo / mt7601u

Linux mac80211-based driver for Mediatek MT7601U USB bgn WiFi dongle
285 stars 105 forks source link

Build fails fo kernel 4.2. #40

Closed ghost closed 8 years ago

ghost commented 9 years ago

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 commented 9 years ago

+1 same here for latest arch kernel

RohanPrabhuNomadly commented 8 years ago

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

ghost commented 8 years ago

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: https://github.com/kuba-moo/mt7601u/issues/40#issuecomment-159949194

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

4.1 for now.

kuba-moo commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

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

RohanPrabhuNomadly commented 8 years ago

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 commented 8 years ago

Build on v4.2 should be now fixed!

iamashwin26 commented 8 years ago

Why am i still getting this error?