]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/bnep/core.c
bluetooth: driver API update
[linux-2.6-omap-h63xx.git] / net / bluetooth / bnep / core.c
index 80ba30cf4b682556252587e2ed57468f6663efa0..52a6ce0d772b1f8b7e9dca07fe5c507b4e68a278 100644 (file)
 
 #include "bnep.h"
 
-#ifndef CONFIG_BT_BNEP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.3"
 
 static int compress_src = 1;
@@ -311,8 +306,7 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
        struct sk_buff *nskb;
        u8 type;
 
-       dev->last_rx = jiffies;
-       s->stats.rx_bytes += skb->len;
+       dev->stats.rx_bytes += skb->len;
 
        type = *(u8 *) skb->data; skb_pull(skb, 1);
 
@@ -349,7 +343,7 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
         * may not be modified and because of the alignment requirements. */
        nskb = alloc_skb(2 + ETH_HLEN + skb->len, GFP_KERNEL);
        if (!nskb) {
-               s->stats.rx_dropped++;
+               dev->stats.rx_dropped++;
                kfree_skb(skb);
                return -ENOMEM;
        }
@@ -384,14 +378,14 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
        skb_copy_from_linear_data(skb, __skb_put(nskb, skb->len), skb->len);
        kfree_skb(skb);
 
-       s->stats.rx_packets++;
+       dev->stats.rx_packets++;
        nskb->ip_summed = CHECKSUM_NONE;
        nskb->protocol  = eth_type_trans(nskb, dev);
        netif_rx_ni(nskb);
        return 0;
 
 badframe:
-       s->stats.rx_errors++;
+       dev->stats.rx_errors++;
        kfree_skb(skb);
        return 0;
 }
@@ -454,8 +448,8 @@ send:
        kfree_skb(skb);
 
        if (len > 0) {
-               s->stats.tx_bytes += len;
-               s->stats.tx_packets++;
+               s->dev->stats.tx_bytes += len;
+               s->dev->stats.tx_packets++;
                return 0;
        }
 
@@ -566,7 +560,7 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
                goto failed;
        }
 
-       s = dev->priv;
+       s = netdev_priv(dev);
 
        /* This is rx header therefore addresses are swapped.
         * ie eh.h_dest is our local address. */