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

main.c: fix building with Linux version >= 5.13 #15

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

giuliobenetti
Copy link

of_get_mac_address() on Linux version > 5.12 requires mac pointer as second
argument and return an int. So let's deal with it by checking linux version
to make it compatible with both Linux version > 5.12 and not.

Signed-off-by: Giulio Benetti giulio.benetti@benettiengineering.com

@giuliobenetti
Copy link
Author

I’ve realized only now that there is a similar patch already pending #14. Sorry I didn’t check before.

of_get_mac_address() on Linux version >= 5.13 requires mac pointer as
second argument and return an int. So let's deal with it by checking linux
version to make it compatible with both Linux version >= 5.13 and not.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
@giuliobenetti
Copy link
Author

I've just updated checking for Linux >= 5.13.0, otherwise any version >= 5.12.1 fails.

@giuliobenetti giuliobenetti changed the title main.c: fix building with Linux version > 5.12 main.c: fix building with Linux version >= 5.13 Jan 18, 2022
@sergey-kuzminov
Copy link

I tested the patch, it works. Thank you, Giulio.

# uname -a
Linux OrangePi_Zero 5.16.1 #1 SMP Mon Jan 17 21:46:45 MSK 2022 armv7l
GNU/Linux
# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"AFD7DF"
            Mode:Managed  Frequency:2.452 GHz  Access Point:
2C:C8:1B:4C:E1:F3
            Bit Rate=26 Mb/s   Tx-Power=20 dBm
            Retry short limit:7   RTS thr:off   Fragment thr:off
            Encryption key:off
            Power Management:on
            Link Quality=28/70  Signal level=-82 dBm
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
            Tx excessive retries:4  Invalid misc:0   Missed beacon:0

# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:FD:46:1D:D3
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
            Interrupt:43

lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            UP LOOPBACK RUNNING  MTU:65536  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 12:42:FD:46:1D:D3
            inet addr:192.168.10.240  Bcast:192.168.10.255 Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:88 errors:0 dropped:34 overruns:0 frame:0
            TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:13516 (13.1 KiB)  TX bytes:1927 (1.8 KiB)

# ping google.com
PING google.com (216.239.38.120): 56 data bytes
64 bytes from 216.239.38.120: seq=0 ttl=102 time=54.890 ms
64 bytes from 216.239.38.120: seq=1 ttl=102 time=54.102 ms
64 bytes from 216.239.38.120: seq=2 ttl=102 time=51.583 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 51.583/53.525/54.890 ms 

@fifteenhex fifteenhex merged commit 16180b6 into fifteenhex:master Jan 21, 2022
@fifteenhex
Copy link
Owner

Hi, sorry for the delay. For some reason I don't always get notifications for this repo and I rarely check it.

Anyhow. The change looks good to me. I don't have hardware to test so I merged it as-is.

Thanks!

giuliobenetti added a commit to Benetti-Engineering-sas/buildroot that referenced this pull request Jan 21, 2022
…lding

Pending PR is now merged[1] and it fixes Linux >= 5.13 building. So let's
bump xr819-xradio version.

[1]: fifteenhex/xradio#15

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request Jan 22, 2022
…lding

Pending PR is now merged[1] and it fixes Linux >= 5.13 building. So let's
bump xr819-xradio version.

[1]: fifteenhex/xradio#15

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Tested-by: Sergey Kuzminov <kuzminov.sergey81@gmail.com>
Tested-by: Sergey Kuzminov <kuzminov.sergey81@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants