Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [NETNS][IPV6] tcp - assign the netns for timewait sockets
  [IPV4]: Fix byte value boundary check in do_ip_getsockopt().
  BNX2X: Correct bringing chip out of reset
  [NETFILTER]: nf_nat: autoload IPv4 connection tracking
  [NETFILTER]: xt_hashlimit: fix mask calculation
  [XFRM]: xfrm_user: fix selector family initialization
  rt61pci: rt61pci_beacon_update do not free skb twice
  ssb-mipscore: Fix interrupt vectors
  ssb-pcicore: Fix IRQ TPS flag handling
  mac80211: use short_preamble mode from capability if ERP IE not present
  [NET]: Undo code bloat in hot paths due to print_mac().
  [TCP]: Don't allow FRTO to take place while MTU is being probed
  [TCP]: tcp_simple_retransmit can cause S+L
  [TCP]: Fix NewReno's fast rexmit/recovery problems with GSOed skb
  [TCP]: Restore 2.6.24 mark_head_lost behavior for newreno/fack
  nl80211: fix STA AID bug
  b43legacy: fix bcm4303 crash
  iwlwifi: fix n-band association problem
  ipw2200: set MAC address on radiotap interface
  libertas: fix mode initialization problem
This commit is contained in:
Linus Torvalds 2008-04-11 08:10:24 -07:00
commit 90768c09bc
26 changed files with 344 additions and 195 deletions

View file

@ -63,8 +63,8 @@
#include "bnx2x.h" #include "bnx2x.h"
#include "bnx2x_init.h" #include "bnx2x_init.h"
#define DRV_MODULE_VERSION "1.42.3" #define DRV_MODULE_VERSION "1.42.4"
#define DRV_MODULE_RELDATE "2008/3/9" #define DRV_MODULE_RELDATE "2008/4/9"
#define BNX2X_BC_VER 0x040200 #define BNX2X_BC_VER 0x040200
/* Time in jiffies before concluding the transmitter is hung. */ /* Time in jiffies before concluding the transmitter is hung. */
@ -6153,7 +6153,7 @@ static int bnx2x_function_init(struct bnx2x *bp, int mode)
func, mode); func, mode);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET,
0xffffffff); 0xffffffff);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET,
0xfffc); 0xfffc);
bnx2x_init_block(bp, MISC_COMMON_START, MISC_COMMON_END); bnx2x_init_block(bp, MISC_COMMON_START, MISC_COMMON_END);

View file

@ -1472,13 +1472,12 @@ static int __netdev_rx(struct net_device *dev, int *quota)
#ifndef final_version /* Remove after testing. */ #ifndef final_version /* Remove after testing. */
/* You will want this info for the initial debug. */ /* You will want this info for the initial debug. */
if (debug > 5) { if (debug > 5) {
DECLARE_MAC_BUF(mac); printk(KERN_DEBUG " Rx data " MAC_FMT " " MAC_FMT
DECLARE_MAC_BUF(mac2);
printk(KERN_DEBUG " Rx data %s %s"
" %2.2x%2.2x.\n", " %2.2x%2.2x.\n",
print_mac(mac, &skb->data[0]), skb->data[0], skb->data[1], skb->data[2],
print_mac(mac2, &skb->data[6]), skb->data[3], skb->data[4], skb->data[5],
skb->data[6], skb->data[7], skb->data[8],
skb->data[9], skb->data[10], skb->data[11],
skb->data[12], skb->data[13]); skb->data[12], skb->data[13]);
} }
#endif #endif

View file

@ -1438,13 +1438,18 @@ static void olympic_arb_cmd(struct net_device *dev)
if (olympic_priv->olympic_network_monitor) { if (olympic_priv->olympic_network_monitor) {
struct trh_hdr *mac_hdr; struct trh_hdr *mac_hdr;
DECLARE_MAC_BUF(mac);
printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name); printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name);
mac_hdr = tr_hdr(mac_frame); mac_hdr = tr_hdr(mac_frame);
printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %s\n", printk(KERN_WARNING "%s: MAC Frame Dest. Addr: "
dev->name, print_mac(mac, mac_hdr->daddr)); MAC_FMT " \n", dev->name,
printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %s\n", mac_hdr->daddr[0], mac_hdr->daddr[1],
dev->name, print_mac(mac, mac_hdr->saddr)); mac_hdr->daddr[2], mac_hdr->daddr[3],
mac_hdr->daddr[4], mac_hdr->daddr[5]);
printk(KERN_WARNING "%s: MAC Frame Srce. Addr: "
MAC_FMT " \n", dev->name,
mac_hdr->saddr[0], mac_hdr->saddr[1],
mac_hdr->saddr[2], mac_hdr->saddr[3],
mac_hdr->saddr[4], mac_hdr->saddr[5]);
} }
netif_rx(mac_frame); netif_rx(mac_frame);
dev->last_rx = jiffies; dev->last_rx = jiffies;

View file

@ -234,11 +234,12 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
struct scatterlist sg[1+MAX_SKB_FRAGS]; struct scatterlist sg[1+MAX_SKB_FRAGS];
struct virtio_net_hdr *hdr; struct virtio_net_hdr *hdr;
const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest;
DECLARE_MAC_BUF(mac);
sg_init_table(sg, 1+MAX_SKB_FRAGS); sg_init_table(sg, 1+MAX_SKB_FRAGS);
pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest)); pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb,
dest[0], dest[1], dest[2],
dest[3], dest[4], dest[5]);
/* Encode metadata header at front. */ /* Encode metadata header at front. */
hdr = skb_vnet_hdr(skb); hdr = skb_vnet_hdr(skb);

View file

