aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@web.de>2008-08-13 17:41:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-18 11:05:14 -0400
commit69bbc7dc9f59fedb6067c7f9f9f9bc1da27407ad (patch)
treea5d0d62c3f22509378ceb95c7f834c1d5aaf4964 /drivers/net
parent6f14792610905fe006c0c3c4d9e1478fb6be7cec (diff)
p54: move p54_vdcf_init to the right place.
priv->tx_hdr_len is set by the driver _after_ it called p54_init_common. While this isn't much a problem for any PCI or ISL3887 cards/sticks, because they don't need any extra header and therefore tx_hdr_len is zero for them... Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/p54/p54common.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 49afd20d2c30..29be3dc8ee09 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -837,10 +837,21 @@ static int p54_start(struct ieee80211_hw *dev)
837 struct p54_common *priv = dev->priv; 837 struct p54_common *priv = dev->priv;
838 int err; 838 int err;
839 839
840 if (!priv->cached_vdcf) {
841 priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf)+
842 priv->tx_hdr_len + sizeof(struct p54_control_hdr),
843 GFP_KERNEL);
844
845 if (!priv->cached_vdcf)
846 return -ENOMEM;
847 }
848
840 err = priv->open(dev); 849 err = priv->open(dev);
841 if (!err) 850 if (!err)
842 priv->mode = IEEE80211_IF_TYPE_MNTR; 851 priv->mode = IEEE80211_IF_TYPE_MNTR;
843 852
853 p54_init_vdcf(dev);
854
844 return err; 855 return err;
845} 856}
846 857
@@ -1020,15 +1031,6 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
1020 dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 + 1031 dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 +
1021 sizeof(struct p54_tx_control_allocdata); 1032 sizeof(struct p54_tx_control_allocdata);
1022 1033
1023 priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf) +
1024 priv->tx_hdr_len + sizeof(struct p54_control_hdr), GFP_KERNEL);
1025
1026 if (!priv->cached_vdcf) {
1027 ieee80211_free_hw(dev);
1028 return NULL;
1029 }
1030
1031 p54_init_vdcf(dev);
1032 mutex_init(&priv->conf_mutex); 1034 mutex_init(&priv->conf_mutex);
1033 1035
1034 return dev; 1036 return dev;