2 * DHD logging module for internal debug
4 * $Copyright Open Broadcom Corporation$
6 * $Id: dhd_sdio.c 281456 2011-09-02 01:49:45Z $
12 #include <proto/ethernet.h>
13 #include <proto/802.1d.h>
14 #include <proto/802.11.h>
16 #include <linux/inet.h>
18 void dhd_blog(char *cp, int size)
20 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29))
21 static struct socket * _udpSocket = NULL;
22 struct sockaddr_in _saAddr;
25 if (sock_create(PF_INET, SOCK_DGRAM, IPPROTO_UDP, &_udpSocket) >= 0)
29 memset(&_saAddr, 0, sizeof(_saAddr));
30 _saAddr.sin_family = AF_INET;
31 _saAddr.sin_port = htons(7651);
32 _saAddr.sin_addr.s_addr = in_aton("10.19.74.43");
37 msg.msg_name = &_saAddr;
38 msg.msg_namelen = sizeof(struct sockaddr_in);
41 msg.msg_control = NULL;
42 msg.msg_controllen = 0;
46 mm_segment_t fs = get_fs();
49 sock_sendmsg(_udpSocket, &msg, size);
55 sock_release(_udpSocket);
57 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)) */