@ -635,7 +635,6 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
{ {
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
int res, hdrlen; int res, hdrlen;
DECLARE_MAC_BUF(mac);
if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
return 0; return 0;
@ -647,8 +646,10 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
strcmp(crypt->ops->name, "TKIP") == 0) { strcmp(crypt->ops->name, "TKIP") == 0) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
"received packet from %s\n", "received packet from " MAC_FMT "\n",
local->dev->name, print_mac(mac, hdr->addr2)); local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
} }
return -1; return -1;
} }
@ -657,9 +658,12 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
atomic_dec(&crypt->refcnt); atomic_dec(&crypt->refcnt);
if (res < 0) { if (res < 0) {
printk(KERN_DEBUG "%s: decryption failed (SA=%s" printk(KERN_DEBUG "%s: decryption failed (SA=" MAC_FMT
") res=%d\n", ") res=%d\n",
local->dev->name, print_mac(mac, hdr->addr2), res); local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
res);
local->comm_tallies.rx_discards_wep_undecryptable++; local->comm_tallies.rx_discards_wep_undecryptable++;
return -1; return -1;
} }
@ -721,7 +725,6 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
struct ieee80211_crypt_data *crypt = NULL; struct ieee80211_crypt_data *crypt = NULL;
void *sta = NULL; void *sta = NULL;
int keyidx = 0; int keyidx = 0;
DECLARE_MAC_BUF(mac);
iface = netdev_priv(dev); iface = netdev_priv(dev);
local = iface->local; local = iface->local;
@ -798,8 +801,10 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
* frames silently instead of filling system log with * frames silently instead of filling system log with
* these reports. */ * these reports. */
printk(KERN_DEBUG "%s: WEP decryption failed (not set)" printk(KERN_DEBUG "%s: WEP decryption failed (not set)"
" (SA=%s)\n", " (SA=" MAC_FMT ")\n",
local->dev->name, print_mac(mac, hdr->addr2)); local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
#endif #endif
local->comm_tallies.rx_discards_wep_undecryptable++; local->comm_tallies.rx_discards_wep_undecryptable++;
goto rx_dropped; goto rx_dropped;
@ -813,8 +818,9 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
(keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
{ {
printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
"from %s\n", dev->name, "from " MAC_FMT "\n", dev->name,
print_mac(mac, hdr->addr2)); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
/* TODO: could inform hostapd about this so that it /* TODO: could inform hostapd about this so that it
* could send auth failure report */ * could send auth failure report */
goto rx_dropped; goto rx_dropped;
@ -982,8 +988,10 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
"unencrypted EAPOL frame\n", local->dev->name); "unencrypted EAPOL frame\n", local->dev->name);
} else { } else {
printk(KERN_DEBUG "%s: encryption configured, but RX " printk(KERN_DEBUG "%s: encryption configured, but RX "
"frame not encrypted (SA=%s)\n", "frame not encrypted (SA=" MAC_FMT ")\n",
local->dev->name, print_mac(mac, hdr->addr2)); local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
goto rx_dropped; goto rx_dropped;
} }
} }
@ -992,9 +1000,10 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
!hostap_is_eapol_frame(local, skb)) { !hostap_is_eapol_frame(local, skb)) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "%s: dropped unencrypted RX data " printk(KERN_DEBUG "%s: dropped unencrypted RX data "
"frame from %s" "frame from " MAC_FMT " (drop_unencrypted=1)\n",
" (drop_unencrypted=1)\n", dev->name,
dev->name, print_mac(mac, hdr->addr2)); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
} }
goto rx_dropped; goto rx_dropped;
} }

View file

@ -314,7 +314,6 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
u16 fc; u16 fc;
int prefix_len, postfix_len, hdr_len, res; int prefix_len, postfix_len, hdr_len, res;
DECLARE_MAC_BUF(mac);
iface = netdev_priv(skb->dev); iface = netdev_priv(skb->dev);
local = iface->local; local = iface->local;
@ -329,8 +328,10 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
hdr = (struct ieee80211_hdr_4addr *) skb->data; hdr = (struct ieee80211_hdr_4addr *) skb->data;
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
"TX packet to %s\n", "TX packet to " MAC_FMT "\n",
local->dev->name, print_mac(mac, hdr->addr1)); local->dev->name,
hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
} }
kfree_skb(skb); kfree_skb(skb);
return NULL; return NULL;

View file

