beceem: dump control packet information
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Mon, 1 Nov 2010 18:09:05 +0000 (14:09 -0400)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Mon, 1 Nov 2010 18:10:41 +0000 (14:10 -0400)
Add control packet information is useful for debugging.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
drivers/staging/bcm/HandleControlPacket.c
drivers/staging/bcm/Transmit.c

index e7afa56c0dcf19756de1b40a2f02c93bc42cc7e7..2b1e9e17e11ccf4a782599b21a8d2f229e46ab34 100644 (file)
@@ -19,8 +19,10 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb)
        CHAR cntrl_msg_mask_bit = 0;
        BOOLEAN drop_pkt_flag = TRUE ;
        USHORT usStatus = *(PUSHORT)(skb->data);
-       BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "=====>");
-       /* Get the Leader field */
+
+       if (netif_msg_pktdata(Adapter))
+               print_hex_dump(KERN_DEBUG, PFX "rx control: ", DUMP_PREFIX_NONE,
+                              16, 1, skb->data, skb->len, 0);
 
        switch(usStatus)
        {
index 652ba27407af11620dd900f20483505b41af73d5..0f7000960d5094d9a68532e97fa528ca3599b1de 100644 (file)
@@ -65,6 +65,11 @@ INT SendControlPacket(PMINI_ADAPTER Adapter, char *pControlPacket)
        BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Leader Length: %x",PLeader->PLength);
        if(Adapter->device_removed)
                return 0;
+
+       if (netif_msg_pktdata(Adapter))
+               print_hex_dump(KERN_DEBUG, PFX "tx control: ", DUMP_PREFIX_NONE,
+                              16, 1, pControlPacket, PLeader->PLength + LEADER_SIZE, 0);
+
        Adapter->interface_transmit(Adapter->pvInterfaceAdapter,
                                        pControlPacket, (PLeader->PLength + LEADER_SIZE));