Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88259
b: refs/heads/master
c: 877cb0d
h: refs/heads/master
i:
  88257: 80b7a93
  88255: 12de798
v: v3
  • Loading branch information
Holger Schurig authored and John W. Linville committed Apr 8, 2008
1 parent 31d25f3 commit d8bbbbd
Show file tree
Hide file tree
Showing 15 changed files with 154 additions and 281 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bcf0dda8d2408fe1c1040cdec5a98e5fcad2ac72
refs/heads/master: 877cb0d4af2658beb5f89d38ae51968782f62fad
11 changes: 6 additions & 5 deletions trunk/drivers/net/starfire.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,12 +1472,13 @@ static int __netdev_rx(struct net_device *dev, int *quota)
#ifndef final_version /* Remove after testing. */
/* You will want this info for the initial debug. */
if (debug > 5) {
printk(KERN_DEBUG " Rx data " MAC_FMT " " MAC_FMT
DECLARE_MAC_BUF(mac);
DECLARE_MAC_BUF(mac2);

printk(KERN_DEBUG " Rx data %s %s"
" %2.2x%2.2x.\n",
skb->data[0], skb->data[1], skb->data[2],
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],
print_mac(mac, &skb->data[0]),
print_mac(mac2, &skb->data[6]),
skb->data[12], skb->data[13]);
}
#endif
Expand Down
15 changes: 5 additions & 10 deletions trunk/drivers/net/tokenring/olympic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1438,18 +1438,13 @@ static void olympic_arb_cmd(struct net_device *dev)

if (olympic_priv->olympic_network_monitor) {
struct trh_hdr *mac_hdr;
DECLARE_MAC_BUF(mac);
printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name);
mac_hdr = tr_hdr(mac_frame);
printk(KERN_WARNING "%s: MAC Frame Dest. Addr: "
MAC_FMT " \n", dev->name,
mac_hdr->daddr[0], mac_hdr->daddr[1],
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]);
printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %s\n",
dev->name, print_mac(mac, mac_hdr->daddr));
printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %s\n",
dev->name, print_mac(mac, mac_hdr->saddr));
}
netif_rx(mac_frame);
dev->last_rx = jiffies;
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,11 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
struct scatterlist sg[1+MAX_SKB_FRAGS];
struct virtio_net_hdr *hdr;
const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest;
DECLARE_MAC_BUF(mac);

sg_init_table(sg, 1+MAX_SKB_FRAGS);

pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb,
dest[0], dest[1], dest[2],
dest[3], dest[4], dest[5]);
pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest));

/* Encode metadata header at front. */
hdr = skb_vnet_hdr(skb);
Expand Down
39 changes: 15 additions & 24 deletions trunk/drivers/net/wireless/hostap/hostap_80211_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
{
struct ieee80211_hdr_4addr *hdr;
int res, hdrlen;
DECLARE_MAC_BUF(mac);

if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
return 0;
Expand All @@ -646,10 +647,8 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
strcmp(crypt->ops->name, "TKIP") == 0) {
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
"received packet from " MAC_FMT "\n",
local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
"received packet from %s\n",
local->dev->name, print_mac(mac, hdr->addr2));
}
return -1;
}
Expand All @@ -658,12 +657,9 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
atomic_dec(&crypt->refcnt);
if (res < 0) {
printk(KERN_DEBUG "%s: decryption failed (SA=" MAC_FMT
printk(KERN_DEBUG "%s: decryption failed (SA=%s"
") res=%d\n",
local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5],
res);
local->dev->name, print_mac(mac, hdr->addr2), res);
local->comm_tallies.rx_discards_wep_undecryptable++;
return -1;
}
Expand Down Expand Up @@ -725,6 +721,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
struct ieee80211_crypt_data *crypt = NULL;
void *sta = NULL;
int keyidx = 0;
DECLARE_MAC_BUF(mac);

iface = netdev_priv(dev);
local = iface->local;
Expand Down Expand Up @@ -801,10 +798,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
* frames silently instead of filling system log with
* these reports. */
printk(KERN_DEBUG "%s: WEP decryption failed (not set)"
" (SA=" MAC_FMT ")\n",
local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
" (SA=%s)\n",
local->dev->name, print_mac(mac, hdr->addr2));
#endif
local->comm_tallies.rx_discards_wep_undecryptable++;
goto rx_dropped;
Expand All @@ -818,9 +813,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
(keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
{
printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
"from " MAC_FMT "\n", dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
"from %s\n", dev->name,
print_mac(mac, hdr->addr2));
/* TODO: could inform hostapd about this so that it
* could send auth failure report */
goto rx_dropped;
Expand Down Expand Up @@ -988,10 +982,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
"unencrypted EAPOL frame\n", local->dev->name);
} else {
printk(KERN_DEBUG "%s: encryption configured, but RX "
"frame not encrypted (SA=" MAC_FMT ")\n",
local->dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
"frame not encrypted (SA=%s)\n",
local->dev->name, print_mac(mac, hdr->addr2));
goto rx_dropped;
}
}
Expand All @@ -1000,10 +992,9 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
!hostap_is_eapol_frame(local, skb)) {
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: dropped unencrypted RX data "
"frame from " MAC_FMT " (drop_unencrypted=1)\n",
dev->name,
hdr->addr2[0], hdr->addr2[1], hdr->addr2[2],
hdr->addr2[3], hdr->addr2[4], hdr->addr2[5]);
"frame from %s"
" (drop_unencrypted=1)\n",
dev->name, print_mac(mac, hdr->addr2));
}
goto rx_dropped;
}
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/net/wireless/hostap/hostap_80211_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
struct ieee80211_hdr_4addr *hdr;
u16 fc;
int prefix_len, postfix_len, hdr_len, res;
DECLARE_MAC_BUF(mac);

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

0 comments on commit d8bbbbd

Please sign in to comment.