* [PATCH 1/2] p54: move p54_vdcf_init to the right place.
@ 2008-08-13 21:41 Christian Lamparter
0 siblings, 0 replies; only message in thread
From: Christian Lamparter @ 2008-08-13 21:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Larry Finger, John W Linville, navilein
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>
---
Larry, do you have any comments?
Because this series will eventually go to stable@kernel.org too...
---
diff -Nurp a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
--- a/drivers/net/wireless/p54/p54common.c 2008-08-13 20:50:03.000000000 +0200
+++ b/drivers/net/wireless/p54/p54common.c 2008-08-13 20:55:42.000000000 +0200
@@ -834,10 +834,21 @@ static int p54_start(struct ieee80211_hw
struct p54_common *priv = dev->priv;
int err;
+ if (!priv->cached_vdcf) {
+ priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf)+
+ priv->tx_hdr_len + sizeof(struct p54_control_hdr),
+ GFP_KERNEL);
+
+ if (!priv->cached_vdcf)
+ return -ENOMEM;
+ }
+
err = priv->open(dev);
if (!err)
priv->mode = IEEE80211_IF_TYPE_MNTR;
+ p54_init_vdcf(dev);
+
return err;
}
@@ -1017,15 +1028,6 @@ struct ieee80211_hw *p54_init_common(siz
dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 +
sizeof(struct p54_tx_control_allocdata);
- priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf) +
- priv->tx_hdr_len + sizeof(struct p54_control_hdr), GFP_KERNEL);
-
- if (!priv->cached_vdcf) {
- ieee80211_free_hw(dev);
- return NULL;
- }
-
- p54_init_vdcf(dev);
mutex_init(&priv->conf_mutex);
return dev;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-13 21:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-13 21:41 [PATCH 1/2] p54: move p54_vdcf_init to the right place Christian Lamparter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).