@ -632,7 +632,6 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data)
__le16 *pos; __le16 *pos;
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
char *txt = NULL; char *txt = NULL;
DECLARE_MAC_BUF(mac);
if (ap->local->hostapd) { if (ap->local->hostapd) {
dev_kfree_skb(skb); dev_kfree_skb(skb);
@ -684,10 +683,12 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data)
if (sta) if (sta)
atomic_dec(&sta->users); atomic_dec(&sta->users);
if (txt) { if (txt) {
PDEBUG(DEBUG_AP, "%s: %s auth_cb - alg=%d " PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth_cb - alg=%d "
"trans#=%d status=%d - %s\n", "trans#=%d status=%d - %s\n",
dev->name, print_mac(mac, hdr->addr1), auth_alg, dev->name,
auth_transaction, status, txt); hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
auth_alg, auth_transaction, status, txt);
} }
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
@ -703,7 +704,6 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data)
__le16 *pos; __le16 *pos;
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
char *txt = NULL; char *txt = NULL;
DECLARE_MAC_BUF(mac);
if (ap->local->hostapd) { if (ap->local->hostapd) {
dev_kfree_skb(skb); dev_kfree_skb(skb);
@ -754,8 +754,11 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data)
if (sta) if (sta)
atomic_dec(&sta->users); atomic_dec(&sta->users);
if (txt) { if (txt) {
PDEBUG(DEBUG_AP, "%s: %s assoc_cb - %s\n", PDEBUG(DEBUG_AP, "%s: " MAC_FMT " assoc_cb - %s\n",
dev->name, print_mac(mac, hdr->addr1), txt); dev->name,
hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
txt);
} }
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
@ -767,7 +770,6 @@ static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data)
struct ap_data *ap = data; struct ap_data *ap = data;
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
struct sta_info *sta; struct sta_info *sta;
DECLARE_MAC_BUF(mac);
if (skb->len < 24) if (skb->len < 24)
goto fail; goto fail;
@ -779,9 +781,11 @@ static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data)
sta->flags &= ~WLAN_STA_PENDING_POLL; sta->flags &= ~WLAN_STA_PENDING_POLL;
spin_unlock(&ap->sta_table_lock); spin_unlock(&ap->sta_table_lock);
} else { } else {
PDEBUG(DEBUG_AP, "%s: STA %s" PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT
" did not ACK activity poll frame\n", " did not ACK activity poll frame\n",
ap->local->dev->name, print_mac(mac, hdr->addr1)); ap->local->dev->name,
hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
} }
fail: fail:
@ -1306,7 +1310,6 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
struct ieee80211_crypt_data *crypt; struct ieee80211_crypt_data *crypt;
char *txt = ""; char *txt = "";
DECLARE_MAC_BUF(mac);
len = skb->len - IEEE80211_MGMT_HDR_LEN; len = skb->len - IEEE80211_MGMT_HDR_LEN;
@ -1315,8 +1318,9 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
if (len < 6) { if (len < 6) {
PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload " PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload "
"(len=%d) from %s\n", dev->name, len, "(len=%d) from " MAC_FMT "\n", dev->name, len,
print_mac(mac, hdr->addr2)); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
return; return;
} }
@ -1381,8 +1385,10 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
if (time_after(jiffies, sta->u.ap.last_beacon + if (time_after(jiffies, sta->u.ap.last_beacon +
(10 * sta->listen_interval * HZ) / 1024)) { (10 * sta->listen_interval * HZ) / 1024)) {
PDEBUG(DEBUG_AP, "%s: no beacons received for a while," PDEBUG(DEBUG_AP, "%s: no beacons received for a while,"
" assuming AP %s is now STA\n", " assuming AP " MAC_FMT " is now STA\n",
dev->name, print_mac(mac, sta->addr)); dev->name,
sta->addr[0], sta->addr[1], sta->addr[2],
sta->addr[3], sta->addr[4], sta->addr[5]);
sta->ap = 0; sta->ap = 0;
sta->flags = 0; sta->flags = 0;
sta->u.sta.challenge = NULL; sta->u.sta.challenge = NULL;
@ -1497,10 +1503,13 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
} }
if (resp) { if (resp) {
PDEBUG(DEBUG_AP, "%s: %s auth (alg=%d " PDEBUG(DEBUG_AP, "%s: " MAC_FMT " auth (alg=%d "
"trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n", "trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n",
dev->name, print_mac(mac, hdr->addr2), auth_alg, dev->name,
auth_transaction, status_code, len, fc, resp, txt); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
auth_alg, auth_transaction, status_code, len,
fc, resp, txt);
} }
} }
@ -1519,14 +1528,15 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
int send_deauth = 0; int send_deauth = 0;
char *txt = ""; char *txt = "";
u8 prev_ap[ETH_ALEN]; u8 prev_ap[ETH_ALEN];
DECLARE_MAC_BUF(mac);
left = len = skb->len - IEEE80211_MGMT_HDR_LEN; left = len = skb->len - IEEE80211_MGMT_HDR_LEN;
if (len < (reassoc ? 10 : 4)) { if (len < (reassoc ? 10 : 4)) {
PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload " PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload "
"(len=%d, reassoc=%d) from %s\n", "(len=%d, reassoc=%d) from " MAC_FMT "\n",
dev->name, len, reassoc, print_mac(mac, hdr->addr2)); dev->name, len, reassoc,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
return; return;
} }
@ -1603,9 +1613,12 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
} }
if (left > 0) { if (left > 0) {
PDEBUG(DEBUG_AP, "%s: assoc from %s" PDEBUG(DEBUG_AP, "%s: assoc from " MAC_FMT
" with extra data (%d bytes) [", " with extra data (%d bytes) [",
dev->name, print_mac(mac, hdr->addr2), left); dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
left);
while (left > 0) { while (left > 0) {
PDEBUG2(DEBUG_AP, "<%02x>", *u); PDEBUG2(DEBUG_AP, "<%02x>", *u);
u++; left--; u++; left--;
@ -1704,10 +1717,15 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
} }
#if 0 #if 0
PDEBUG(DEBUG_AP, "%s: %s %sassoc (len=%d " PDEBUG(DEBUG_AP, "%s: " MAC_FMT" %sassoc (len=%d "
"prev_ap=%s) => %d(%d) (%s)\n", "prev_ap=" MAC_FMT") => %d(%d) (%s)\n",
dev->name, print_mac(mac, hdr->addr2), reassoc ? "re" : "", len, dev->name,
print_mac(mac, prev_ap), resp, send_deauth, txt); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
reassoc ? "re" : "", len,
prev_ap[0], prev_ap[1], prev_ap[2],
prev_ap[3], prev_ap[4], prev_ap[5],
resp, send_deauth, txt);
#endif #endif
} }
@ -1735,9 +1753,11 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
pos = (__le16 *) body; pos = (__le16 *) body;
reason_code = le16_to_cpu(*pos); reason_code = le16_to_cpu(*pos);
PDEBUG(DEBUG_AP, "%s: deauthentication: %s len=%d, " PDEBUG(DEBUG_AP, "%s: deauthentication: " MAC_FMT " len=%d, "
"reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len, "reason_code=%d\n", dev->name,
reason_code); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
len, reason_code);
spin_lock_bh(&local->ap->sta_table_lock); spin_lock_bh(&local->ap->sta_table_lock);
sta = ap_get_sta(local->ap, hdr->addr2); sta = ap_get_sta(local->ap, hdr->addr2);
@ -1748,9 +1768,11 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
} }
spin_unlock_bh(&local->ap->sta_table_lock); spin_unlock_bh(&local->ap->sta_table_lock);
if (sta == NULL) { if (sta == NULL) {
printk("%s: deauthentication from %s, " printk("%s: deauthentication from " MAC_FMT ", "
"reason_code=%d, but STA not authenticated\n", dev->name, "reason_code=%d, but STA not authenticated\n", dev->name,
print_mac(mac, hdr->addr2), reason_code); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
reason_code);
} }
} }
@ -1766,7 +1788,6 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
u16 reason_code; u16 reason_code;
__le16 *pos; __le16 *pos;
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
DECLARE_MAC_BUF(mac);
len = skb->len - IEEE80211_MGMT_HDR_LEN; len = skb->len - IEEE80211_MGMT_HDR_LEN;
@ -1778,9 +1799,11 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
pos = (__le16 *) body; pos = (__le16 *) body;
reason_code = le16_to_cpu(*pos); reason_code = le16_to_cpu(*pos);
PDEBUG(DEBUG_AP, "%s: disassociation: %s len=%d, " PDEBUG(DEBUG_AP, "%s: disassociation: " MAC_FMT " len=%d, "
"reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len, "reason_code=%d\n", dev->name,
reason_code); hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
len, reason_code);
spin_lock_bh(&local->ap->sta_table_lock); spin_lock_bh(&local->ap->sta_table_lock);
sta = ap_get_sta(local->ap, hdr->addr2); sta = ap_get_sta(local->ap, hdr->addr2);
@ -1791,9 +1814,12 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
} }
spin_unlock_bh(&local->ap->sta_table_lock); spin_unlock_bh(&local->ap->sta_table_lock);
if (sta == NULL) { if (sta == NULL) {
printk("%s: disassociation from %s, " printk("%s: disassociation from " MAC_FMT ", "
"reason_code=%d, but STA not authenticated\n", "reason_code=%d, but STA not authenticated\n",
dev->name, print_mac(mac, hdr->addr2), reason_code); dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
reason_code);
} }
} }
@ -1882,16 +1908,20 @@ static void handle_pspoll(local_info_t *local,
struct sta_info *sta; struct sta_info *sta;
u16 aid; u16 aid;
struct sk_buff *skb; struct sk_buff *skb;
DECLARE_MAC_BUF(mac);
PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=%s" PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=" MAC_FMT
", TA=%s PWRMGT=%d\n", ", TA=" MAC_FMT " PWRMGT=%d\n",
print_mac(mac, hdr->addr1), print_mac(mac, hdr->addr2), hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
!!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM)); !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM));
if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=%s" PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=" MAC_FMT
" not own MAC\n", print_mac(mac, hdr->addr1)); " not own MAC\n",
hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
return; return;
} }
@ -1969,7 +1999,6 @@ static void handle_wds_oper_queue(struct work_struct *work)
wds_oper_queue); wds_oper_queue);
local_info_t *local = ap->local; local_info_t *local = ap->local;
struct wds_oper_data *entry, *prev; struct wds_oper_data *entry, *prev;
DECLARE_MAC_BUF(mac);
spin_lock_bh(&local->lock); spin_lock_bh(&local->lock);
entry = local->ap->wds_oper_entries; entry = local->ap->wds_oper_entries;
@ -1978,10 +2007,11 @@ static void handle_wds_oper_queue(struct work_struct *work)
while (entry) { while (entry) {
PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection " PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection "
"to AP %s\n", "to AP " MAC_FMT "\n",
local->dev->name, local->dev->name,
entry->type == WDS_ADD ? "adding" : "removing", entry->type == WDS_ADD ? "adding" : "removing",
print_mac(mac, entry->addr)); entry->addr[0], entry->addr[1], entry->addr[2],
entry->addr[3], entry->addr[4], entry->addr[5]);
if (entry->type == WDS_ADD) if (entry->type == WDS_ADD)
prism2_wds_add(local, entry->addr, 0); prism2_wds_add(local, entry->addr, 0);
else if (entry->type == WDS_DEL) else if (entry->type == WDS_DEL)
@ -2158,7 +2188,6 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
u16 fc, type, stype; u16 fc, type, stype;
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
DECLARE_MAC_BUF(mac);
/* FIX: should give skb->len to handler functions and check that the /* FIX: should give skb->len to handler functions and check that the
* buffer is long enough */ * buffer is long enough */
@ -2187,8 +2216,9 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=" PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)="
"%s not own MAC\n", MAC_FMT " not own MAC\n",
print_mac(mac, hdr->addr1)); hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
goto done; goto done;
} }
@ -2224,14 +2254,18 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
} }
if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=%s" PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=" MAC_FMT
" not own MAC\n", print_mac(mac, hdr->addr1)); " not own MAC\n",
hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
goto done; goto done;
} }
if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) { if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) {
PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=%s" PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=" MAC_FMT
" not own MAC\n", print_mac(mac, hdr->addr3)); " not own MAC\n",
hdr->addr3[0], hdr->addr3[1], hdr->addr3[2],
hdr->addr3[3], hdr->addr3[4], hdr->addr3[5]);
goto done; goto done;
} }
@ -2312,7 +2346,6 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
struct sk_buff *skb; struct sk_buff *skb;
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
struct hostap_80211_rx_status rx_stats; struct hostap_80211_rx_status rx_stats;
DECLARE_MAC_BUF(mac);
if (skb_queue_empty(&sta->tx_buf)) if (skb_queue_empty(&sta->tx_buf))
return; return;
@ -2334,7 +2367,9 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14)); hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14));
PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for STA " PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for STA "
"%s\n", local->dev->name, print_mac(mac, sta->addr)); MAC_FMT "\n", local->dev->name,
sta->addr[0], sta->addr[1], sta->addr[2],
sta->addr[3], sta->addr[4], sta->addr[5]);
skb->dev = local->dev; skb->dev = local->dev;
@ -2661,7 +2696,6 @@ static int ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev)
int ret = sta->tx_rate; int ret = sta->tx_rate;
struct hostap_interface *iface; struct hostap_interface *iface;
local_info_t *local; local_info_t *local;
DECLARE_MAC_BUF(mac);
iface = netdev_priv(dev); iface = netdev_priv(dev);
local = iface->local; local = iface->local;
@ -2689,9 +2723,12 @@ static int ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev)
case 3: sta->tx_rate = 110; break; case 3: sta->tx_rate = 110; break;
default: sta->tx_rate = 0; break; default: sta->tx_rate = 0; break;
} }
PDEBUG(DEBUG_AP, "%s: STA %s" PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT
" TX rate raised to %d\n", " TX rate raised to %d\n",
dev->name, print_mac(mac, sta->addr), sta->tx_rate); dev->name,
sta->addr[0], sta->addr[1], sta->addr[2],
sta->addr[3], sta->addr[4], sta->addr[5],
sta->tx_rate);
} }
sta->tx_since_last_failure = 0; sta->tx_since_last_failure = 0;
} }
@ -2709,7 +2746,6 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
int set_tim, ret; int set_tim, ret;
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
struct hostap_skb_tx_data *meta; struct hostap_skb_tx_data *meta;
DECLARE_MAC_BUF(mac);
meta = (struct hostap_skb_tx_data *) skb->cb; meta = (struct hostap_skb_tx_data *) skb->cb;
ret = AP_TX_CONTINUE; ret = AP_TX_CONTINUE;
@ -2745,8 +2781,9 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
* print out any errors here. */ * print out any errors here. */
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "AP: drop packet to non-associated " printk(KERN_DEBUG "AP: drop packet to non-associated "
"STA %s\n", "STA " MAC_FMT "\n",
print_mac(mac, hdr->addr1)); hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5]);
} }
#endif #endif
local->ap->tx_drop_nonassoc++; local->ap->tx_drop_nonassoc++;
@ -2784,9 +2821,11 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
} }
if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) { if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) {
PDEBUG(DEBUG_PS, "%s: No more space in STA (%s" PDEBUG(DEBUG_PS, "%s: No more space in STA (" MAC_FMT
")'s PS mode buffer\n", ")'s PS mode buffer\n",
local->dev->name, print_mac(mac, sta->addr)); local->dev->name,
sta->addr[0], sta->addr[1], sta->addr[2],
sta->addr[3], sta->addr[4], sta->addr[5]);
/* Make sure that TIM is set for the station (it might not be /* Make sure that TIM is set for the station (it might not be
* after AP wlan hw reset). */ * after AP wlan hw reset). */
/* FIX: should fix hw reset to restore bits based on STA /* FIX: should fix hw reset to restore bits based on STA
@ -2850,7 +2889,6 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
struct sta_info *sta; struct sta_info *sta;
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
struct hostap_skb_tx_data *meta; struct hostap_skb_tx_data *meta;
DECLARE_MAC_BUF(mac);
hdr = (struct ieee80211_hdr_4addr *) skb->data; hdr = (struct ieee80211_hdr_4addr *) skb->data;
meta = (struct hostap_skb_tx_data *) skb->cb; meta = (struct hostap_skb_tx_data *) skb->cb;
@ -2859,9 +2897,12 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
sta = ap_get_sta(local->ap, hdr->addr1); sta = ap_get_sta(local->ap, hdr->addr1);
if (!sta) { if (!sta) {
spin_unlock(&local->ap->sta_table_lock); spin_unlock(&local->ap->sta_table_lock);
PDEBUG(DEBUG_AP, "%s: Could not find STA %s" PDEBUG(DEBUG_AP, "%s: Could not find STA " MAC_FMT
" for this TX error (@%lu)\n", " for this TX error (@%lu)\n",
local->dev->name, print_mac(mac, hdr->addr1), jiffies); local->dev->name,
hdr->addr1[0], hdr->addr1[1], hdr->addr1[2],
hdr->addr1[3], hdr->addr1[4], hdr->addr1[5],
jiffies);
return; return;
} }
@ -2888,9 +2929,11 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
case 3: sta->tx_rate = 110; break; case 3: sta->tx_rate = 110; break;
default: sta->tx_rate = 0; break; default: sta->tx_rate = 0; break;
} }
PDEBUG(DEBUG_AP, "%s: STA %s" PDEBUG(DEBUG_AP, "%s: STA " MAC_FMT
" TX rate lowered to %d\n", " TX rate lowered to %d\n",
local->dev->name, print_mac(mac, sta->addr), local->dev->name,
sta->addr[0], sta->addr[1], sta->addr[2],
sta->addr[3], sta->addr[4], sta->addr[5],
sta->tx_rate); sta->tx_rate);
} }
sta->tx_consecutive_exc = 0; sta->tx_consecutive_exc = 0;
@ -2956,7 +2999,6 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
struct sta_info *sta; struct sta_info *sta;
u16 fc, type, stype; u16 fc, type, stype;
struct ieee80211_hdr_4addr *hdr; struct ieee80211_hdr_4addr *hdr;
DECLARE_MAC_BUF(mac);
if (local->ap == NULL) if (local->ap == NULL)
return AP_RX_CONTINUE; return AP_RX_CONTINUE;
@ -2988,9 +3030,12 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
} else { } else {
printk(KERN_DEBUG "%s: dropped received packet" printk(KERN_DEBUG "%s: dropped received packet"
" from non-associated STA " " from non-associated STA "
"%s" MAC_FMT
" (type=0x%02x, subtype=0x%02x)\n", " (type=0x%02x, subtype=0x%02x)\n",
dev->name, print_mac(mac, hdr->addr2), dev->name,
hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5],
type >> 2, stype >> 4); type >> 2, stype >> 4);
hostap_rx(dev, skb, rx_stats); hostap_rx(dev, skb, rx_stats);
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
@ -3025,8 +3070,11 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
* being associated. */ * being associated. */
printk(KERN_DEBUG "%s: rejected received nullfunc " printk(KERN_DEBUG "%s: rejected received nullfunc "
"frame without ToDS from not associated STA " "frame without ToDS from not associated STA "
"%s\n", MAC_FMT "\n",
dev->name, print_mac(mac, hdr->addr2)); dev->name,
hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5]);
hostap_rx(dev, skb, rx_stats); hostap_rx(dev, skb, rx_stats);
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
} }
@ -3043,9 +3091,12 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
* If BSSID is own, report the dropping of this frame. */ * If BSSID is own, report the dropping of this frame. */
if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) {
printk(KERN_DEBUG "%s: dropped received packet from " printk(KERN_DEBUG "%s: dropped received packet from "
"%s with no ToDS flag " MAC_FMT " with no ToDS flag "
"(type=0x%02x, subtype=0x%02x)\n", dev->name, "(type=0x%02x, subtype=0x%02x)\n", dev->name,
print_mac(mac, hdr->addr2), type >> 2, stype >> 4); hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5],
type >> 2, stype >> 4);
hostap_dump_rx_80211(dev->name, skb, rx_stats); hostap_dump_rx_80211(dev->name, skb, rx_stats);
} }
ret = AP_RX_DROP; ret = AP_RX_DROP;

