pritambaral / hostapd-rtl871xdrv

Hostapd driver for RTL8188{C|CU|CUS} wifi chips.
176 stars 43 forks source link

patch failed for hostapd-2.3 #2

Closed ghost closed 9 years ago

ghost commented 9 years ago
linaro@linaro-alip:~/src/hostapd-2.3$ patch -Np1 -i ../hostapd-rtl871xdrv-master/rtlxdrv.patch 
patching file hostapd/main.c
Hunk #1 succeeded at 413 (offset 1 line).
patching file src/ap/beacon.c
Hunk #1 succeeded at 814 (offset 4 lines).
patching file src/ap/hw_features.c
patching file src/drivers/driver_bsd.c
patching file src/drivers/driver_wext.c
Hunk #3 succeeded at 2387 with fuzz 1 (offset 36 lines).
Hunk #4 FAILED at 2393.
1 out of 4 hunks FAILED -- saving rejects to file src/drivers/driver_wext.c.rej
patching file src/drivers/drivers.c
patching file src/drivers/drivers.mak
Hunk #1 succeeded at 62 (offset 4 lines).
Hunk #2 succeeded at 82 (offset 4 lines).
patching file src/eap_peer/eap_wsc.c
patching file src/wps/wps.c
Hunk #1 succeeded at 321 (offset 1 line).
Hunk #2 succeeded at 346 (offset 1 line).
patching file src/wps/wps_registrar.c

And the .rej file

--- src/drivers/driver_wext.c
+++ src/drivers/driver_wext.c
@@ -2393,4 +2451,5 @@
    .get_capa = wpa_driver_wext_get_capa,
    .set_operstate = wpa_driver_wext_set_operstate,
    .get_radio_name = wext_get_radio_name,
+   .signal_poll = wext_signal_poll,
 };
ghost commented 9 years ago

It seems that the line and a function named wpa_driver_wext_signal_poll is added so the two hunks in driver_wext.c failed. 2410 .signal_poll = wpa_driver_wext_signal_poll,

2360 static int wpa_driver_wext_signal_poll(void *priv, struct wpa_signal_info *si)
2361 {
2362     struct wpa_driver_wext_data *drv = priv;
2363     struct iw_statistics stats;
2364     struct iwreq iwr;
2365 
2366     os_memset(si, 0, sizeof(*si));
2367     si->current_signal = -9999;
2368     si->current_noise = 9999;
2369     si->chanwidth = CHAN_WIDTH_UNKNOWN;
2370 
2371     os_memset(&iwr, 0, sizeof(iwr));
2372     os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
2373     iwr.u.data.pointer = (caddr_t) &stats;
2374     iwr.u.data.length = sizeof(stats);
2375     iwr.u.data.flags = 1;
2376 
2377     if (ioctl(drv->ioctl_sock, SIOCGIWSTATS, &iwr) < 0) {
2378         wpa_printf(MSG_ERROR, "WEXT: SIOCGIWSTATS: %s",
2379                strerror(errno));
2380         return -1;
2381     }
2382 
2383     si->current_signal = stats.qual.level -
2384         ((stats.qual.updated & IW_QUAL_DBM) ? 0x100 : 0);
2385     si->current_noise = stats.qual.noise -
2386         ((stats.qual.updated & IW_QUAL_DBM) ? 0x100 : 0);
2387     return 0;
2388 }
2xsaiko commented 9 years ago

Confirmed for v2.4-devel

igorpecovnik commented 9 years ago

I am also using 2.4-devel .. i had to adjust patch but working except i always get this error on start: ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported

Is this a known issue?

ghost commented 9 years ago

PR ready.