Skip to content

Commit

Permalink
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/linville/wireless-2.6 into upstream-fixes
  • Loading branch information
Jeff Garzik committed May 30, 2007
2 parents 7f397dc + d7ea3be commit 8903bab
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
13 changes: 8 additions & 5 deletions drivers/net/wireless/hostap/hostap_80211_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
local_info_t *local;
struct ieee80211_hdr_4addr *hdr;
u16 fc;
int hdr_len, res;
int prefix_len, postfix_len, hdr_len, res;

iface = netdev_priv(skb->dev);
local = iface->local;
Expand All @@ -337,10 +337,13 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
if (skb == NULL)
return NULL;

if ((skb_headroom(skb) < crypt->ops->extra_mpdu_prefix_len ||
skb_tailroom(skb) < crypt->ops->extra_mpdu_postfix_len) &&
pskb_expand_head(skb, crypt->ops->extra_mpdu_prefix_len,
crypt->ops->extra_mpdu_postfix_len, GFP_ATOMIC)) {
prefix_len = crypt->ops->extra_mpdu_prefix_len +
crypt->ops->extra_msdu_prefix_len;
postfix_len = crypt->ops->extra_mpdu_postfix_len +
crypt->ops->extra_msdu_postfix_len;
if ((skb_headroom(skb) < prefix_len ||
skb_tailroom(skb) < postfix_len) &&
pskb_expand_head(skb, prefix_len, postfix_len, GFP_ATOMIC)) {
kfree_skb(skb);
return NULL;
}
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/prism54/islpci_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,10 @@ islpci_eth_receive(islpci_private *priv)
display_buffer((char *) skb->data, skb->len);
#endif
/* take care of monitor mode and spy monitoring. */
if (unlikely(priv->iw_mode == IW_MODE_MONITOR))
if (unlikely(priv->iw_mode == IW_MODE_MONITOR)) {
skb->dev = ndev;
discard = islpci_monitor_rx(priv, &skb);
else {
} else {
if (unlikely(skb->data[2 * ETH_ALEN] == 0)) {
/* The packet has a rx_annex. Read it for spy monitoring, Then
* remove it, while keeping the 2 leading MAC addr.
Expand Down
2 changes: 1 addition & 1 deletion net/ieee80211/ieee80211_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ struct net_device *alloc_ieee80211(int sizeof_priv)

dev = alloc_etherdev(sizeof(struct ieee80211_device) + sizeof_priv);
if (!dev) {
IEEE80211_ERROR("Unable to network device.\n");
IEEE80211_ERROR("Unable to allocate network device.\n");
goto failed;
}
ieee = netdev_priv(dev);
Expand Down
5 changes: 4 additions & 1 deletion net/ieee80211/softmac/ieee80211softmac_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ struct net_device *alloc_ieee80211softmac(int sizeof_priv)
struct ieee80211softmac_device *softmac;
struct net_device *dev;

dev = alloc_ieee80211(sizeof(struct ieee80211softmac_device) + sizeof_priv);
dev = alloc_ieee80211(sizeof(*softmac) + sizeof_priv);
if (!dev)
return NULL;

softmac = ieee80211_priv(dev);
softmac->dev = dev;
softmac->ieee = netdev_priv(dev);
Expand Down

0 comments on commit 8903bab

Please sign in to comment.