View file

@ -10192,7 +10192,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
u8 id, hdr_len, unicast; u8 id, hdr_len, unicast;
u16 remaining_bytes; u16 remaining_bytes;
int fc; int fc;
DECLARE_MAC_BUF(mac);
hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
switch (priv->ieee->iw_mode) { switch (priv->ieee->iw_mode) {
@ -10203,8 +10202,10 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
id = ipw_add_station(priv, hdr->addr1); id = ipw_add_station(priv, hdr->addr1);
if (id == IPW_INVALID_STATION) { if (id == IPW_INVALID_STATION) {
IPW_WARNING("Attempt to send data to " IPW_WARNING("Attempt to send data to "
"invalid cell: %s\n", "invalid cell: " MAC_FMT "\n",
print_mac(mac, hdr->addr1)); hdr->addr1[0], hdr->addr1[1],
hdr->addr1[2], hdr->addr1[3],
hdr->addr1[4], hdr->addr1[5]);
goto drop; goto drop;
} }
} }
@ -11576,6 +11577,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv)
priv->prom_priv->priv = priv; priv->prom_priv->priv = priv;
strcpy(priv->prom_net_dev->name, "rtap%d"); strcpy(priv->prom_net_dev->name, "rtap%d");
memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
priv->prom_net_dev->open = ipw_prom_open; priv->prom_net_dev->open = ipw_prom_open;

