Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05f57195 authored by Martin Decky's avatar Martin Decky Committed by John W. Linville
Browse files

hostap: Revert a toxic part of the conversion to net_device_ops



As the hostap driver was converted to use net_device_ops, a mistake was
made in hostap_main.c (commit 5ae4efbc).
Originally, the tx_queue_len was set to 0 for every other interface than
HOSTAP_INTERFACE_MASTER, but the new fragment of code sets tx_queue_len to
0 only for HOSTAP_INTERFACE_MASTER. The opposite of the previous
behavior makes the driver to drop all packets in AP mode.

Change the way 0 is assigned to tx_queue_len according to the original
logic.

Signed-off-by: default avatarMartin Decky <martin@decky.cz>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4142e0d1
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -875,15 +875,16 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,


	switch(type) {
	switch(type) {
	case HOSTAP_INTERFACE_AP:
	case HOSTAP_INTERFACE_AP:
		dev->tx_queue_len = 0;	/* use main radio device queue */
		dev->netdev_ops = &hostap_mgmt_netdev_ops;
		dev->netdev_ops = &hostap_mgmt_netdev_ops;
		dev->type = ARPHRD_IEEE80211;
		dev->type = ARPHRD_IEEE80211;
		dev->header_ops = &hostap_80211_ops;
		dev->header_ops = &hostap_80211_ops;
		break;
		break;
	case HOSTAP_INTERFACE_MASTER:
	case HOSTAP_INTERFACE_MASTER:
		dev->tx_queue_len = 0;	/* use main radio device queue */
		dev->netdev_ops = &hostap_master_ops;
		dev->netdev_ops = &hostap_master_ops;
		break;
		break;
	default:
	default:
		dev->tx_queue_len = 0;	/* use main radio device queue */
		dev->netdev_ops = &hostap_netdev_ops;
		dev->netdev_ops = &hostap_netdev_ops;
	}
	}