aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/netdev.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/netdev.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c
index e81703ca7701..ace30c1b5c64 100644
--- a/drivers/net/wireless/ath/wil6210/netdev.c
+++ b/drivers/net/wireless/ath/wil6210/netdev.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc. 2 * Copyright (c) 2012-2015 Qualcomm Atheros, Inc.
3 * 3 *
4 * Permission to use, copy, modify, and/or distribute this software for any 4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above 5 * purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/etherdevice.h> 17#include <linux/etherdevice.h>
18
19#include "wil6210.h" 18#include "wil6210.h"
20#include "txrx.h" 19#include "txrx.h"
21 20
@@ -122,6 +121,12 @@ static int wil6210_netdev_poll_tx(struct napi_struct *napi, int budget)
122 return min(tx_done, budget); 121 return min(tx_done, budget);
123} 122}
124 123
124static void wil_dev_setup(struct net_device *dev)
125{
126 ether_setup(dev);
127 dev->tx_queue_len = WIL_TX_Q_LEN_DEFAULT;
128}
129
125void *wil_if_alloc(struct device *dev, void __iomem *csr) 130void *wil_if_alloc(struct device *dev, void __iomem *csr)
126{ 131{
127 struct net_device *ndev; 132 struct net_device *ndev;
@@ -153,7 +158,7 @@ void *wil_if_alloc(struct device *dev, void __iomem *csr)
153 ch = wdev->wiphy->bands[IEEE80211_BAND_60GHZ]->channels; 158 ch = wdev->wiphy->bands[IEEE80211_BAND_60GHZ]->channels;
154 cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT); 159 cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT);
155 160
156 ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, ether_setup); 161 ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup);
157 if (!ndev) { 162 if (!ndev) {
158 dev_err(dev, "alloc_netdev_mqs failed\n"); 163 dev_err(dev, "alloc_netdev_mqs failed\n");
159 rc = -ENOMEM; 164 rc = -ENOMEM;
@@ -174,7 +179,7 @@ void *wil_if_alloc(struct device *dev, void __iomem *csr)
174 netif_napi_add(ndev, &wil->napi_tx, wil6210_netdev_poll_tx, 179 netif_napi_add(ndev, &wil->napi_tx, wil6210_netdev_poll_tx,
175 WIL6210_NAPI_BUDGET); 180 WIL6210_NAPI_BUDGET);
176 181
177 wil_link_off(wil); 182 netif_tx_stop_all_queues(ndev);
178 183
179 return wil; 184 return wil;
180 185
@@ -217,8 +222,6 @@ int wil_if_add(struct wil6210_priv *wil)
217 return rc; 222 return rc;
218 } 223 }
219 224
220 wil_link_off(wil);
221
222 return 0; 225 return 0;
223} 226}
224 227