View file

@ -35,7 +35,6 @@ config IWL4965_HT
bool "Enable 802.11n HT features in iwl4965 driver" bool "Enable 802.11n HT features in iwl4965 driver"
depends on EXPERIMENTAL depends on EXPERIMENTAL
depends on IWL4965 && IWL4965_QOS depends on IWL4965 && IWL4965_QOS
depends on n
---help--- ---help---
This option enables IEEE 802.11n High Throughput features This option enables IEEE 802.11n High Throughput features
for the iwl4965 driver. for the iwl4965 driver.

View file

@ -541,7 +541,7 @@ void lbs_association_worker(struct work_struct *work)
} }
if (find_any_ssid) { if (find_any_ssid) {
u8 new_mode; u8 new_mode = assoc_req->mode;
ret = lbs_find_best_network_ssid(priv, assoc_req->ssid, ret = lbs_find_best_network_ssid(priv, assoc_req->ssid,
&assoc_req->ssid_len, assoc_req->mode, &new_mode); &assoc_req->ssid_len, assoc_req->mode, &new_mode);

View file

@ -2399,10 +2399,8 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
* beacon frame. * beacon frame.
*/ */
if (skb_headroom(skb) < TXD_DESC_SIZE) { if (skb_headroom(skb) < TXD_DESC_SIZE) {
if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC)) { if (pskb_expand_head(skb, TXD_DESC_SIZE, 0, GFP_ATOMIC))
dev_kfree_skb(skb);
return -ENOMEM; return -ENOMEM;
}
} }
/* /*

View file

@ -109,12 +109,13 @@ static void set_irq(struct ssb_device *dev, unsigned int irq)
clear_irq(bus, oldirq); clear_irq(bus, oldirq);
/* assign the new one */ /* assign the new one */
if (irq == 0) if (irq == 0) {
ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) & ssb_read32(mdev, SSB_INTVEC))); ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) | ssb_read32(mdev, SSB_INTVEC)));
} else {
irqflag <<= ipsflag_irq_shift[irq]; irqflag <<= ipsflag_irq_shift[irq];
irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]); irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]);
ssb_write32(mdev, SSB_IPSFLAG, irqflag); ssb_write32(mdev, SSB_IPSFLAG, irqflag);
}
} }
static void ssb_mips_serial_init(struct ssb_mipscore *mcore) static void ssb_mips_serial_init(struct ssb_mipscore *mcore)

View file

@ -551,7 +551,7 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
} else { } else {
tmp = ssb_read32(dev, SSB_TPSFLAG); tmp = ssb_read32(dev, SSB_TPSFLAG);
tmp &= SSB_TPSFLAG_BPFLAG; tmp &= SSB_TPSFLAG_BPFLAG;
intvec |= tmp; intvec |= (1 << tmp);
} }
ssb_write32(pdev, SSB_INTVEC, intvec); ssb_write32(pdev, SSB_INTVEC, intvec);
} }

View file

@ -1044,6 +1044,12 @@ int ssb_bus_may_powerdown(struct ssb_bus *bus)
goto out; goto out;
cc = &bus->chipco; cc = &bus->chipco;
if (!cc->dev)
goto out;
if (cc->dev->id.revision < 5)
goto out;
ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW); ssb_chipco_set_clockmode(cc, SSB_CLKMODE_SLOW);
err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0); err = ssb_pci_xtal(bus, SSB_GPIO_XTAL | SSB_GPIO_PLL, 0);
if (err) if (err)

