staging: rtl8192e: Remove RTLLIB_DEBUG_(FRAG|EAP|DROP|STATE|TX|RX)()
Use netdev_dbg() instead. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
521a9cbdb2
commit
e77c752f39
3 changed files with 35 additions and 34 deletions
|
@ -703,13 +703,7 @@ do { \
|
||||||
#define RTLLIB_DL_ERR (1<<31)
|
#define RTLLIB_DL_ERR (1<<31)
|
||||||
#define RTLLIB_DEBUG_INFO(f, a...) RTLLIB_DEBUG(RTLLIB_DL_INFO, f, ## a)
|
#define RTLLIB_DEBUG_INFO(f, a...) RTLLIB_DEBUG(RTLLIB_DL_INFO, f, ## a)
|
||||||
|
|
||||||
#define RTLLIB_DEBUG_STATE(f, a...) RTLLIB_DEBUG(RTLLIB_DL_STATE, f, ## a)
|
|
||||||
#define RTLLIB_DEBUG_MGMT(f, a...) RTLLIB_DEBUG(RTLLIB_DL_MGMT, f, ## a)
|
#define RTLLIB_DEBUG_MGMT(f, a...) RTLLIB_DEBUG(RTLLIB_DL_MGMT, f, ## a)
|
||||||
#define RTLLIB_DEBUG_FRAG(f, a...) RTLLIB_DEBUG(RTLLIB_DL_FRAG, f, ## a)
|
|
||||||
#define RTLLIB_DEBUG_EAP(f, a...) RTLLIB_DEBUG(RTLLIB_DL_EAP, f, ## a)
|
|
||||||
#define RTLLIB_DEBUG_DROP(f, a...) RTLLIB_DEBUG(RTLLIB_DL_DROP, f, ## a)
|
|
||||||
#define RTLLIB_DEBUG_TX(f, a...) RTLLIB_DEBUG(RTLLIB_DL_TX, f, ## a)
|
|
||||||
#define RTLLIB_DEBUG_RX(f, a...) RTLLIB_DEBUG(RTLLIB_DL_RX, f, ## a)
|
|
||||||
#define RTLLIB_DEBUG_QOS(f, a...) RTLLIB_DEBUG(RTLLIB_DL_QOS, f, ## a)
|
#define RTLLIB_DEBUG_QOS(f, a...) RTLLIB_DEBUG(RTLLIB_DL_QOS, f, ## a)
|
||||||
|
|
||||||
#ifndef ETH_P_PAE
|
#ifndef ETH_P_PAE
|
||||||
|
|
|
@ -69,9 +69,9 @@ rtllib_frag_cache_find(struct rtllib_device *ieee, unsigned int seq,
|
||||||
entry = &ieee->frag_cache[tid][i];
|
entry = &ieee->frag_cache[tid][i];
|
||||||
if (entry->skb != NULL &&
|
if (entry->skb != NULL &&
|
||||||
time_after(jiffies, entry->first_frag_time + 2 * HZ)) {
|
time_after(jiffies, entry->first_frag_time + 2 * HZ)) {
|
||||||
RTLLIB_DEBUG_FRAG(
|
netdev_dbg(ieee->dev,
|
||||||
"expiring fragment cache entry seq=%u last_frag=%u\n",
|
"expiring fragment cache entry seq=%u last_frag=%u\n",
|
||||||
entry->seq, entry->last_frag);
|
entry->seq, entry->last_frag);
|
||||||
dev_kfree_skb_any(entry->skb);
|
dev_kfree_skb_any(entry->skb);
|
||||||
entry->skb = NULL;
|
entry->skb = NULL;
|
||||||
}
|
}
|
||||||
|
@ -187,8 +187,9 @@ static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
|
||||||
hdr->addr1);
|
hdr->addr1);
|
||||||
|
|
||||||
if (entry == NULL) {
|
if (entry == NULL) {
|
||||||
RTLLIB_DEBUG_FRAG(
|
netdev_dbg(ieee->dev,
|
||||||
"could not invalidate fragment cache entry (seq=%u)\n", seq);
|
"Couldn't invalidate fragment cache entry (seq=%u)\n",
|
||||||
|
seq);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,11 +306,12 @@ rtllib_rx_frame_decrypt(struct rtllib_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) {
|
||||||
RTLLIB_DEBUG_DROP(
|
netdev_dbg(ieee->dev, "decryption failed (SA= %pM) res=%d\n",
|
||||||
"decryption failed (SA= %pM) res=%d\n", hdr->addr2, res);
|
hdr->addr2, res);
|
||||||
if (res == -2)
|
if (res == -2)
|
||||||
RTLLIB_DEBUG_DROP("Decryption failed ICV mismatch (key %d)\n",
|
netdev_dbg(ieee->dev,
|
||||||
skb->data[hdrlen + 3] >> 6);
|
"Decryption failed ICV mismatch (key %d)\n",
|
||||||
|
skb->data[hdrlen + 3] >> 6);
|
||||||
ieee->ieee_stats.rx_discards_undecryptable++;
|
ieee->ieee_stats.rx_discards_undecryptable++;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -840,7 +842,8 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||||
sub_skb->dev = ieee->dev;
|
sub_skb->dev = ieee->dev;
|
||||||
rxb->subframes[rxb->nr_subframes++] = sub_skb;
|
rxb->subframes[rxb->nr_subframes++] = sub_skb;
|
||||||
if (rxb->nr_subframes >= MAX_SUBFRAME_COUNT) {
|
if (rxb->nr_subframes >= MAX_SUBFRAME_COUNT) {
|
||||||
RTLLIB_DEBUG_RX("ParseSubframe(): Too many Subframes! Packets dropped!\n");
|
netdev_dbg(ieee->dev,
|
||||||
|
"ParseSubframe(): Too many Subframes! Packets dropped!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
skb_pull(skb, nSubframe_Length);
|
skb_pull(skb, nSubframe_Length);
|
||||||
|
@ -991,9 +994,9 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, u16 fc,
|
||||||
stype != RTLLIB_STYPE_DATA_CFACKPOLL &&
|
stype != RTLLIB_STYPE_DATA_CFACKPOLL &&
|
||||||
stype != RTLLIB_STYPE_QOS_DATA) {
|
stype != RTLLIB_STYPE_QOS_DATA) {
|
||||||
if (stype != RTLLIB_STYPE_NULLFUNC)
|
if (stype != RTLLIB_STYPE_NULLFUNC)
|
||||||
RTLLIB_DEBUG_DROP(
|
netdev_dbg(ieee->dev,
|
||||||
"RX: dropped data frame with no data (type=0x%02x, subtype=0x%02x)\n",
|
"RX: dropped data frame with no data (type=0x%02x, subtype=0x%02x)\n",
|
||||||
type, stype);
|
type, stype);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1037,8 +1040,9 @@ static int rtllib_rx_get_crypt(struct rtllib_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.
|
||||||
*/
|
*/
|
||||||
RTLLIB_DEBUG_DROP("Decryption failed (not set) (SA= %pM)\n",
|
netdev_dbg(ieee->dev,
|
||||||
hdr->addr2);
|
"Decryption failed (not set) (SA= %pM)\n",
|
||||||
|
hdr->addr2);
|
||||||
ieee->ieee_stats.rx_discards_undecryptable++;
|
ieee->ieee_stats.rx_discards_undecryptable++;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1077,7 +1081,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||||
int flen;
|
int flen;
|
||||||
struct sk_buff *frag_skb = rtllib_frag_cache_get(ieee, hdr);
|
struct sk_buff *frag_skb = rtllib_frag_cache_get(ieee, hdr);
|
||||||
|
|
||||||
RTLLIB_DEBUG_FRAG("Rx Fragment received (%u)\n", frag);
|
netdev_dbg(ieee->dev, "Rx Fragment received (%u)\n", frag);
|
||||||
|
|
||||||
if (!frag_skb) {
|
if (!frag_skb) {
|
||||||
RTLLIB_DEBUG(RTLLIB_DL_RX | RTLLIB_DL_FRAG,
|
RTLLIB_DEBUG(RTLLIB_DL_RX | RTLLIB_DL_FRAG,
|
||||||
|
@ -1148,12 +1152,13 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||||
*/
|
*/
|
||||||
struct eapol *eap = (struct eapol *)(skb->data +
|
struct eapol *eap = (struct eapol *)(skb->data +
|
||||||
24);
|
24);
|
||||||
RTLLIB_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
|
netdev_dbg(ieee->dev,
|
||||||
eap_get_type(eap->type));
|
"RX: IEEE 802.1X EAPOL frame: %s\n",
|
||||||
|
eap_get_type(eap->type));
|
||||||
} else {
|
} else {
|
||||||
RTLLIB_DEBUG_DROP(
|
netdev_dbg(ieee->dev,
|
||||||
"encryption configured, but RX frame not encrypted (SA= %pM)\n",
|
"encryption configured, but RX frame not encrypted (SA= %pM)\n",
|
||||||
hdr->addr2);
|
hdr->addr2);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1162,15 +1167,16 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||||
rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
||||||
struct eapol *eap = (struct eapol *)(skb->data +
|
struct eapol *eap = (struct eapol *)(skb->data +
|
||||||
24);
|
24);
|
||||||
RTLLIB_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
|
netdev_dbg(ieee->dev,
|
||||||
eap_get_type(eap->type));
|
"RX: IEEE 802.1X EAPOL frame: %s\n",
|
||||||
|
eap_get_type(eap->type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->open_wep &&
|
if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->open_wep &&
|
||||||
!rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
!rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
||||||
RTLLIB_DEBUG_DROP(
|
netdev_dbg(ieee->dev,
|
||||||
"dropped unencrypted RX data frame from %pM (drop_unencrypted=1)\n",
|
"dropped unencrypted RX data frame from %pM (drop_unencrypted=1)\n",
|
||||||
hdr->addr2);
|
hdr->addr2);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -670,8 +670,9 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
|
||||||
struct eapol *eap = (struct eapol *)(skb->data +
|
struct eapol *eap = (struct eapol *)(skb->data +
|
||||||
sizeof(struct ethhdr) - SNAP_SIZE -
|
sizeof(struct ethhdr) - SNAP_SIZE -
|
||||||
sizeof(u16));
|
sizeof(u16));
|
||||||
RTLLIB_DEBUG_EAP("TX: IEEE 802.11 EAPOL frame: %s\n",
|
netdev_dbg(ieee->dev,
|
||||||
eap_get_type(eap->type));
|
"TX: IEEE 802.11 EAPOL frame: %s\n",
|
||||||
|
eap_get_type(eap->type));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Advance the SKB to the start of the payload */
|
/* Advance the SKB to the start of the payload */
|
||||||
|
|
Loading…
Add table
Reference in a new issue