Use a less generic name for IEEE802.11 CRC-32 routine

Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
too generic. Buildroot autobuilder detected build configuration that
failed to build due to the naming conflict: static linking with openssl
using zlib-ng as a zlib provider, e.g. see:
- http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
- http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/

Use a less generic name ieee80211_crc32 for IEEE802.11 CRC-32 routine
to avoid such naming conflicts.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
This commit is contained in:
Sergey Matyukevich 2022-09-05 23:18:23 +03:00 committed by Jouni Malinen
parent c52ec086da
commit 0c7b3814ca
9 changed files with 18 additions and 17 deletions

View file

@ -1238,7 +1238,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
* Short SSID calculation is identical to FCS and it is defined in
* IEEE P802.11-REVmd/D3.0, 9.4.2.170.3 (Calculating the Short-SSID).
*/
conf->ssid.short_ssid = crc32(conf->ssid.ssid, conf->ssid.ssid_len);
conf->ssid.short_ssid = ieee80211_crc32(conf->ssid.ssid,
conf->ssid.ssid_len);
if (!hostapd_drv_none(hapd)) {
wpa_printf(MSG_DEBUG, "Using interface %s with hwaddr " MACSTR

View file

@ -136,7 +136,7 @@ int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid,
os_memcpy(entry->bssid, bssid, ETH_ALEN);
os_memcpy(&entry->ssid, ssid, sizeof(entry->ssid));
entry->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
entry->short_ssid = ieee80211_crc32(ssid->ssid, ssid->ssid_len);
entry->nr = wpabuf_dup(nr);
if (!entry->nr)

View file

@ -72,7 +72,7 @@ static const u32 crc32_table[256] = {
};
u32 crc32(const u8 *frame, size_t frame_len)
u32 ieee80211_crc32(const u8 *frame, size_t frame_len)
{
size_t i;
u32 crc;

View file

@ -9,6 +9,6 @@
#ifndef CRC32_H
#define CRC32_H
u32 crc32(const u8 *frame, size_t frame_len);
u32 ieee80211_crc32(const u8 *frame, size_t frame_len);
#endif /* CRC32_H */