View file

@ -752,6 +752,8 @@ static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp)
return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; return tp->packets_out - tcp_left_out(tp) + tp->retrans_out;
} }
extern int tcp_limit_reno_sacked(struct tcp_sock *tp);
/* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. /* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd.
* The exception is rate halving phase, when cwnd is decreasing towards * The exception is rate halving phase, when cwnd is decreasing towards
* ssthresh. * ssthresh.

View file

@ -266,7 +266,6 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev)
char buf[300]; char buf[300];
int i = 0; int i = 0;
#endif /* DUMP_PACKETS >0 */ #endif /* DUMP_PACKETS >0 */
DECLARE_MAC_BUF(mac);
pr_debug("lec_start_xmit called\n"); pr_debug("lec_start_xmit called\n");
if (!priv->lecd) { if (!priv->lecd) {
@ -374,15 +373,19 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) {
pr_debug("%s:lec_start_xmit: queuing packet, ", pr_debug("%s:lec_start_xmit: queuing packet, ",
dev->name); dev->name);
pr_debug("MAC address %s\n", pr_debug("MAC address " MAC_FMT "\n",
print_mac(mac, lec_h->h_dest)); lec_h->h_dest[0], lec_h->h_dest[1],
lec_h->h_dest[2], lec_h->h_dest[3],
lec_h->h_dest[4], lec_h->h_dest[5]);
skb_queue_tail(&entry->tx_wait, skb); skb_queue_tail(&entry->tx_wait, skb);
} else { } else {
pr_debug pr_debug
("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ",
dev->name); dev->name);
pr_debug("MAC address %s\n", pr_debug("MAC address " MAC_FMT "\n",
print_mac(mac, lec_h->h_dest)); lec_h->h_dest[0], lec_h->h_dest[1],
lec_h->h_dest[2], lec_h->h_dest[3],
lec_h->h_dest[4], lec_h->h_dest[5]);
priv->stats.tx_dropped++; priv->stats.tx_dropped++;
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
@ -394,8 +397,10 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev)
while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) {
pr_debug("lec.c: emptying tx queue, "); pr_debug("lec.c: emptying tx queue, ");
pr_debug("MAC address %s\n", pr_debug("MAC address " MAC_FMT "\n",
print_mac(mac, lec_h->h_dest)); lec_h->h_dest[0], lec_h->h_dest[1],
lec_h->h_dest[2], lec_h->h_dest[3],
lec_h->h_dest[4], lec_h->h_dest[5]);
lec_send(vcc, skb2, priv); lec_send(vcc, skb2, priv);
} }
@ -449,7 +454,6 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
struct lec_arp_table *entry; struct lec_arp_table *entry;
int i; int i;
char *tmp; /* FIXME */ char *tmp; /* FIXME */
DECLARE_MAC_BUF(mac);
atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
mesg = (struct atmlec_msg *)skb->data; mesg = (struct atmlec_msg *)skb->data;
@ -536,9 +540,14 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
struct net_bridge_fdb_entry *f; struct net_bridge_fdb_entry *f;
pr_debug pr_debug
("%s: bridge zeppelin asks about %s\n", ("%s: bridge zeppelin asks about " MAC_FMT "\n",
dev->name, dev->name,
print_mac(mac, mesg->content.proxy.mac_addr)); mesg->content.proxy.mac_addr[0],
mesg->content.proxy.mac_addr[1],
mesg->content.proxy.mac_addr[2],
mesg->content.proxy.mac_addr[3],
mesg->content.proxy.mac_addr[4],
mesg->content.proxy.mac_addr[5]);
if (br_fdb_get_hook == NULL || dev->br_port == NULL) if (br_fdb_get_hook == NULL || dev->br_port == NULL)
break; break;

View file

@ -271,7 +271,6 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,
{ {
struct ieee80211_hdr_3addr *hdr; struct ieee80211_hdr_3addr *hdr;
int res, hdrlen; int res, hdrlen;
DECLARE_MAC_BUF(mac);
if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
return 0; return 0;
@ -283,8 +282,12 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,
res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
atomic_dec(&crypt->refcnt); atomic_dec(&crypt->refcnt);
if (res < 0) { if (res < 0) {
IEEE80211_DEBUG_DROP("decryption failed (SA=%s" IEEE80211_DEBUG_DROP("decryption failed (SA=" MAC_FMT
") res=%d\n", print_mac(mac, hdr->addr2), res); ") res=%d\n",
hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5],
res);
if (res == -2) if (res == -2)
IEEE80211_DEBUG_DROP("Decryption failed ICV " IEEE80211_DEBUG_DROP("Decryption failed ICV "
"mismatch (key %d)\n", "mismatch (key %d)\n",
@ -304,7 +307,6 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee,
{ {
struct ieee80211_hdr_3addr *hdr; struct ieee80211_hdr_3addr *hdr;
int res, hdrlen; int res, hdrlen;
DECLARE_MAC_BUF(mac);
if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
return 0; return 0;
@ -317,8 +319,12 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee,
atomic_dec(&crypt->refcnt); atomic_dec(&crypt->refcnt);
if (res < 0) { if (res < 0) {
printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
" (SA=%s keyidx=%d)\n", " (SA=" MAC_FMT " keyidx=%d)\n",
ieee->dev->name, print_mac(mac, hdr->addr2), keyidx); ieee->dev->name,
hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5],
keyidx);
return -1; return -1;
} }
@ -462,8 +468,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
* frames silently instead of filling system log with * frames silently instead of filling system log with
* these reports. */ * these reports. */
IEEE80211_DEBUG_DROP("Decryption failed (not set)" IEEE80211_DEBUG_DROP("Decryption failed (not set)"
" (SA=%s)\n", " (SA=" MAC_FMT ")\n",
print_mac(mac, hdr->addr2)); hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5]);
ieee->ieee_stats.rx_discards_undecryptable++; ieee->ieee_stats.rx_discards_undecryptable++;
goto rx_dropped; goto rx_dropped;
} }
@ -474,8 +482,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt && fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt &&
(keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) { (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) {
printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
"from %s\n", dev->name, "from " MAC_FMT "\n", dev->name,
print_mac(mac, hdr->addr2)); hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5]);
/* TODO: could inform hostapd about this so that it /* TODO: could inform hostapd about this so that it
* could send auth failure report */ * could send auth failure report */
goto rx_dropped; goto rx_dropped;
@ -653,8 +663,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
* configured */ * configured */
} else { } else {
IEEE80211_DEBUG_DROP("encryption configured, but RX " IEEE80211_DEBUG_DROP("encryption configured, but RX "
"frame not encrypted (SA=%s" "frame not encrypted (SA="
")\n", print_mac(mac, hdr->addr2)); MAC_FMT ")\n",
hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5]);
goto rx_dropped; goto rx_dropped;
} }
} }
@ -662,9 +675,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep &&
!ieee80211_is_eapol_frame(ieee, skb)) { !ieee80211_is_eapol_frame(ieee, skb)) {
IEEE80211_DEBUG_DROP("dropped unencrypted RX data " IEEE80211_DEBUG_DROP("dropped unencrypted RX data "
"frame from %s" "frame from " MAC_FMT
" (drop_unencrypted=1)\n", " (drop_unencrypted=1)\n",
print_mac(mac, hdr->addr2)); hdr->addr2[0], hdr->addr2[1],
hdr->addr2[2], hdr->addr2[3],
hdr->addr2[4], hdr->addr2[5]);
goto rx_dropped; goto rx_dropped;
} }

