diff options
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 11 |
9 files changed, 47 insertions, 36 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 5b2a1c7c5f05..b4d1b1485840 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1755,7 +1755,8 @@ int lbs_execute_next_command(lbs_private * priv) | |||
1755 | */ | 1755 | */ |
1756 | if ((adapter->psmode != LBS802_11POWERMODECAM) && | 1756 | if ((adapter->psmode != LBS802_11POWERMODECAM) && |
1757 | (adapter->psstate == PS_STATE_FULL_POWER) && | 1757 | (adapter->psstate == PS_STATE_FULL_POWER) && |
1758 | (adapter->connect_status == LBS_CONNECTED)) { | 1758 | ((adapter->connect_status == LBS_CONNECTED) || |
1759 | (adapter->mesh_connect_status == LBS_CONNECTED))) { | ||
1759 | if (adapter->secinfo.WPAenabled || | 1760 | if (adapter->secinfo.WPAenabled || |
1760 | adapter->secinfo.WPA2enabled) { | 1761 | adapter->secinfo.WPA2enabled) { |
1761 | /* check for valid WPA group keys */ | 1762 | /* check for valid WPA group keys */ |
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 6c1fdb8f11fb..11b93f2cde88 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -979,7 +979,7 @@ int lbs_process_event(lbs_private * priv) | |||
979 | break; | 979 | break; |
980 | } | 980 | } |
981 | lbs_pr_info("EVENT: MESH_AUTO_STARTED\n"); | 981 | lbs_pr_info("EVENT: MESH_AUTO_STARTED\n"); |
982 | adapter->connect_status = LBS_CONNECTED; | 982 | adapter->mesh_connect_status = LBS_CONNECTED; |
983 | if (priv->mesh_open == 1) { | 983 | if (priv->mesh_open == 1) { |
984 | netif_wake_queue(priv->mesh_dev); | 984 | netif_wake_queue(priv->mesh_dev); |
985 | netif_carrier_on(priv->mesh_dev); | 985 | netif_carrier_on(priv->mesh_dev); |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 27db5d4389a7..433b9bdf80f7 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -291,6 +291,7 @@ struct _lbs_adapter { | |||
291 | /** NIC Operation characteristics */ | 291 | /** NIC Operation characteristics */ |
292 | u16 currentpacketfilter; | 292 | u16 currentpacketfilter; |
293 | u32 connect_status; | 293 | u32 connect_status; |
294 | u32 mesh_connect_status; | ||
294 | u16 regioncode; | 295 | u16 regioncode; |
295 | u16 txpowerlevel; | 296 | u16 txpowerlevel; |
296 | 297 | ||
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 043a33d49f46..26176d54c576 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -73,10 +73,11 @@ static void if_usb_write_bulk_callback(struct urb *urb) | |||
73 | if (!adapter->cur_cmd) | 73 | if (!adapter->cur_cmd) |
74 | wake_up_interruptible(&priv->waitq); | 74 | wake_up_interruptible(&priv->waitq); |
75 | 75 | ||
76 | if ((adapter->connect_status == LBS_CONNECTED)) { | 76 | if (adapter->connect_status == LBS_CONNECTED) |
77 | netif_wake_queue(dev); | 77 | netif_wake_queue(dev); |
78 | |||
79 | if (priv->mesh_dev && (adapter->mesh_connect_status == LBS_CONNECTED)) | ||
78 | netif_wake_queue(priv->mesh_dev); | 80 | netif_wake_queue(priv->mesh_dev); |
79 | } | ||
80 | } | 81 | } |
81 | } else { | 82 | } else { |
82 | /* print the failure status number for debug */ | 83 | /* print the failure status number for debug */ |
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index 90c25f478123..3854d91c90e2 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -795,10 +795,6 @@ int lbs_ret_80211_associate(lbs_private *priv, | |||
795 | netif_carrier_on(priv->dev); | 795 | netif_carrier_on(priv->dev); |
796 | netif_wake_queue(priv->dev); | 796 | netif_wake_queue(priv->dev); |
797 | 797 | ||
798 | if (priv->mesh_dev) { | ||
799 | netif_carrier_on(priv->mesh_dev); | ||
800 | netif_wake_queue(priv->mesh_dev); | ||
801 | } | ||
802 | 798 | ||
803 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); | 799 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); |
804 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 800 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
@@ -884,11 +880,6 @@ int lbs_ret_80211_ad_hoc_start(lbs_private *priv, | |||
884 | netif_carrier_on(priv->dev); | 880 | netif_carrier_on(priv->dev); |
885 | netif_wake_queue(priv->dev); | 881 | netif_wake_queue(priv->dev); |
886 | 882 | ||
887 | if (priv->mesh_dev) { | ||
888 | netif_carrier_on(priv->mesh_dev); | ||
889 | netif_wake_queue(priv->mesh_dev); | ||
890 | } | ||
891 | |||
892 | memset(&wrqu, 0, sizeof(wrqu)); | 883 | memset(&wrqu, 0, sizeof(wrqu)); |
893 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); | 884 | memcpy(wrqu.ap_addr.sa_data, adapter->curbssparams.bssid, ETH_ALEN); |
894 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 885 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index f0da18c331db..769117916fb3 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -406,13 +406,15 @@ static int lbs_dev_open(struct net_device *dev) | |||
406 | 406 | ||
407 | priv->open = 1; | 407 | priv->open = 1; |
408 | 408 | ||
409 | if (adapter->connect_status == LBS_CONNECTED) { | 409 | if (adapter->connect_status == LBS_CONNECTED) |
410 | netif_carrier_on(priv->dev); | 410 | netif_carrier_on(priv->dev); |
411 | if (priv->mesh_dev) | 411 | else |
412 | netif_carrier_on(priv->mesh_dev); | ||
413 | } else { | ||
414 | netif_carrier_off(priv->dev); | 412 | netif_carrier_off(priv->dev); |
415 | if (priv->mesh_dev) | 413 | |
414 | if (priv->mesh_dev) { | ||
415 | if (adapter->mesh_connect_status == LBS_CONNECTED) | ||
416 | netif_carrier_on(priv->mesh_dev); | ||
417 | else | ||
416 | netif_carrier_off(priv->mesh_dev); | 418 | netif_carrier_off(priv->mesh_dev); |
417 | } | 419 | } |
418 | 420 | ||
@@ -433,6 +435,11 @@ static int lbs_mesh_open(struct net_device *dev) | |||
433 | return -1; | 435 | return -1; |
434 | priv->mesh_open = 1 ; | 436 | priv->mesh_open = 1 ; |
435 | netif_wake_queue(priv->mesh_dev); | 437 | netif_wake_queue(priv->mesh_dev); |
438 | |||
439 | priv->adapter->mesh_connect_status = LBS_CONNECTED; | ||
440 | |||
441 | netif_carrier_on(priv->mesh_dev); | ||
442 | netif_wake_queue(priv->mesh_dev); | ||
436 | if (priv->infra_open == 0) | 443 | if (priv->infra_open == 0) |
437 | return lbs_dev_open(priv->dev) ; | 444 | return lbs_dev_open(priv->dev) ; |
438 | return 0; | 445 | return 0; |
@@ -548,7 +555,7 @@ static int lbs_mesh_pre_start_xmit(struct sk_buff *skb, | |||
548 | 555 | ||
549 | SET_MESH_FRAME(skb); | 556 | SET_MESH_FRAME(skb); |
550 | 557 | ||
551 | ret = lbs_hard_start_xmit(skb, priv->dev); | 558 | ret = lbs_hard_start_xmit(skb, priv->mesh_dev); |
552 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); | 559 | lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret); |
553 | return ret; | 560 | return ret; |
554 | } | 561 | } |
@@ -595,9 +602,12 @@ static void lbs_tx_timeout(struct net_device *dev) | |||
595 | lbs_send_tx_feedback(priv); | 602 | lbs_send_tx_feedback(priv); |
596 | } else | 603 | } else |
597 | wake_up_interruptible(&priv->waitq); | 604 | wake_up_interruptible(&priv->waitq); |
598 | } else if (priv->adapter->connect_status == LBS_CONNECTED) { | 605 | } else if (dev == priv->dev) { |
599 | netif_wake_queue(priv->dev); | 606 | if (priv->adapter->connect_status == LBS_CONNECTED) |
600 | if (priv->mesh_dev) | 607 | netif_wake_queue(priv->dev); |
608 | |||
609 | } else if (dev == priv->mesh_dev) { | ||
610 | if (priv->adapter->mesh_connect_status == LBS_CONNECTED) | ||
601 | netif_wake_queue(priv->mesh_dev); | 611 | netif_wake_queue(priv->mesh_dev); |
602 | } | 612 | } |
603 | 613 | ||
@@ -1054,6 +1064,7 @@ static int lbs_init_adapter(lbs_private *priv) | |||
1054 | memset(adapter->current_addr, 0xff, ETH_ALEN); | 1064 | memset(adapter->current_addr, 0xff, ETH_ALEN); |
1055 | 1065 | ||
1056 | adapter->connect_status = LBS_DISCONNECTED; | 1066 | adapter->connect_status = LBS_DISCONNECTED; |
1067 | adapter->mesh_connect_status = LBS_DISCONNECTED; | ||
1057 | adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; | 1068 | adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; |
1058 | adapter->mode = IW_MODE_INFRA; | 1069 | adapter->mode = IW_MODE_INFRA; |
1059 | adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL; | 1070 | adapter->curbssparams.channel = DEFAULT_AD_HOC_CHANNEL; |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 30e1a8e8a16a..13a0838aa1e6 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -297,7 +297,8 @@ static void lbs_scan_create_channel_list(lbs_private *priv, | |||
297 | 297 | ||
298 | for (rgnidx = 0; rgnidx < ARRAY_SIZE(adapter->region_channel); rgnidx++) { | 298 | for (rgnidx = 0; rgnidx < ARRAY_SIZE(adapter->region_channel); rgnidx++) { |
299 | if (priv->adapter->enable11d && | 299 | if (priv->adapter->enable11d && |
300 | adapter->connect_status != LBS_CONNECTED) { | 300 | (adapter->connect_status != LBS_CONNECTED) && |
301 | (adapter->mesh_connect_status != LBS_CONNECTED)) { | ||
301 | /* Scan all the supported chan for the first scan */ | 302 | /* Scan all the supported chan for the first scan */ |
302 | if (!adapter->universal_channel[rgnidx].valid) | 303 | if (!adapter->universal_channel[rgnidx].valid) |
303 | continue; | 304 | continue; |
@@ -897,13 +898,14 @@ int lbs_scan_networks(lbs_private *priv, | |||
897 | mutex_unlock(&adapter->lock); | 898 | mutex_unlock(&adapter->lock); |
898 | #endif | 899 | #endif |
899 | 900 | ||
900 | if (priv->adapter->connect_status == LBS_CONNECTED) { | 901 | if (adapter->connect_status == LBS_CONNECTED) { |
901 | netif_carrier_on(priv->dev); | 902 | netif_carrier_on(priv->dev); |
902 | netif_wake_queue(priv->dev); | 903 | netif_wake_queue(priv->dev); |
903 | if (priv->mesh_dev) { | 904 | } |
904 | netif_carrier_on(priv->mesh_dev); | 905 | |
905 | netif_wake_queue(priv->mesh_dev); | 906 | if (priv->mesh_dev && (adapter->mesh_connect_status == LBS_CONNECTED)) { |
906 | } | 907 | netif_carrier_on(priv->mesh_dev); |
908 | netif_wake_queue(priv->mesh_dev); | ||
907 | } | 909 | } |
908 | 910 | ||
909 | out: | 911 | out: |
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 93725ce55b10..267274b804c8 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -273,10 +273,11 @@ void lbs_send_tx_feedback(lbs_private *priv) | |||
273 | lbs_upload_rx_packet(priv, adapter->currenttxskb); | 273 | lbs_upload_rx_packet(priv, adapter->currenttxskb); |
274 | adapter->currenttxskb = NULL; | 274 | adapter->currenttxskb = NULL; |
275 | priv->adapter->TxLockFlag = 0; | 275 | priv->adapter->TxLockFlag = 0; |
276 | if (priv->adapter->connect_status == LBS_CONNECTED) { | 276 | |
277 | if (adapter->connect_status == LBS_CONNECTED) | ||
277 | netif_wake_queue(priv->dev); | 278 | netif_wake_queue(priv->dev); |
278 | if (priv->mesh_dev) | 279 | |
279 | netif_wake_queue(priv->mesh_dev); | 280 | if (priv->mesh_dev && (adapter->mesh_connect_status == LBS_CONNECTED)) |
280 | } | 281 | netif_wake_queue(priv->mesh_dev); |
281 | } | 282 | } |
282 | EXPORT_SYMBOL_GPL(lbs_send_tx_feedback); | 283 | EXPORT_SYMBOL_GPL(lbs_send_tx_feedback); |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 57fe5f67a05a..2231a65a537d 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -154,7 +154,8 @@ static void copy_active_data_rates(lbs_adapter *adapter, u8 *rates) | |||
154 | { | 154 | { |
155 | lbs_deb_enter(LBS_DEB_WEXT); | 155 | lbs_deb_enter(LBS_DEB_WEXT); |
156 | 156 | ||
157 | if (adapter->connect_status != LBS_CONNECTED) | 157 | if ((adapter->connect_status != LBS_CONNECTED) && |
158 | (adapter->mesh_connect_status != LBS_CONNECTED)) | ||
158 | memcpy(rates, lbs_bg_rates, MAX_RATES); | 159 | memcpy(rates, lbs_bg_rates, MAX_RATES); |
159 | else | 160 | else |
160 | memcpy(rates, adapter->curbssparams.rates, MAX_RATES); | 161 | memcpy(rates, adapter->curbssparams.rates, MAX_RATES); |
@@ -274,7 +275,7 @@ static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info, | |||
274 | 275 | ||
275 | /* Use nickname to indicate that mesh is on */ | 276 | /* Use nickname to indicate that mesh is on */ |
276 | 277 | ||
277 | if (adapter->connect_status == LBS_CONNECTED) { | 278 | if (adapter->mesh_connect_status == LBS_CONNECTED) { |
278 | strncpy(extra, "Mesh", 12); | 279 | strncpy(extra, "Mesh", 12); |
279 | extra[12] = '\0'; | 280 | extra[12] = '\0'; |
280 | dwrq->length = strlen(extra); | 281 | dwrq->length = strlen(extra); |
@@ -589,7 +590,8 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
589 | 590 | ||
590 | range->num_frequency = 0; | 591 | range->num_frequency = 0; |
591 | if (priv->adapter->enable11d && | 592 | if (priv->adapter->enable11d && |
592 | adapter->connect_status == LBS_CONNECTED) { | 593 | (adapter->connect_status == LBS_CONNECTED || |
594 | adapter->mesh_connect_status == LBS_CONNECTED)) { | ||
593 | u8 chan_no; | 595 | u8 chan_no; |
594 | u8 band; | 596 | u8 band; |
595 | 597 | ||
@@ -827,7 +829,8 @@ static struct iw_statistics *lbs_get_wireless_stats(struct net_device *dev) | |||
827 | priv->wstats.status = adapter->mode; | 829 | priv->wstats.status = adapter->mode; |
828 | 830 | ||
829 | /* If we're not associated, all quality values are meaningless */ | 831 | /* If we're not associated, all quality values are meaningless */ |
830 | if (adapter->connect_status != LBS_CONNECTED) | 832 | if ((adapter->connect_status != LBS_CONNECTED) && |
833 | (adapter->mesh_connect_status != LBS_CONNECTED)) | ||
831 | goto out; | 834 | goto out; |
832 | 835 | ||
833 | /* Quality by RSSI */ | 836 | /* Quality by RSSI */ |