*/
if ((adapter->psmode != LBS802_11POWERMODECAM) &&
(adapter->psstate == PS_STATE_FULL_POWER) &&
- (adapter->connect_status == LBS_CONNECTED)) {
+ ((adapter->connect_status == LBS_CONNECTED) ||
+ (adapter->mesh_connect_status == LBS_CONNECTED))) {
if (adapter->secinfo.WPAenabled ||
adapter->secinfo.WPA2enabled) {
/* check for valid WPA group keys */
break;
}
lbs_pr_info("EVENT: MESH_AUTO_STARTED\n");
- adapter->connect_status = LBS_CONNECTED;
+ adapter->mesh_connect_status = LBS_CONNECTED;
if (priv->mesh_open == 1) {
netif_wake_queue(priv->mesh_dev);
netif_carrier_on(priv->mesh_dev);
/** NIC Operation characteristics */
u16 currentpacketfilter;
u32 connect_status;
+ u32 mesh_connect_status;
u16 regioncode;
u16 txpowerlevel;
if (!adapter->cur_cmd)
wake_up_interruptible(&priv->waitq);
- if ((adapter->connect_status == LBS_CONNECTED)) {
+ if (adapter->connect_status == LBS_CONNECTED)
netif_wake_queue(dev);
+
+ if (priv->mesh_dev && (adapter->mesh_connect_status == LBS_CONNECTED))
netif_wake_queue(priv->mesh_dev);
- }
}
} else {
/* print the failure status number for debug */
netif_carrier_on(priv->dev);
netif_wake_queue(priv->dev);
- if (priv->mesh_dev) {
- netif_carrier_on(priv->mesh_dev);
- netif_wake_queue(priv->mesh_dev);
- }
memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
netif_carrier_on(priv->dev);
netif_wake_queue(priv->dev);
- if (priv->mesh_dev) {
- netif_carrier_on(priv->mesh_dev);
- netif_wake_queue(priv->mesh_dev);
- }
-
memset(&wrqu, 0, sizeof(wrqu));
memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN);
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
priv->open = 1;
- if (adapter->connect_status == LBS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED)
netif_carrier_on(priv->dev);
- if (priv->mesh_dev)
- netif_carrier_on(priv->mesh_dev);
- } else {
+ else
netif_carrier_off(priv->dev);
- if (priv->mesh_dev)
+
+ if (priv->mesh_dev) {
+ if (adapter->mesh_connect_status == LBS_CONNECTED)
+ netif_carrier_on(priv->mesh_dev);
+ else
netif_carrier_off(priv->mesh_dev);
}
return -1;
priv->mesh_open = 1 ;
netif_wake_queue(priv->mesh_dev);
+
+ priv->adapter->mesh_connect_status = LBS_CONNECTED;
+
+ netif_carrier_on(priv->mesh_dev);
+ netif_wake_queue(priv->mesh_dev);
if (priv->infra_open == 0)
return lbs_dev_open(priv->dev) ;
return 0;
SET_MESH_FRAME(skb);
- ret = lbs_hard_start_xmit(skb, priv->dev);
+ ret = lbs_hard_start_xmit(skb, priv->mesh_dev);
lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
return ret;
}
lbs_send_tx_feedback(priv);
} else
wake_up_interruptible(&priv->waitq);
- } else if (priv->adapter->connect_status == LBS_CONNECTED) {
- netif_wake_queue(priv->dev);
- if (priv->mesh_dev)
+ } else if (dev == priv->dev) {
+ if (priv->adapter->connect_status == LBS_CONNECTED)
+ netif_wake_queue(priv->dev);
+
+ } else if (dev == priv->mesh_dev) {
+ if (priv->adapter->mesh_connect_status == LBS_CONNECTED)
netif_wake_queue(priv->mesh_dev);
}
memset(adapter->current_addr, 0xff, ETH_ALEN);
adapter->connect_status = LBS_DISCONNECTED;
+ adapter->mesh_connect_status = LBS_DISCONNECTED;
adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
adapter->mode = IW_MODE_INFRA;
adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL;
for (rgnidx = 0; rgnidx < ARRAY_SIZE(adapter->region_channel); rgnidx++) {
if (priv->adapter->enable11d &&
- adapter->connect_status != LBS_CONNECTED) {
+ (adapter->connect_status != LBS_CONNECTED) &&
+ (adapter->mesh_connect_status != LBS_CONNECTED)) {
/* Scan all the supported chan for the first scan */
if (!adapter->universal_channel[rgnidx].valid)
continue;
mutex_unlock(&adapter->lock);
#endif
- if (priv->adapter->connect_status == LBS_CONNECTED) {
+ if (adapter->connect_status == LBS_CONNECTED) {
netif_carrier_on(priv->dev);
netif_wake_queue(priv->dev);
- if (priv->mesh_dev) {
- netif_carrier_on(priv->mesh_dev);
- netif_wake_queue(priv->mesh_dev);
- }
+ }
+
+ if (priv->mesh_dev && (adapter->mesh_connect_status == LBS_CONNECTED)) {
+ netif_carrier_on(priv->mesh_dev);
+ netif_wake_queue(priv->mesh_dev);
}
out:
lbs_upload_rx_packet(priv, adapter->currenttxskb);
adapter->currenttxskb = NULL;
priv->adapter->TxLockFlag = 0;
- if (priv->adapter->connect_status == LBS_CONNECTED) {
+
+ if (adapter->connect_status == LBS_CONNECTED)
netif_wake_queue(priv->dev);
- if (priv->mesh_dev)
- netif_wake_queue(priv->mesh_dev);
- }
+
+ if (priv->mesh_dev && (adapter->mesh_connect_status == LBS_CONNECTED))
+ netif_wake_queue(priv->mesh_dev);
}
EXPORT_SYMBOL_GPL(lbs_send_tx_feedback);
{
lbs_deb_enter(LBS_DEB_WEXT);
- if (adapter->connect_status != LBS_CONNECTED)
+ if ((adapter->connect_status != LBS_CONNECTED) &&
+ (adapter->mesh_connect_status != LBS_CONNECTED))
memcpy(rates, lbs_bg_rates, MAX_RATES);
else
memcpy(rates, adapter->curbssparams.rates, MAX_RATES);
/* Use nickname to indicate that mesh is on */
- if (adapter->connect_status == LBS_CONNECTED) {
+ if (adapter->mesh_connect_status == LBS_CONNECTED) {
strncpy(extra, "Mesh", 12);
extra[12] = '\0';
dwrq->length = strlen(extra);
range->num_frequency = 0;
if (priv->adapter->enable11d &&
- adapter->connect_status == LBS_CONNECTED) {
+ (adapter->connect_status == LBS_CONNECTED ||
+ adapter->mesh_connect_status == LBS_CONNECTED)) {
u8 chan_no;
u8 band;
priv->wstats.status = adapter->mode;
/* If we're not associated, all quality values are meaningless */
- if (adapter->connect_status != LBS_CONNECTED)
+ if ((adapter->connect_status != LBS_CONNECTED) &&
+ (adapter->mesh_connect_status != LBS_CONNECTED))
goto out;
/* Quality by RSSI */