Skip to content

Commit 71e0e87

Browse files
ajaykathatnoglitch
authored andcommitted
wilc1000: added mgmt header check before processing monitor header offset
Before passing to monitor interface check mgmt header value is set to ensure correct offset parsing. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
1 parent 95f7863 commit 71e0e87

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • drivers/staging/wilc1000

drivers/staging/wilc1000/wlan.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,11 +1309,11 @@ static void wilc_wlan_handle_rx_buff(struct wilc *wilc, u8 *buffer, int size)
13091309
}
13101310
} else if (pkt_offset & IS_MANAGMEMENT) {
13111311
buff_ptr += HOST_HDR_OFFSET;
1312-
wilc_wfi_mgmt_rx(wilc, buff_ptr, pkt_len);
1313-
} else if (pkt_offset & IS_MON_PKT) {
1314-
/* packet received on monitor interface */
1315-
buff_ptr += HOST_HDR_OFFSET;
1316-
wilc_wfi_handle_monitor_rx(wilc, buff_ptr, pkt_len);
1312+
1313+
if (pkt_offset & IS_MON_PKT)
1314+
wilc_wfi_handle_monitor_rx(wilc, buff_ptr, pkt_len);
1315+
else
1316+
wilc_wfi_mgmt_rx(wilc, buff_ptr, pkt_len);
13171317
} else {
13181318
struct net_device *wilc_netdev;
13191319
struct wilc_vif *vif;

0 commit comments

Comments
 (0)