Commit 28ae58dd authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by Kalle Valo

ath6kl: Remove net_device from ath6kl

Use one which is available in vif structure instead.
Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 240d2799
...@@ -2116,7 +2116,6 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name, ...@@ -2116,7 +2116,6 @@ struct net_device *ath6kl_interface_add(struct ath6kl *ar, char *name,
vif->wdev.iftype = type; vif->wdev.iftype = type;
vif->fw_vif_idx = fw_vif_idx; vif->fw_vif_idx = fw_vif_idx;
ar->wdev = &vif->wdev; ar->wdev = &vif->wdev;
ar->net_dev = ndev;
init_netdev(ndev); init_netdev(ndev);
......
...@@ -446,7 +446,6 @@ enum ath6kl_dev_state { ...@@ -446,7 +446,6 @@ enum ath6kl_dev_state {
struct ath6kl { struct ath6kl {
struct device *dev; struct device *dev;
struct net_device *net_dev;
struct wiphy *wiphy; struct wiphy *wiphy;
struct ath6kl_bmi bmi; struct ath6kl_bmi bmi;
const struct ath6kl_hif_ops *hif_ops; const struct ath6kl_hif_ops *hif_ops;
......
...@@ -521,7 +521,7 @@ void ath6kl_core_free(struct ath6kl *ar) ...@@ -521,7 +521,7 @@ void ath6kl_core_free(struct ath6kl *ar)
int ath6kl_unavail_ev(struct ath6kl *ar) int ath6kl_unavail_ev(struct ath6kl *ar)
{ {
ath6kl_destroy(ar->net_dev, 1); ath6kl_destroy(ar->vif->ndev, 1);
return 0; return 0;
} }
...@@ -1417,7 +1417,7 @@ static int ath6kl_init(struct ath6kl *ar) ...@@ -1417,7 +1417,7 @@ static int ath6kl_init(struct ath6kl *ar)
ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n", ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n",
__func__, ar->net_dev->name, ar->net_dev, ar); __func__, ndev->name, ndev, ar);
/* /*
* The reason we have to wait for the target here is that the * The reason we have to wait for the target here is that the
...@@ -1580,8 +1580,8 @@ int ath6kl_core_init(struct ath6kl *ar) ...@@ -1580,8 +1580,8 @@ int ath6kl_core_init(struct ath6kl *ar)
void ath6kl_stop_txrx(struct ath6kl *ar) void ath6kl_stop_txrx(struct ath6kl *ar)
{ {
struct net_device *ndev = ar->net_dev;
struct ath6kl_vif *vif = ar->vif; struct ath6kl_vif *vif = ar->vif;
struct net_device *ndev = vif->ndev;
if (!ndev) if (!ndev)
return; return;
......
...@@ -938,7 +938,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar) ...@@ -938,7 +938,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar)
switch (vif->sme_state) { switch (vif->sme_state) {
case SME_CONNECTING: case SME_CONNECTING:
cfg80211_connect_result(ar->net_dev, vif->bssid, NULL, 0, cfg80211_connect_result(vif->ndev, vif->bssid, NULL, 0,
NULL, 0, NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE, WLAN_STATUS_UNSPECIFIED_FAILURE,
GFP_KERNEL); GFP_KERNEL);
...@@ -950,7 +950,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar) ...@@ -950,7 +950,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar)
* suspend, why? Need to send disconnected event in that * suspend, why? Need to send disconnected event in that
* state. * state.
*/ */
cfg80211_disconnected(ar->net_dev, 0, NULL, 0, GFP_KERNEL); cfg80211_disconnected(vif->ndev, 0, NULL, 0, GFP_KERNEL);
break; break;
} }
...@@ -995,7 +995,7 @@ static const char *get_hw_id_string(u32 id) ...@@ -995,7 +995,7 @@ static const char *get_hw_id_string(u32 id)
void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver) void ath6kl_ready_event(void *devt, u8 *datap, u32 sw_ver, u32 abi_ver)
{ {
struct ath6kl *ar = devt; struct ath6kl *ar = devt;
struct net_device *dev = ar->net_dev; struct net_device *dev = ar->vif->ndev;
memcpy(dev->dev_addr, datap, ETH_ALEN); memcpy(dev->dev_addr, datap, ETH_ALEN);
ath6kl_dbg(ATH6KL_DBG_TRC, "%s: mac addr = %pM\n", ath6kl_dbg(ATH6KL_DBG_TRC, "%s: mac addr = %pM\n",
......
...@@ -478,7 +478,7 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target, ...@@ -478,7 +478,7 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target,
spin_lock_bh(&ar->lock); spin_lock_bh(&ar->lock);
set_bit(NETQ_STOPPED, &vif->flags); set_bit(NETQ_STOPPED, &vif->flags);
spin_unlock_bh(&ar->lock); spin_unlock_bh(&ar->lock);
netif_stop_queue(ar->net_dev); netif_stop_queue(vif->ndev);
return HTC_SEND_FULL_KEEP; return HTC_SEND_FULL_KEEP;
} }
...@@ -619,7 +619,7 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue) ...@@ -619,7 +619,7 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue)
if (test_bit(CONNECTED, &vif->flags)) { if (test_bit(CONNECTED, &vif->flags)) {
if (!flushing) if (!flushing)
netif_wake_queue(ar->net_dev); netif_wake_queue(vif->ndev);
} }
if (wake_event) if (wake_event)
...@@ -1086,12 +1086,12 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) ...@@ -1086,12 +1086,12 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ",
skb->data, skb->len); skb->data, skb->len);
skb->dev = ar->net_dev; skb->dev = vif->ndev;
if (!test_bit(WMI_ENABLED, &ar->flag)) { if (!test_bit(WMI_ENABLED, &ar->flag)) {
if (EPPING_ALIGNMENT_PAD > 0) if (EPPING_ALIGNMENT_PAD > 0)
skb_pull(skb, EPPING_ALIGNMENT_PAD); skb_pull(skb, EPPING_ALIGNMENT_PAD);
ath6kl_deliver_frames_to_nw_stack(ar->net_dev, skb); ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb);
return; return;
} }
...@@ -1174,7 +1174,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) ...@@ -1174,7 +1174,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
while ((skbuff = skb_dequeue(&conn->psq)) while ((skbuff = skb_dequeue(&conn->psq))
!= NULL) { != NULL) {
spin_unlock_bh(&conn->psq_lock); spin_unlock_bh(&conn->psq_lock);
ath6kl_data_tx(skbuff, ar->net_dev); ath6kl_data_tx(skbuff, vif->ndev);
spin_lock_bh(&conn->psq_lock); spin_lock_bh(&conn->psq_lock);
} }
spin_unlock_bh(&conn->psq_lock); spin_unlock_bh(&conn->psq_lock);
...@@ -1230,7 +1230,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) ...@@ -1230,7 +1230,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
return; return;
} }
if (!(ar->net_dev->flags & IFF_UP)) { if (!(vif->ndev->flags & IFF_UP)) {
dev_kfree_skb(skb); dev_kfree_skb(skb);
return; return;
} }
...@@ -1261,7 +1261,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) ...@@ -1261,7 +1261,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
} }
} }
if (skb1) if (skb1)
ath6kl_data_tx(skb1, ar->net_dev); ath6kl_data_tx(skb1, vif->ndev);
if (skb == NULL) { if (skb == NULL) {
/* nothing to deliver up the stack */ /* nothing to deliver up the stack */
...@@ -1277,7 +1277,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) ...@@ -1277,7 +1277,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
/* aggregation code will handle the skb */ /* aggregation code will handle the skb */
return; return;
ath6kl_deliver_frames_to_nw_stack(ar->net_dev, skb); ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb);
} }
static void aggr_timeout(unsigned long arg) static void aggr_timeout(unsigned long arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment