diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-10-25 10:04:14 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 05:58:48 -0500 |
commit | 28ae58dd1f55f55dabf02fbc76a76f0809eee937 (patch) | |
tree | 91b07188914a8ecfa2d1eb0eacb1ae11e7e7e953 | |
parent | 240d279940ef496e9456db2287b7989f6521e2e2 (diff) |
ath6kl: Remove net_device from ath6kl
Use one which is available in vif structure instead.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 16 |
5 files changed, 14 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 29254636781b..9d8557e7819d 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -2116,7 +2116,6 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, | |||
2116 | vif->wdev.iftype = type; | 2116 | vif->wdev.iftype = type; |
2117 | vif->fw_vif_idx = fw_vif_idx; | 2117 | vif->fw_vif_idx = fw_vif_idx; |
2118 | ar->wdev = &vif->wdev; | 2118 | ar->wdev = &vif->wdev; |
2119 | ar->net_dev = ndev; | ||
2120 | 2119 | ||
2121 | init_netdev(ndev); | 2120 | init_netdev(ndev); |
2122 | 2121 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 3fb889892aac..4db0b15ec96b 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -446,7 +446,6 @@ enum ath6kl_dev_state { | |||
446 | 446 | ||
447 | struct ath6kl { | 447 | struct ath6kl { |
448 | struct device *dev; | 448 | struct device *dev; |
449 | struct net_device *net_dev; | ||
450 | struct wiphy *wiphy; | 449 | struct wiphy *wiphy; |
451 | struct ath6kl_bmi bmi; | 450 | struct ath6kl_bmi bmi; |
452 | const struct ath6kl_hif_ops *hif_ops; | 451 | const struct ath6kl_hif_ops *hif_ops; |
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 957bfb0c3ce7..65739573b2f9 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -521,7 +521,7 @@ void ath6kl_core_free(struct ath6kl *ar) | |||
521 | 521 | ||
522 | int ath6kl_unavail_ev(struct ath6kl *ar) | 522 | int ath6kl_unavail_ev(struct ath6kl *ar) |
523 | { | 523 | { |
524 | ath6kl_destroy(ar->net_dev, 1); | 524 | ath6kl_destroy(ar->vif->ndev, 1); |
525 | 525 | ||
526 | return 0; | 526 | return 0; |
527 | } | 527 | } |
@@ -1417,7 +1417,7 @@ static int ath6kl_init(struct ath6kl *ar) | |||
1417 | 1417 | ||
1418 | 1418 | ||
1419 | ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n", | 1419 | ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n", |
1420 | __func__, ar->net_dev->name, ar->net_dev, ar); | 1420 | __func__, ndev->name, ndev, ar); |
1421 | 1421 | ||
1422 | /* | 1422 | /* |
1423 | * The reason we have to wait for the target here is that the | 1423 | * The reason we have to wait for the target here is that the |
@@ -1580,8 +1580,8 @@ err_wq: | |||
1580 | 1580 | ||
1581 | void ath6kl_stop_txrx(struct ath6kl *ar) | 1581 | void ath6kl_stop_txrx(struct ath6kl *ar) |
1582 | { | 1582 | { |
1583 | struct net_device *ndev = ar->net_dev; | ||
1584 | struct ath6kl_vif *vif = ar->vif; | 1583 | struct ath6kl_vif *vif = ar->vif; |
1584 | struct net_device *ndev = vif->ndev; | ||
1585 | 1585 | ||
1586 | if (!ndev) | 1586 | if (!ndev) |
1587 | return; | 1587 | return; |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 19b64ae08e12..023624d9f017 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -938,7 +938,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar) | |||
938 | 938 | ||
939 | switch (vif->sme_state) { | 939 | switch (vif->sme_state) { |
940 | case SME_CONNECTING: | 940 | case SME_CONNECTING: |
941 | cfg80211_connect_result(ar->net_dev, vif->bssid, NULL, 0, | 941 | cfg80211_connect_result(vif->ndev, vif->bssid, NULL, 0, |
942 | NULL, 0, | 942 | NULL, 0, |
943 | WLAN_STATUS_UNSPECIFIED_FAILURE, | 943 | WLAN_STATUS_UNSPECIFIED_FAILURE, |
944 | GFP_KERNEL); | 944 | GFP_KERNEL); |
@@ -950,7 +950,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar) | |||
950 | * suspend, why? Need to send disconnected event in that | 950 | * suspend, why? Need to send disconnected event in that |
951 | * state. | 951 | * state. |
952 | */ | 952 | */ |
953 | cfg80211_disconnected(ar->net_dev, 0, NULL, 0, GFP_KERNEL); | 953 | cfg80211_disconnected(vif->ndev, 0, NULL, 0, GFP_KERNEL); |
954 | break; | 954 | break; |
955 | } | 955 | } |
956 | 956 | ||
@@ -995,7 +995,7 @@ static const char *get_hw_id_string(u32 id) | |||
995 | void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver) | 995 | void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver) |
996 | { | 996 | { |
997 | struct ath6kl *ar = devt; | 997 | struct ath6kl *ar = devt; |
998 | struct net_device *dev = ar->net_dev; | 998 | struct net_device *dev = ar->vif->ndev; |
999 | 999 | ||
1000 | memcpy(dev->dev_addr, datap, ETH_ALEN); | 1000 | memcpy(dev->dev_addr, datap, ETH_ALEN); |
1001 | ath6kl_dbg(ATH6KL_DBG_TRC, "%s: mac addr = %pM\n", | 1001 | ath6kl_dbg(ATH6KL_DBG_TRC, "%s: mac addr = %pM\n", |
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 50ff9a42401c..7e2d6011f054 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c | |||
@@ -478,7 +478,7 @@ stop_net_queues: | |||
478 | spin_lock_bh(&ar->lock); | 478 | spin_lock_bh(&ar->lock); |
479 | set_bit(NETQ_STOPPED, &vif->flags); | 479 | set_bit(NETQ_STOPPED, &vif->flags); |
480 | spin_unlock_bh(&ar->lock); | 480 | spin_unlock_bh(&ar->lock); |
481 | netif_stop_queue(ar->net_dev); | 481 | netif_stop_queue(vif->ndev); |
482 | 482 | ||
483 | return HTC_SEND_FULL_KEEP; | 483 | return HTC_SEND_FULL_KEEP; |
484 | } | 484 | } |
@@ -619,7 +619,7 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue) | |||
619 | 619 | ||
620 | if (test_bit(CONNECTED, &vif->flags)) { | 620 | if (test_bit(CONNECTED, &vif->flags)) { |
621 | if (!flushing) | 621 | if (!flushing) |
622 | netif_wake_queue(ar->net_dev); | 622 | netif_wake_queue(vif->ndev); |
623 | } | 623 | } |
624 | 624 | ||
625 | if (wake_event) | 625 | if (wake_event) |
@@ -1086,12 +1086,12 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1086 | ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", | 1086 | ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", |
1087 | skb->data, skb->len); | 1087 | skb->data, skb->len); |
1088 | 1088 | ||
1089 | skb->dev = ar->net_dev; | 1089 | skb->dev = vif->ndev; |
1090 | 1090 | ||
1091 | if (!test_bit(WMI_ENABLED, &ar->flag)) { | 1091 | if (!test_bit(WMI_ENABLED, &ar->flag)) { |
1092 | if (EPPING_ALIGNMENT_PAD > 0) | 1092 | if (EPPING_ALIGNMENT_PAD > 0) |
1093 | skb_pull(skb, EPPING_ALIGNMENT_PAD); | 1093 | skb_pull(skb, EPPING_ALIGNMENT_PAD); |
1094 | ath6kl_deliver_frames_to_nw_stack(ar->net_dev, skb); | 1094 | ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); |
1095 | return; | 1095 | return; |
1096 | } | 1096 | } |
1097 | 1097 | ||
@@ -1174,7 +1174,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1174 | while ((skbuff = skb_dequeue(&conn->psq)) | 1174 | while ((skbuff = skb_dequeue(&conn->psq)) |
1175 | != NULL) { | 1175 | != NULL) { |
1176 | spin_unlock_bh(&conn->psq_lock); | 1176 | spin_unlock_bh(&conn->psq_lock); |
1177 | ath6kl_data_tx(skbuff, ar->net_dev); | 1177 | ath6kl_data_tx(skbuff, vif->ndev); |
1178 | spin_lock_bh(&conn->psq_lock); | 1178 | spin_lock_bh(&conn->psq_lock); |
1179 | } | 1179 | } |
1180 | spin_unlock_bh(&conn->psq_lock); | 1180 | spin_unlock_bh(&conn->psq_lock); |
@@ -1230,7 +1230,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1230 | return; | 1230 | return; |
1231 | } | 1231 | } |
1232 | 1232 | ||
1233 | if (!(ar->net_dev->flags & IFF_UP)) { | 1233 | if (!(vif->ndev->flags & IFF_UP)) { |
1234 | dev_kfree_skb(skb); | 1234 | dev_kfree_skb(skb); |
1235 | return; | 1235 | return; |
1236 | } | 1236 | } |
@@ -1261,7 +1261,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1261 | } | 1261 | } |
1262 | } | 1262 | } |
1263 | if (skb1) | 1263 | if (skb1) |
1264 | ath6kl_data_tx(skb1, ar->net_dev); | 1264 | ath6kl_data_tx(skb1, vif->ndev); |
1265 | 1265 | ||
1266 | if (skb == NULL) { | 1266 | if (skb == NULL) { |
1267 | /* nothing to deliver up the stack */ | 1267 | /* nothing to deliver up the stack */ |
@@ -1277,7 +1277,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1277 | /* aggregation code will handle the skb */ | 1277 | /* aggregation code will handle the skb */ |
1278 | return; | 1278 | return; |
1279 | 1279 | ||
1280 | ath6kl_deliver_frames_to_nw_stack(ar->net_dev, skb); | 1280 | ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); |
1281 | } | 1281 | } |
1282 | 1282 | ||
1283 | static void aggr_timeout(unsigned long arg) | 1283 | static void aggr_timeout(unsigned long arg) |