View file

@ -124,6 +124,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat
tw->tw_hash = sk->sk_hash; tw->tw_hash = sk->sk_hash;
tw->tw_ipv6only = 0; tw->tw_ipv6only = 0;
tw->tw_prot = sk->sk_prot_creator; tw->tw_prot = sk->sk_prot_creator;
tw->tw_net = sk->sk_net;
atomic_set(&tw->tw_refcnt, 1); atomic_set(&tw->tw_refcnt, 1);
inet_twsk_dead_node_init(tw); inet_twsk_dead_node_init(tw);
__module_get(tw->tw_prot->owner); __module_get(tw->tw_prot->owner);

View file

@ -1132,7 +1132,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
} }
release_sock(sk); release_sock(sk);
if (len < sizeof(int) && len > 0 && val>=0 && val<255) { if (len < sizeof(int) && len > 0 && val>=0 && val<=255) {
unsigned char ucval = (unsigned char)val; unsigned char ucval = (unsigned char)val;
len = 1; len = 1;
if (put_user(len, optlen)) if (put_user(len, optlen))

View file

@ -629,6 +629,8 @@ static int __init nf_nat_init(void)
size_t i; size_t i;
int ret; int ret;
need_ipv4_conntrack();
ret = nf_ct_extend_register(&nat_extend); ret = nf_ct_extend_register(&nat_extend);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "nf_nat_core: Unable to register extension\n"); printk(KERN_ERR "nf_nat_core: Unable to register extension\n");

View file

@ -1625,13 +1625,11 @@ out:
return flag; return flag;
} }
/* If we receive more dupacks than we expected counting segments /* Limits sacked_out so that sum with lost_out isn't ever larger than
* in assumption of absent reordering, interpret this as reordering. * packets_out. Returns zero if sacked_out adjustement wasn't necessary.
* The only another reason could be bug in receiver TCP.
*/ */
static void tcp_check_reno_reordering(struct sock *sk, const int addend) int tcp_limit_reno_sacked(struct tcp_sock *tp)
{ {
struct tcp_sock *tp = tcp_sk(sk);
u32 holes; u32 holes;
holes = max(tp->lost_out, 1U); holes = max(tp->lost_out, 1U);
@ -1639,8 +1637,20 @@ static void tcp_check_reno_reordering(struct sock *sk, const int addend)
if ((tp->sacked_out + holes) > tp->packets_out) { if ((tp->sacked_out + holes) > tp->packets_out) {
tp->sacked_out = tp->packets_out - holes; tp->sacked_out = tp->packets_out - holes;
tcp_update_reordering(sk, tp->packets_out + addend, 0); return 1;
} }
return 0;
}
/* If we receive more dupacks than we expected counting segments
* in assumption of absent reordering, interpret this as reordering.
* The only another reason could be bug in receiver TCP.
*/
static void tcp_check_reno_reordering(struct sock *sk, const int addend)
{
struct tcp_sock *tp = tcp_sk(sk);
if (tcp_limit_reno_sacked(tp))
tcp_update_reordering(sk, tp->packets_out + addend, 0);
} }
/* Emulate SACKs for SACKless connection: account for a new dupack. */ /* Emulate SACKs for SACKless connection: account for a new dupack. */
@ -1681,11 +1691,16 @@ static inline void tcp_reset_reno_sack(struct tcp_sock *tp)
int tcp_use_frto(struct sock *sk) int tcp_use_frto(struct sock *sk)
{ {
const struct tcp_sock *tp = tcp_sk(sk); const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
struct sk_buff *skb; struct sk_buff *skb;
if (!sysctl_tcp_frto) if (!sysctl_tcp_frto)
return 0; return 0;
/* MTU probe and F-RTO won't really play nicely along currently */
if (icsk->icsk_mtup.probe_size)
return 0;
if (IsSackFrto()) if (IsSackFrto())
return 1; return 1;
@ -2134,11 +2149,13 @@ static void tcp_verify_retransmit_hint(struct tcp_sock *tp, struct sk_buff *skb)
/* Mark head of queue up as lost. With RFC3517 SACK, the packets is /* Mark head of queue up as lost. With RFC3517 SACK, the packets is
* is against sacked "cnt", otherwise it's against facked "cnt" * is against sacked "cnt", otherwise it's against facked "cnt"
*/ */
static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit) static void tcp_mark_head_lost(struct sock *sk, int packets)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb; struct sk_buff *skb;
int cnt; int cnt, oldcnt;
int err;
unsigned int mss;
BUG_TRAP(packets <= tp->packets_out); BUG_TRAP(packets <= tp->packets_out);
if (tp->lost_skb_hint) { if (tp->lost_skb_hint) {
@ -2157,13 +2174,25 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit)
tp->lost_skb_hint = skb; tp->lost_skb_hint = skb;
tp->lost_cnt_hint = cnt; tp->lost_cnt_hint = cnt;
if (after(TCP_SKB_CB(skb)->end_seq, tp->high_seq))
break;
oldcnt = cnt;
if (tcp_is_fack(tp) || tcp_is_reno(tp) || if (tcp_is_fack(tp) || tcp_is_reno(tp) ||
(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED))
cnt += tcp_skb_pcount(skb); cnt += tcp_skb_pcount(skb);
if (((!fast_rexmit || (tp->lost_out > 0)) && (cnt > packets)) || if (cnt > packets) {
after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) if (tcp_is_sack(tp) || (oldcnt >= packets))
break; break;
mss = skb_shinfo(skb)->gso_size;
err = tcp_fragment(sk, skb, (packets - oldcnt) * mss, mss);
if (err < 0)
break;
cnt = packets;
}
if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) {
TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
tp->lost_out += tcp_skb_pcount(skb); tp->lost_out += tcp_skb_pcount(skb);
@ -2180,17 +2209,17 @@ static void tcp_update_scoreboard(struct sock *sk, int fast_rexmit)
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
if (tcp_is_reno(tp)) { if (tcp_is_reno(tp)) {
tcp_mark_head_lost(sk, 1, fast_rexmit); tcp_mark_head_lost(sk, 1);
} else if (tcp_is_fack(tp)) { } else if (tcp_is_fack(tp)) {
int lost = tp->fackets_out - tp->reordering; int lost = tp->fackets_out - tp->reordering;
if (lost <= 0) if (lost <= 0)
lost = 1; lost = 1;
tcp_mark_head_lost(sk, lost, fast_rexmit); tcp_mark_head_lost(sk, lost);
} else { } else {
int sacked_upto = tp->sacked_out - tp->reordering; int sacked_upto = tp->sacked_out - tp->reordering;
if (sacked_upto < 0) if (sacked_upto < fast_rexmit)
sacked_upto = 0; sacked_upto = fast_rexmit;
tcp_mark_head_lost(sk, sacked_upto, fast_rexmit); tcp_mark_head_lost(sk, sacked_upto);
} }
/* New heuristics: it is possible only after we switched /* New heuristics: it is possible only after we switched
@ -2524,7 +2553,7 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag)
before(tp->snd_una, tp->high_seq) && before(tp->snd_una, tp->high_seq) &&
icsk->icsk_ca_state != TCP_CA_Open && icsk->icsk_ca_state != TCP_CA_Open &&
tp->fackets_out > tp->reordering) { tp->fackets_out > tp->reordering) {
tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering, 0); tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering);
NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); NET_INC_STATS_BH(LINUX_MIB_TCPLOSS);
} }
@ -2586,6 +2615,8 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag)
case TCP_CA_Loss: case TCP_CA_Loss:
if (flag & FLAG_DATA_ACKED) if (flag & FLAG_DATA_ACKED)
icsk->icsk_retransmits = 0; icsk->icsk_retransmits = 0;
if (tcp_is_reno(tp) && flag & FLAG_SND_UNA_ADVANCED)
tcp_reset_reno_sack(tp);
if (!tcp_try_undo_loss(sk)) { if (!tcp_try_undo_loss(sk)) {
tcp_moderate_cwnd(tp); tcp_moderate_cwnd(tp);
tcp_xmit_retransmit_queue(sk); tcp_xmit_retransmit_queue(sk);

View file

@ -1808,6 +1808,9 @@ void tcp_simple_retransmit(struct sock *sk)
if (!lost) if (!lost)
return; return;
if (tcp_is_reno(tp))
tcp_limit_reno_sacked(tp);
tcp_verify_left_out(tp); tcp_verify_left_out(tp);
/* Don't muck with the congestion window here. /* Don't muck with the congestion window here.

View file

@ -312,14 +312,12 @@ static void ieee80211_sta_wmm_params(struct net_device *dev,
} }
} }
static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata,
static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, bool use_protection,
u8 erp_value) bool use_short_preamble)
{ {
struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf;
struct ieee80211_if_sta *ifsta = &sdata->u.sta; struct ieee80211_if_sta *ifsta = &sdata->u.sta;
bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0;
bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
u32 changed = 0; u32 changed = 0;
@ -350,6 +348,32 @@ static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
return changed; return changed;
} }
static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata,
u8 erp_value)
{
bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0;
bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0;
return ieee80211_handle_protect_preamb(sdata,
use_protection, use_short_preamble);
}
static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta_bss *bss)
{
u32 changed = 0;
if (bss->has_erp_value)
changed |= ieee80211_handle_erp_ie(sdata, bss->erp_value);
else {
u16 capab = bss->capability;
changed |= ieee80211_handle_protect_preamb(sdata, false,
(capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0);
}
return changed;
}
int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie,
struct ieee80211_ht_info *ht_info) struct ieee80211_ht_info *ht_info)
{ {
@ -468,9 +492,7 @@ static void ieee80211_set_associated(struct net_device *dev,
local->hw.conf.channel, local->hw.conf.channel,
ifsta->ssid, ifsta->ssid_len); ifsta->ssid, ifsta->ssid_len);
if (bss) { if (bss) {
if (bss->has_erp_value) changed |= ieee80211_handle_bss_capability(sdata, bss);
changed |= ieee80211_handle_erp_ie(
sdata, bss->erp_value);
ieee80211_rx_bss_put(dev, bss); ieee80211_rx_bss_put(dev, bss);
} }
@ -2116,6 +2138,11 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev,
if (elems.erp_info && elems.erp_info_len >= 1) if (elems.erp_info && elems.erp_info_len >= 1)
changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]); changed |= ieee80211_handle_erp_ie(sdata, elems.erp_info[0]);
else {
u16 capab = le16_to_cpu(mgmt->u.beacon.capab_info);
changed |= ieee80211_handle_protect_preamb(sdata, false,
(capab & WLAN_CAPABILITY_SHORT_PREAMBLE) != 0);
}
if (elems.ht_cap_elem && elems.ht_info_elem && if (elems.ht_cap_elem && elems.ht_info_elem &&
elems.wmm_param && local->ops->conf_ht && elems.wmm_param && local->ops->conf_ht &&

View file

@ -466,38 +466,25 @@ static inline void rateinfo_recalc(struct dsthash_ent *dh, unsigned long now)
static inline __be32 maskl(__be32 a, unsigned int l) static inline __be32 maskl(__be32 a, unsigned int l)
{ {
return htonl(ntohl(a) & ~(~(u_int32_t)0 >> l)); return l ? htonl(ntohl(a) & ~0 << (32 - l)) : 0;
} }
#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
static void hashlimit_ipv6_mask(__be32 *i, unsigned int p) static void hashlimit_ipv6_mask(__be32 *i, unsigned int p)
{ {
switch (p) { switch (p) {
case 0: case 0 ... 31:
i[0] = i[1] = 0;
i[2] = i[3] = 0;
break;
case 1 ... 31:
i[0] = maskl(i[0], p); i[0] = maskl(i[0], p);
i[1] = i[2] = i[3] = 0; i[1] = i[2] = i[3] = 0;
break; break;
case 32: case 32 ... 63:
i[1] = i[2] = i[3] = 0;
break;
case 33 ... 63:
i[1] = maskl(i[1], p - 32); i[1] = maskl(i[1], p - 32);
i[2] = i[3] = 0; i[2] = i[3] = 0;
break; break;
case 64: case 64 ... 95:
i[2] = i[3] = 0;
break;
case 65 ... 95:
i[2] = maskl(i[2], p - 64); i[2] = maskl(i[2], p - 64);
i[3] = 0; i[3] = 0;
case 96: case 96 ... 127:
i[3] = 0;
break;
case 97 ... 127:
i[3] = maskl(i[3], p - 96); i[3] = maskl(i[3], p - 96);
break; break;
case 128: case 128:

View file

@ -945,7 +945,7 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
nla_len(info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES]); nla_len(info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES]);
params.listen_interval = params.listen_interval =
nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]); nla_get_u16(info->attrs[NL80211_ATTR_STA_LISTEN_INTERVAL]);
params.listen_interval = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]); params.aid = nla_get_u16(info->attrs[NL80211_ATTR_STA_AID]);
if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS], if (parse_station_flags(info->attrs[NL80211_ATTR_STA_FLAGS],
&params.station_flags)) &params.station_flags))

View file

@ -288,7 +288,7 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info *
memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr));
x->props.flags = p->flags; x->props.flags = p->flags;
if (x->props.mode == XFRM_MODE_TRANSPORT) if (!x->sel.family)
x->sel.family = p->family; x->sel.family = p->family;
} }