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

Commit 602114ae authored by Holger Schurig's avatar Holger Schurig Committed by John W. Linville
Browse files

libertas: add access functions for mesh open/connect status

parent e4da1a81
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1304,7 +1304,7 @@ int lbs_execute_next_command(struct lbs_private *priv)
		if ((priv->psmode != LBS802_11POWERMODECAM) &&
		    (priv->psstate == PS_STATE_FULL_POWER) &&
		    ((priv->connect_status == LBS_CONNECTED) ||
		    (priv->mesh_connect_status == LBS_CONNECTED))) {
		    lbs_mesh_connected(priv))) {
			if (priv->secinfo.WPAenabled ||
			    priv->secinfo.WPA2enabled) {
				/* check for valid WPA group keys */
+2 −3
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ static ssize_t lbs_rtap_set(struct device *dev,
		if (priv->monitormode == monitor_mode)
			return strlen(buf);
		if (!priv->monitormode) {
			if (priv->infra_open || priv->mesh_open)
			if (priv->infra_open || lbs_mesh_open(priv))
				return -EBUSY;
			if (priv->mode == IW_MODE_INFRA)
				lbs_cmd_80211_deauthenticate(priv,
@@ -619,7 +619,7 @@ static int lbs_thread(void *data)
				if (priv->connect_status == LBS_CONNECTED)
					netif_wake_queue(priv->dev);
				if (priv->mesh_dev &&
				    priv->mesh_connect_status == LBS_CONNECTED)
				    lbs_mesh_connected(priv))
					netif_wake_queue(priv->mesh_dev);
			}
		}
@@ -833,7 +833,6 @@ static int lbs_init_adapter(struct lbs_private *priv)
	memset(priv->current_addr, 0xff, ETH_ALEN);

	priv->connect_status = LBS_DISCONNECTED;
	priv->mesh_connect_status = LBS_DISCONNECTED;
	priv->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
	priv->mode = IW_MODE_INFRA;
	priv->channel = DEFAULT_AD_HOC_CHANNEL;
+2 −1
Original line number Diff line number Diff line
#include <linux/moduleparam.h>
#include <linux/delay.h>
#include <linux/etherdevice.h>
#include <linux/netdevice.h>
@@ -196,6 +195,8 @@ int lbs_init_mesh(struct lbs_private *priv)

	lbs_deb_enter(LBS_DEB_MESH);

	priv->mesh_connect_status = LBS_DISCONNECTED;

	/* Determine mesh_fw_ver from fwrelease and fwcapinfo */
	/* 5.0.16p0 9.0.0.p0 is known to NOT support any mesh */
	/* 5.110.22 have mesh command with 0xa3 command id */
+6 −0
Original line number Diff line number Diff line
@@ -84,4 +84,10 @@ void lbs_mesh_ethtool_get_strings(struct net_device *dev,
	uint32_t stringset, uint8_t *s);


/* Accessors */

#define lbs_mesh_open(priv) (priv->mesh_open)
#define lbs_mesh_connected(priv) (priv->mesh_connect_status == LBS_CONNECTED)


#endif
+1 −1
Original line number Diff line number Diff line
@@ -640,7 +640,7 @@ int lbs_scan_networks(struct lbs_private *priv, int full_scan)
		if (!priv->tx_pending_len)
			netif_wake_queue(priv->dev);
	}
	if (priv->mesh_dev && (priv->mesh_connect_status == LBS_CONNECTED)) {
	if (priv->mesh_dev && lbs_mesh_connected(priv)) {
		netif_carrier_on(priv->mesh_dev);
		if (!priv->tx_pending_len)
			netif_wake_queue(priv->mesh_dev);
Loading