Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
This commit is contained in:
commit
8903bab009
4 changed files with 16 additions and 9 deletions
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue