hostap: Remove special handling for protocol version 3 on RX
This functionality was removed from the Host AP driver in May 2003, so there is not any point in maintaining this in hostapd either. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
3dfaedb433
commit
7420e36293
1 changed files with 5 additions and 14 deletions
|
@ -140,7 +140,7 @@ static void handle_tx_callback(struct hostap_driver_data *drv, u8 *buf,
|
||||||
static void handle_frame(struct hostap_driver_data *drv, u8 *buf, size_t len)
|
static void handle_frame(struct hostap_driver_data *drv, u8 *buf, size_t len)
|
||||||
{
|
{
|
||||||
struct ieee80211_hdr *hdr;
|
struct ieee80211_hdr *hdr;
|
||||||
u16 fc, extra_len, type, stype;
|
u16 fc, type, stype;
|
||||||
size_t data_len = len;
|
size_t data_len = len;
|
||||||
int ver;
|
int ver;
|
||||||
union wpa_event_data event;
|
union wpa_event_data event;
|
||||||
|
@ -165,19 +165,10 @@ static void handle_frame(struct hostap_driver_data *drv, u8 *buf, size_t len)
|
||||||
|
|
||||||
ver = fc & WLAN_FC_PVER;
|
ver = fc & WLAN_FC_PVER;
|
||||||
|
|
||||||
/* protocol version 3 is reserved for indicating extra data after the
|
/* protocol version 2 is reserved for indicating ACKed frame (TX
|
||||||
* payload, version 2 for indicating ACKed frame (TX callbacks), and
|
* callbacks), and version 1 for indicating failed frame (no ACK, TX
|
||||||
* version 1 for indicating failed frame (no ACK, TX callbacks) */
|
* callbacks) */
|
||||||
if (ver == 3) {
|
if (ver == 1 || ver == 2) {
|
||||||
u8 *pos = buf + len - 2;
|
|
||||||
extra_len = WPA_GET_LE16(pos);
|
|
||||||
printf("extra data in frame (elen=%d)\n", extra_len);
|
|
||||||
if ((size_t) extra_len + 2 > len) {
|
|
||||||
printf(" extra data overflow\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
len -= extra_len + 2;
|
|
||||||
} else if (ver == 1 || ver == 2) {
|
|
||||||
handle_tx_callback(drv, buf, data_len, ver == 2 ? 1 : 0);
|
handle_tx_callback(drv, buf, data_len, ver == 2 ? 1 : 0);
|
||||||
return;
|
return;
|
||||||
} else if (ver != 0) {
|
} else if (ver != 0) {
|
||||||
|
|
Loading…
Reference in a new issue