提交 0dc47877 编写于 作者: H Harvey Harrison 提交者: David S. Miller

net: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6387c4be
...@@ -171,7 +171,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, ...@@ -171,7 +171,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
skb->dev = __find_vlan_dev(dev, vid); skb->dev = __find_vlan_dev(dev, vid);
if (!skb->dev) { if (!skb->dev) {
pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n", pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n",
__FUNCTION__, (unsigned int)vid, dev->name); __func__, (unsigned int)vid, dev->name);
goto err_unlock; goto err_unlock;
} }
...@@ -187,7 +187,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, ...@@ -187,7 +187,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
ntohs(vhdr->h_vlan_TCI)); ntohs(vhdr->h_vlan_TCI));
pr_debug("%s: priority: %u for TCI: %hu\n", pr_debug("%s: priority: %u for TCI: %hu\n",
__FUNCTION__, skb->priority, ntohs(vhdr->h_vlan_TCI)); __func__, skb->priority, ntohs(vhdr->h_vlan_TCI));
switch (skb->pkt_type) { switch (skb->pkt_type) {
case PACKET_BROADCAST: /* Yeah, stats collect these together.. */ case PACKET_BROADCAST: /* Yeah, stats collect these together.. */
...@@ -268,7 +268,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, ...@@ -268,7 +268,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
struct net_device *vdev = dev; struct net_device *vdev = dev;
pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n", pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n",
__FUNCTION__, skb, type, len, vlan_dev_info(dev)->vlan_id, __func__, skb, type, len, vlan_dev_info(dev)->vlan_id,
daddr); daddr);
/* build vlan header only if re_order_header flag is NOT set. This /* build vlan header only if re_order_header flag is NOT set. This
...@@ -340,7 +340,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, ...@@ -340,7 +340,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
return -ENOMEM; return -ENOMEM;
} }
vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++; vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++;
pr_debug("%s: %s: had to grow skb\n", __FUNCTION__, vdev->name); pr_debug("%s: %s: had to grow skb\n", __func__, vdev->name);
} }
if (build_vlan_header) { if (build_vlan_header) {
...@@ -382,7 +382,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -382,7 +382,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
vlan_dev_info(dev)->cnt_encap_on_xmit++; vlan_dev_info(dev)->cnt_encap_on_xmit++;
pr_debug("%s: proto to encap: 0x%hx\n", pr_debug("%s: proto to encap: 0x%hx\n",
__FUNCTION__, htons(veth->h_vlan_proto)); __func__, htons(veth->h_vlan_proto));
/* Construct the second two bytes. This field looks something /* Construct the second two bytes. This field looks something
* like: * like:
* usr_priority: 3 bits (high bits) * usr_priority: 3 bits (high bits)
...@@ -403,7 +403,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -403,7 +403,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
} }
pr_debug("%s: about to send skb: %p to dev: %s\n", pr_debug("%s: about to send skb: %p to dev: %s\n",
__FUNCTION__, skb, skb->dev->name); __func__, skb, skb->dev->name);
pr_debug(" " MAC_FMT " " MAC_FMT " %4hx %4hx %4hx\n", pr_debug(" " MAC_FMT " " MAC_FMT " %4hx %4hx %4hx\n",
veth->h_dest[0], veth->h_dest[1], veth->h_dest[2], veth->h_dest[0], veth->h_dest[1], veth->h_dest[2],
veth->h_dest[3], veth->h_dest[4], veth->h_dest[5], veth->h_dest[3], veth->h_dest[4], veth->h_dest[5],
......
...@@ -168,7 +168,7 @@ int __init vlan_proc_init(void) ...@@ -168,7 +168,7 @@ int __init vlan_proc_init(void)
return 0; return 0;
err: err:
pr_err("%s: can't create entry in proc filesystem!\n", __FUNCTION__); pr_err("%s: can't create entry in proc filesystem!\n", __func__);
vlan_proc_cleanup(); vlan_proc_cleanup();
return -ENOBUFS; return -ENOBUFS;
} }
......
...@@ -230,7 +230,7 @@ int p9_errstr2errno(char *errstr, int len) ...@@ -230,7 +230,7 @@ int p9_errstr2errno(char *errstr, int len)
if (errno == 0) { if (errno == 0) {
/* TODO: if error isn't found, add it dynamically */ /* TODO: if error isn't found, add it dynamically */
errstr[len] = 0; errstr[len] = 0;
printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__, printk(KERN_ERR "%s: errstr :%s: not found\n", __func__,
errstr); errstr);
errno = 1; errno = 1;
} }
......
...@@ -415,21 +415,21 @@ int br_sysfs_addbr(struct net_device *dev) ...@@ -415,21 +415,21 @@ int br_sysfs_addbr(struct net_device *dev)
err = sysfs_create_group(brobj, &bridge_group); err = sysfs_create_group(brobj, &bridge_group);
if (err) { if (err) {
pr_info("%s: can't create group %s/%s\n", pr_info("%s: can't create group %s/%s\n",
__FUNCTION__, dev->name, bridge_group.name); __func__, dev->name, bridge_group.name);
goto out1; goto out1;
} }
err = sysfs_create_bin_file(brobj, &bridge_forward); err = sysfs_create_bin_file(brobj, &bridge_forward);
if (err) { if (err) {
pr_info("%s: can't create attribute file %s/%s\n", pr_info("%s: can't create attribute file %s/%s\n",
__FUNCTION__, dev->name, bridge_forward.attr.name); __func__, dev->name, bridge_forward.attr.name);
goto out2; goto out2;
} }
br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj); br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj);
if (!br->ifobj) { if (!br->ifobj) {
pr_info("%s: can't add kobject (directory) %s/%s\n", pr_info("%s: can't add kobject (directory) %s/%s\n",
__FUNCTION__, dev->name, SYSFS_BRIDGE_PORT_SUBDIR); __func__, dev->name, SYSFS_BRIDGE_PORT_SUBDIR);
goto out3; goto out3;
} }
return 0; return 0;
......
...@@ -981,7 +981,7 @@ void sk_free(struct sock *sk) ...@@ -981,7 +981,7 @@ void sk_free(struct sock *sk)
if (atomic_read(&sk->sk_omem_alloc)) if (atomic_read(&sk->sk_omem_alloc))
printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n", printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n",
__FUNCTION__, atomic_read(&sk->sk_omem_alloc)); __func__, atomic_read(&sk->sk_omem_alloc));
put_net(sk->sk_net); put_net(sk->sk_net);
sk_prot_free(sk->sk_prot_creator, sk); sk_prot_free(sk->sk_prot_creator, sk);
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
* DCCP - specific warning and debugging macros. * DCCP - specific warning and debugging macros.
*/ */
#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \ #define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \
__FUNCTION__, ##a) __func__, ##a)
#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \ #define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
__FILE__, __LINE__, __FUNCTION__) __FILE__, __LINE__, __func__)
#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0) #define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
#define DCCP_BUG_ON(cond) do { if (unlikely((cond) != 0)) \ #define DCCP_BUG_ON(cond) do { if (unlikely((cond) != 0)) \
DCCP_BUG("\"%s\" holds (exception!)", \ DCCP_BUG("\"%s\" holds (exception!)", \
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
printk(fmt, ##args); \ printk(fmt, ##args); \
} while(0) } while(0)
#define DCCP_PR_DEBUG(enable, fmt, a...) DCCP_PRINTK(enable, KERN_DEBUG \ #define DCCP_PR_DEBUG(enable, fmt, a...) DCCP_PRINTK(enable, KERN_DEBUG \
"%s: " fmt, __FUNCTION__, ##a) "%s: " fmt, __func__, ##a)
#ifdef CONFIG_IP_DCCP_DEBUG #ifdef CONFIG_IP_DCCP_DEBUG
extern int dccp_debug; extern int dccp_debug;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
do { \ do { \
if (unlikely(!(expr))) { \ if (unlikely(!(expr))) { \
printkl(KERN_ERR PFX "ASSERTION FAILED (%s) at: %s:%d:%s()\n", #expr, \ printkl(KERN_ERR PFX "ASSERTION FAILED (%s) at: %s:%d:%s()\n", #expr, \
__FILE__, __LINE__, __FUNCTION__); \ __FILE__, __LINE__, __func__); \
} \ } \
} while (0) } while (0)
#else #else
......
...@@ -1060,7 +1060,7 @@ static int inet_sk_reselect_saddr(struct sock *sk) ...@@ -1060,7 +1060,7 @@ static int inet_sk_reselect_saddr(struct sock *sk)
if (sysctl_ip_dynaddr > 1) { if (sysctl_ip_dynaddr > 1) {
printk(KERN_INFO "%s(): shifting inet->" printk(KERN_INFO "%s(): shifting inet->"
"saddr from %d.%d.%d.%d to %d.%d.%d.%d\n", "saddr from %d.%d.%d.%d to %d.%d.%d.%d\n",
__FUNCTION__, __func__,
NIPQUAD(old_saddr), NIPQUAD(old_saddr),
NIPQUAD(new_saddr)); NIPQUAD(new_saddr));
} }
......
...@@ -550,7 +550,7 @@ tcp_app_conn_bind(struct ip_vs_conn *cp) ...@@ -550,7 +550,7 @@ tcp_app_conn_bind(struct ip_vs_conn *cp)
IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->" IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
"%u.%u.%u.%u:%u to app %s on port %u\n", "%u.%u.%u.%u:%u to app %s on port %u\n",
__FUNCTION__, __func__,
NIPQUAD(cp->caddr), ntohs(cp->cport), NIPQUAD(cp->caddr), ntohs(cp->cport),
NIPQUAD(cp->vaddr), ntohs(cp->vport), NIPQUAD(cp->vaddr), ntohs(cp->vport),
inc->name, ntohs(inc->port)); inc->name, ntohs(inc->port));
......
...@@ -344,7 +344,7 @@ static int udp_app_conn_bind(struct ip_vs_conn *cp) ...@@ -344,7 +344,7 @@ static int udp_app_conn_bind(struct ip_vs_conn *cp)
IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->" IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
"%u.%u.%u.%u:%u to app %s on port %u\n", "%u.%u.%u.%u:%u to app %s on port %u\n",
__FUNCTION__, __func__,
NIPQUAD(cp->caddr), ntohs(cp->cport), NIPQUAD(cp->caddr), ntohs(cp->cport),
NIPQUAD(cp->vaddr), ntohs(cp->vport), NIPQUAD(cp->vaddr), ntohs(cp->vport),
inc->name, ntohs(inc->port)); inc->name, ntohs(inc->port));
......
...@@ -916,7 +916,7 @@ int start_sync_thread(int state, char *mcast_ifn, __u8 syncid) ...@@ -916,7 +916,7 @@ int start_sync_thread(int state, char *mcast_ifn, __u8 syncid)
if (!tinfo) if (!tinfo)
return -ENOMEM; return -ENOMEM;
IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current)); IP_VS_DBG(7, "%s: pid %d\n", __func__, task_pid_nr(current));
IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n", IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n",
sizeof(struct ip_vs_sync_conn)); sizeof(struct ip_vs_sync_conn));
...@@ -956,7 +956,7 @@ int stop_sync_thread(int state) ...@@ -956,7 +956,7 @@ int stop_sync_thread(int state)
(state == IP_VS_STATE_BACKUP && !sync_backup_pid)) (state == IP_VS_STATE_BACKUP && !sync_backup_pid))
return -ESRCH; return -ESRCH;
IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current)); IP_VS_DBG(7, "%s: pid %d\n", __func__, task_pid_nr(current));
IP_VS_INFO("stopping sync thread %d ...\n", IP_VS_INFO("stopping sync thread %d ...\n",
(state == IP_VS_STATE_MASTER) ? (state == IP_VS_STATE_MASTER) ?
sync_master_pid : sync_backup_pid); sync_master_pid : sync_backup_pid);
......
...@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("arptables core"); ...@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("arptables core");
do { \ do { \
if (!(x)) \ if (!(x)) \
printk("ARP_NF_ASSERT: %s:%s:%u\n", \ printk("ARP_NF_ASSERT: %s:%s:%u\n", \
__FUNCTION__, __FILE__, __LINE__); \ __func__, __FILE__, __LINE__); \
} while(0) } while(0)
#else #else
#define ARP_NF_ASSERT(x) #define ARP_NF_ASSERT(x)
......
...@@ -53,7 +53,7 @@ MODULE_DESCRIPTION("IPv4 packet filter"); ...@@ -53,7 +53,7 @@ MODULE_DESCRIPTION("IPv4 packet filter");
do { \ do { \
if (!(x)) \ if (!(x)) \
printk("IP_NF_ASSERT: %s:%s:%u\n", \ printk("IP_NF_ASSERT: %s:%s:%u\n", \
__FUNCTION__, __FILE__, __LINE__); \ __func__, __FILE__, __LINE__); \
} while(0) } while(0)
#else #else
#define IP_NF_ASSERT(x) #define IP_NF_ASSERT(x)
......
...@@ -3561,7 +3561,7 @@ static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) ...@@ -3561,7 +3561,7 @@ static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
* cases we should never reach this piece of code. * cases we should never reach this piece of code.
*/ */
printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n", printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n",
__FUNCTION__, sk->sk_state); __func__, sk->sk_state);
break; break;
} }
......
...@@ -106,14 +106,14 @@ void __init udplite4_register(void) ...@@ -106,14 +106,14 @@ void __init udplite4_register(void)
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
if (udp_proc_register(&udplite4_seq_afinfo)) /* udplite4_proc_init() */ if (udp_proc_register(&udplite4_seq_afinfo)) /* udplite4_proc_init() */
printk(KERN_ERR "%s: Cannot register /proc!\n", __FUNCTION__); printk(KERN_ERR "%s: Cannot register /proc!\n", __func__);
#endif #endif
return; return;
out_unregister_proto: out_unregister_proto:
proto_unregister(&udplite_prot); proto_unregister(&udplite_prot);
out_register_err: out_register_err:
printk(KERN_CRIT "%s: Cannot add UDP-Lite protocol.\n", __FUNCTION__); printk(KERN_CRIT "%s: Cannot add UDP-Lite protocol.\n", __func__);
} }
EXPORT_SYMBOL(udplite_hash); EXPORT_SYMBOL(udplite_hash);
......
...@@ -349,7 +349,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) ...@@ -349,7 +349,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
if (snmp6_alloc_dev(ndev) < 0) { if (snmp6_alloc_dev(ndev) < 0) {
ADBG((KERN_WARNING ADBG((KERN_WARNING
"%s(): cannot allocate memory for statistics; dev=%s.\n", "%s(): cannot allocate memory for statistics; dev=%s.\n",
__FUNCTION__, dev->name)); __func__, dev->name));
neigh_parms_release(&nd_tbl, ndev->nd_parms); neigh_parms_release(&nd_tbl, ndev->nd_parms);
ndev->dead = 1; ndev->dead = 1;
in6_dev_finish_destroy(ndev); in6_dev_finish_destroy(ndev);
...@@ -359,7 +359,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) ...@@ -359,7 +359,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
if (snmp6_register_dev(ndev) < 0) { if (snmp6_register_dev(ndev) < 0) {
ADBG((KERN_WARNING ADBG((KERN_WARNING
"%s(): cannot create /proc/net/dev_snmp6/%s\n", "%s(): cannot create /proc/net/dev_snmp6/%s\n",
__FUNCTION__, dev->name)); __func__, dev->name));
neigh_parms_release(&nd_tbl, ndev->nd_parms); neigh_parms_release(&nd_tbl, ndev->nd_parms);
ndev->dead = 1; ndev->dead = 1;
in6_dev_finish_destroy(ndev); in6_dev_finish_destroy(ndev);
......
...@@ -166,7 +166,7 @@ u32 ipv6_addr_label(const struct in6_addr *addr, int type, int ifindex) ...@@ -166,7 +166,7 @@ u32 ipv6_addr_label(const struct in6_addr *addr, int type, int ifindex)
rcu_read_unlock(); rcu_read_unlock();
ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n", ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n",
__FUNCTION__, __func__,
NIP6(*addr), type, ifindex, NIP6(*addr), type, ifindex,
label); label);
...@@ -182,7 +182,7 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(const struct in6_addr *prefix, ...@@ -182,7 +182,7 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(const struct in6_addr *prefix,
int addrtype; int addrtype;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n", ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n",
__FUNCTION__, __func__,
NIP6(*prefix), prefixlen, NIP6(*prefix), prefixlen,
ifindex, ifindex,
(unsigned int)label); (unsigned int)label);
...@@ -226,7 +226,7 @@ static int __ip6addrlbl_add(struct ip6addrlbl_entry *newp, int replace) ...@@ -226,7 +226,7 @@ static int __ip6addrlbl_add(struct ip6addrlbl_entry *newp, int replace)
int ret = 0; int ret = 0;
ADDRLABEL(KERN_DEBUG "%s(newp=%p, replace=%d)\n", ADDRLABEL(KERN_DEBUG "%s(newp=%p, replace=%d)\n",
__FUNCTION__, __func__,
newp, replace); newp, replace);
if (hlist_empty(&ip6addrlbl_table.head)) { if (hlist_empty(&ip6addrlbl_table.head)) {
...@@ -268,7 +268,7 @@ static int ip6addrlbl_add(const struct in6_addr *prefix, int prefixlen, ...@@ -268,7 +268,7 @@ static int ip6addrlbl_add(const struct in6_addr *prefix, int prefixlen,
int ret = 0; int ret = 0;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n", ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n",
__FUNCTION__, __func__,
NIP6(*prefix), prefixlen, NIP6(*prefix), prefixlen,
ifindex, ifindex,
(unsigned int)label, (unsigned int)label,
...@@ -294,7 +294,7 @@ static int __ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen, ...@@ -294,7 +294,7 @@ static int __ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen,
int ret = -ESRCH; int ret = -ESRCH;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n", ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
__FUNCTION__, __func__,
NIP6(*prefix), prefixlen, NIP6(*prefix), prefixlen,
ifindex); ifindex);
...@@ -318,7 +318,7 @@ static int ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen, ...@@ -318,7 +318,7 @@ static int ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen,
int ret; int ret;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n", ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
__FUNCTION__, __func__,
NIP6(*prefix), prefixlen, NIP6(*prefix), prefixlen,
ifindex); ifindex);
...@@ -335,7 +335,7 @@ static __init int ip6addrlbl_init(void) ...@@ -335,7 +335,7 @@ static __init int ip6addrlbl_init(void)
int err = 0; int err = 0;
int i; int i;
ADDRLABEL(KERN_DEBUG "%s()\n", __FUNCTION__); ADDRLABEL(KERN_DEBUG "%s()\n", __func__);
for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) { for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) {
int ret = ip6addrlbl_add(ip6addrlbl_init_table[i].prefix, int ret = ip6addrlbl_add(ip6addrlbl_init_table[i].prefix,
......
...@@ -60,7 +60,7 @@ MODULE_LICENSE("GPL"); ...@@ -60,7 +60,7 @@ MODULE_LICENSE("GPL");
#define IPV6_TLV_TEL_DST_SIZE 8 #define IPV6_TLV_TEL_DST_SIZE 8
#ifdef IP6_TNL_DEBUG #ifdef IP6_TNL_DEBUG
#define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __FUNCTION__) #define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __func__)
#else #else
#define IP6_TNL_TRACE(x...) do {;} while(0) #define IP6_TNL_TRACE(x...) do {;} while(0)
#endif #endif
......
...@@ -304,13 +304,13 @@ static int mip6_destopt_offset(struct xfrm_state *x, struct sk_buff *skb, ...@@ -304,13 +304,13 @@ static int mip6_destopt_offset(struct xfrm_state *x, struct sk_buff *skb,
static int mip6_destopt_init_state(struct xfrm_state *x) static int mip6_destopt_init_state(struct xfrm_state *x)
{ {
if (x->id.spi) { if (x->id.spi) {
printk(KERN_INFO "%s: spi is not 0: %u\n", __FUNCTION__, printk(KERN_INFO "%s: spi is not 0: %u\n", __func__,
x->id.spi); x->id.spi);
return -EINVAL; return -EINVAL;
} }
if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
printk(KERN_INFO "%s: state's mode is not %u: %u\n", printk(KERN_INFO "%s: state's mode is not %u: %u\n",
__FUNCTION__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
return -EINVAL; return -EINVAL;
} }
...@@ -439,13 +439,13 @@ static int mip6_rthdr_offset(struct xfrm_state *x, struct sk_buff *skb, ...@@ -439,13 +439,13 @@ static int mip6_rthdr_offset(struct xfrm_state *x, struct sk_buff *skb,
static int mip6_rthdr_init_state(struct xfrm_state *x) static int mip6_rthdr_init_state(struct xfrm_state *x)
{ {
if (x->id.spi) { if (x->id.spi) {
printk(KERN_INFO "%s: spi is not 0: %u\n", __FUNCTION__, printk(KERN_INFO "%s: spi is not 0: %u\n", __func__,
x->id.spi); x->id.spi);
return -EINVAL; return -EINVAL;
} }
if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
printk(KERN_INFO "%s: state's mode is not %u: %u\n", printk(KERN_INFO "%s: state's mode is not %u: %u\n",
__FUNCTION__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
return -EINVAL; return -EINVAL;
} }
...@@ -480,15 +480,15 @@ static int __init mip6_init(void) ...@@ -480,15 +480,15 @@ static int __init mip6_init(void)
printk(KERN_INFO "Mobile IPv6\n"); printk(KERN_INFO "Mobile IPv6\n");
if (xfrm_register_type(&mip6_destopt_type, AF_INET6) < 0) { if (xfrm_register_type(&mip6_destopt_type, AF_INET6) < 0) {
printk(KERN_INFO "%s: can't add xfrm type(destopt)\n", __FUNCTION__); printk(KERN_INFO "%s: can't add xfrm type(destopt)\n", __func__);
goto mip6_destopt_xfrm_fail; goto mip6_destopt_xfrm_fail;
} }
if (xfrm_register_type(&mip6_rthdr_type, AF_INET6) < 0) { if (xfrm_register_type(&mip6_rthdr_type, AF_INET6) < 0) {
printk(KERN_INFO "%s: can't add xfrm type(rthdr)\n", __FUNCTION__); printk(KERN_INFO "%s: can't add xfrm type(rthdr)\n", __func__);
goto mip6_rthdr_xfrm_fail; goto mip6_rthdr_xfrm_fail;
} }
if (rawv6_mh_filter_register(mip6_mh_filter) < 0) { if (rawv6_mh_filter_register(mip6_mh_filter) < 0) {
printk(KERN_INFO "%s: can't add rawv6 mh filter\n", __FUNCTION__); printk(KERN_INFO "%s: can't add rawv6 mh filter\n", __func__);
goto mip6_rawv6_mh_fail; goto mip6_rawv6_mh_fail;
} }
...@@ -506,11 +506,11 @@ static int __init mip6_init(void) ...@@ -506,11 +506,11 @@ static int __init mip6_init(void)
static void __exit mip6_fini(void) static void __exit mip6_fini(void)
{ {
if (rawv6_mh_filter_unregister(mip6_mh_filter) < 0) if (rawv6_mh_filter_unregister(mip6_mh_filter) < 0)
printk(KERN_INFO "%s: can't remove rawv6 mh filter\n", __FUNCTION__); printk(KERN_INFO "%s: can't remove rawv6 mh filter\n", __func__);
if (xfrm_unregister_type(&mip6_rthdr_type, AF_INET6) < 0) if (xfrm_unregister_type(&mip6_rthdr_type, AF_INET6) < 0)
printk(KERN_INFO "%s: can't remove xfrm type(rthdr)\n", __FUNCTION__); printk(KERN_INFO "%s: can't remove xfrm type(rthdr)\n", __func__);
if (xfrm_unregister_type(&mip6_destopt_type, AF_INET6) < 0) if (xfrm_unregister_type(&mip6_destopt_type, AF_INET6) < 0)
printk(KERN_INFO "%s: can't remove xfrm type(destopt)\n", __FUNCTION__); printk(KERN_INFO "%s: can't remove xfrm type(destopt)\n", __func__);
} }
module_init(mip6_init); module_init(mip6_init);
......
...@@ -270,7 +270,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, ...@@ -270,7 +270,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) { if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) {
ND_PRINTK2(KERN_WARNING ND_PRINTK2(KERN_WARNING
"%s(): duplicated ND6 option found: type=%d\n", "%s(): duplicated ND6 option found: type=%d\n",
__FUNCTION__, __func__,
nd_opt->nd_opt_type); nd_opt->nd_opt_type);
} else { } else {
ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt; ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
...@@ -301,7 +301,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, ...@@ -301,7 +301,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
*/ */
ND_PRINTK2(KERN_NOTICE ND_PRINTK2(KERN_NOTICE
"%s(): ignored unsupported option; type=%d, len=%d\n", "%s(): ignored unsupported option; type=%d, len=%d\n",
__FUNCTION__, __func__,
nd_opt->nd_opt_type, nd_opt->nd_opt_len); nd_opt->nd_opt_type, nd_opt->nd_opt_len);
} }
} }
...@@ -484,7 +484,7 @@ static void __ndisc_send(struct net_device *dev, ...@@ -484,7 +484,7 @@ static void __ndisc_send(struct net_device *dev,
if (!skb) { if (!skb) {
ND_PRINTK0(KERN_ERR ND_PRINTK0(KERN_ERR
"ICMPv6 ND: %s() failed to allocate an skb.\n", "ICMPv6 ND: %s() failed to allocate an skb.\n",
__FUNCTION__); __func__);
dst_release(dst); dst_release(dst);
return; return;
} }
...@@ -647,7 +647,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb) ...@@ -647,7 +647,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
ND_PRINTK1(KERN_DEBUG ND_PRINTK1(KERN_DEBUG
"%s(): trying to ucast probe in NUD_INVALID: " "%s(): trying to ucast probe in NUD_INVALID: "
NIP6_FMT "\n", NIP6_FMT "\n",
__FUNCTION__, __func__,
NIP6(*target)); NIP6(*target));
} }
ndisc_send_ns(dev, neigh, target, target, saddr); ndisc_send_ns(dev, neigh, target, target, saddr);
...@@ -1149,7 +1149,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) ...@@ -1149,7 +1149,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
if (rt == NULL) { if (rt == NULL) {
ND_PRINTK0(KERN_ERR ND_PRINTK0(KERN_ERR
"ICMPv6 RA: %s() failed to add default route.\n", "ICMPv6 RA: %s() failed to add default route.\n",
__FUNCTION__); __func__);
in6_dev_put(in6_dev); in6_dev_put(in6_dev);
return; return;
} }
...@@ -1158,7 +1158,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) ...@@ -1158,7 +1158,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
if (neigh == NULL) { if (neigh == NULL) {
ND_PRINTK0(KERN_ERR ND_PRINTK0(KERN_ERR
"ICMPv6 RA: %s() got default router without neighbour.\n", "ICMPv6 RA: %s() got default router without neighbour.\n",
__FUNCTION__); __func__);
dst_release(&rt->u.dst); dst_release(&rt->u.dst);
in6_dev_put(in6_dev); in6_dev_put(in6_dev);
return; return;
...@@ -1471,7 +1471,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, ...@@ -1471,7 +1471,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
if (buff == NULL) { if (buff == NULL) {
ND_PRINTK0(KERN_ERR ND_PRINTK0(KERN_ERR
"ICMPv6 Redirect: %s() failed to allocate an skb.\n", "ICMPv6 Redirect: %s() failed to allocate an skb.\n",
__FUNCTION__); __func__);
dst_release(dst); dst_release(dst);
return; return;
} }
......
...@@ -55,7 +55,7 @@ MODULE_DESCRIPTION("IPv6 packet filter"); ...@@ -55,7 +55,7 @@ MODULE_DESCRIPTION("IPv6 packet filter");
do { \ do { \
if (!(x)) \ if (!(x)) \
printk("IP_NF_ASSERT: %s:%s:%u\n", \ printk("IP_NF_ASSERT: %s:%s:%u\n", \
__FUNCTION__, __FILE__, __LINE__); \ __func__, __FILE__, __LINE__); \
} while(0) } while(0)
#else #else
#define IP_NF_ASSERT(x) #define IP_NF_ASSERT(x)
......
...@@ -177,7 +177,7 @@ reject_tg6(struct sk_buff *skb, const struct net_device *in, ...@@ -177,7 +177,7 @@ reject_tg6(struct sk_buff *skb, const struct net_device *in,
{ {
const struct ip6t_reject_info *reject = targinfo; const struct ip6t_reject_info *reject = targinfo;
pr_debug("%s: medium point\n", __FUNCTION__); pr_debug("%s: medium point\n", __func__);
/* WARNING: This code causes reentry within ip6tables. /* WARNING: This code causes reentry within ip6tables.
This means that the ip6tables jump stack is now crap. We This means that the ip6tables jump stack is now crap. We
must return an absolute verdict. --RR */ must return an absolute verdict. --RR */
......
...@@ -410,7 +410,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict) ...@@ -410,7 +410,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict)
struct net *net; struct net *net;
RT6_TRACE("%s(fn->leaf=%p, oif=%d)\n", RT6_TRACE("%s(fn->leaf=%p, oif=%d)\n",
__FUNCTION__, fn->leaf, oif); __func__, fn->leaf, oif);
rt0 = fn->rr_ptr; rt0 = fn->rr_ptr;
if (!rt0) if (!rt0)
...@@ -431,7 +431,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict) ...@@ -431,7 +431,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict)
} }
RT6_TRACE("%s() => %p\n", RT6_TRACE("%s() => %p\n",
__FUNCTION__, match); __func__, match);
net = rt0->rt6i_dev->nd_net; net = rt0->rt6i_dev->nd_net;
return (match ? match : net->ipv6.ip6_null_entry); return (match ? match : net->ipv6.ip6_null_entry);
......
...@@ -753,7 +753,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, ...@@ -753,7 +753,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
hp = tcp_get_md5sig_pool(); hp = tcp_get_md5sig_pool();
if (!hp) { if (!hp) {
printk(KERN_WARNING "%s(): hash pool not found...\n", __FUNCTION__); printk(KERN_WARNING "%s(): hash pool not found...\n", __func__);
goto clear_hash_noput; goto clear_hash_noput;
} }
bp = &hp->md5_blk.ip6; bp = &hp->md5_blk.ip6;
...@@ -793,17 +793,17 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, ...@@ -793,17 +793,17 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
/* Now store the hash into the packet */ /* Now store the hash into the packet */
err = crypto_hash_init(desc); err = crypto_hash_init(desc);
if (err) { if (err) {
printk(KERN_WARNING "%s(): hash_init failed\n", __FUNCTION__); printk(KERN_WARNING "%s(): hash_init failed\n", __func__);
goto clear_hash; goto clear_hash;
} }
err = crypto_hash_update(desc, sg, nbytes); err = crypto_hash_update(desc, sg, nbytes);
if (err) { if (err) {
printk(KERN_WARNING "%s(): hash_update failed\n", __FUNCTION__); printk(KERN_WARNING "%s(): hash_update failed\n", __func__);
goto clear_hash; goto clear_hash;
} }
err = crypto_hash_final(desc, md5_hash); err = crypto_hash_final(desc, md5_hash);
if (err) { if (err) {
printk(KERN_WARNING "%s(): hash_final failed\n", __FUNCTION__); printk(KERN_WARNING "%s(): hash_final failed\n", __func__);
goto clear_hash; goto clear_hash;
} }
......
此差异已折叠。
...@@ -110,7 +110,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log) ...@@ -110,7 +110,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
{ {
discovery_t *discovery; discovery_t *discovery;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
/* /*
* If log is missing this means that IrLAP was unable to perform the * If log is missing this means that IrLAP was unable to perform the
...@@ -157,7 +157,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) ...@@ -157,7 +157,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force)
int i = 0; /* How many we expired */ int i = 0; /* How many we expired */
IRDA_ASSERT(log != NULL, return;); IRDA_ASSERT(log != NULL, return;);
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
spin_lock_irqsave(&log->hb_spinlock, flags); spin_lock_irqsave(&log->hb_spinlock, flags);
......
...@@ -70,7 +70,7 @@ static int __init ircomm_init(void) ...@@ -70,7 +70,7 @@ static int __init ircomm_init(void)
{ {
ircomm = hashbin_new(HB_LOCK); ircomm = hashbin_new(HB_LOCK);
if (ircomm == NULL) { if (ircomm == NULL) {
IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -91,7 +91,7 @@ static int __init ircomm_init(void) ...@@ -91,7 +91,7 @@ static int __init ircomm_init(void)
static void __exit ircomm_cleanup(void) static void __exit ircomm_cleanup(void)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
...@@ -111,7 +111,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) ...@@ -111,7 +111,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
struct ircomm_cb *self = NULL; struct ircomm_cb *self = NULL;
int ret; int ret;
IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ ,
service_type); service_type);
IRDA_ASSERT(ircomm != NULL, return NULL;); IRDA_ASSERT(ircomm != NULL, return NULL;);
...@@ -155,7 +155,7 @@ EXPORT_SYMBOL(ircomm_open); ...@@ -155,7 +155,7 @@ EXPORT_SYMBOL(ircomm_open);
*/ */
static int __ircomm_close(struct ircomm_cb *self) static int __ircomm_close(struct ircomm_cb *self)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Disconnect link if any */ /* Disconnect link if any */
ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
...@@ -191,7 +191,7 @@ int ircomm_close(struct ircomm_cb *self) ...@@ -191,7 +191,7 @@ int ircomm_close(struct ircomm_cb *self)
IRDA_ASSERT(self != NULL, return -EIO;); IRDA_ASSERT(self != NULL, return -EIO;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
entry = hashbin_remove(ircomm, self->line, NULL); entry = hashbin_remove(ircomm, self->line, NULL);
...@@ -216,7 +216,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel, ...@@ -216,7 +216,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
struct ircomm_info info; struct ircomm_info info;
int ret; int ret;
IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2 , "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -245,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -245,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
{ {
int clen = 0; int clen = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Check if the packet contains data on the control channel */ /* Check if the packet contains data on the control channel */
if (skb->len > 0) if (skb->len > 0)
...@@ -261,7 +261,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -261,7 +261,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
info->qos, info->max_data_size, info->qos, info->max_data_size,
info->max_header_size, skb); info->max_header_size, skb);
else { else {
IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
} }
} }
...@@ -278,7 +278,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata) ...@@ -278,7 +278,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
...@@ -296,7 +296,7 @@ EXPORT_SYMBOL(ircomm_connect_response); ...@@ -296,7 +296,7 @@ EXPORT_SYMBOL(ircomm_connect_response);
void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info) struct ircomm_info *info)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
if (self->notify.connect_confirm ) if (self->notify.connect_confirm )
self->notify.connect_confirm(self->notify.instance, self->notify.connect_confirm(self->notify.instance,
...@@ -304,7 +304,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -304,7 +304,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
info->max_data_size, info->max_data_size,
info->max_header_size, skb); info->max_header_size, skb);
else { else {
IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
} }
} }
...@@ -318,7 +318,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -318,7 +318,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
{ {
int ret; int ret;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -EFAULT;); IRDA_ASSERT(self != NULL, return -EFAULT;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
...@@ -339,14 +339,14 @@ EXPORT_SYMBOL(ircomm_data_request); ...@@ -339,14 +339,14 @@ EXPORT_SYMBOL(ircomm_data_request);
*/ */
void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(skb->len > 0, return;); IRDA_ASSERT(skb->len > 0, return;);
if (self->notify.data_indication) if (self->notify.data_indication)
self->notify.data_indication(self->notify.instance, self, skb); self->notify.data_indication(self->notify.instance, self, skb);
else { else {
IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
} }
} }
...@@ -372,7 +372,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -372,7 +372,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
*/ */
if (unlikely(skb->len < (clen + 1))) { if (unlikely(skb->len < (clen + 1))) {
IRDA_DEBUG(2, "%s() throwing away illegal frame\n", IRDA_DEBUG(2, "%s() throwing away illegal frame\n",
__FUNCTION__ ); __func__ );
return; return;
} }
...@@ -391,7 +391,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -391,7 +391,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
ircomm_data_indication(self, skb); ircomm_data_indication(self, skb);
else { else {
IRDA_DEBUG(4, "%s(), data was control info only!\n", IRDA_DEBUG(4, "%s(), data was control info only!\n",
__FUNCTION__ ); __func__ );
} }
} }
...@@ -405,7 +405,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -405,7 +405,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
{ {
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -EFAULT;); IRDA_ASSERT(self != NULL, return -EFAULT;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
...@@ -427,7 +427,7 @@ EXPORT_SYMBOL(ircomm_control_request); ...@@ -427,7 +427,7 @@ EXPORT_SYMBOL(ircomm_control_request);
static void ircomm_control_indication(struct ircomm_cb *self, static void ircomm_control_indication(struct ircomm_cb *self,
struct sk_buff *skb, int clen) struct sk_buff *skb, int clen)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Use udata for delivering data on the control channel */ /* Use udata for delivering data on the control channel */
if (self->notify.udata_indication) { if (self->notify.udata_indication) {
...@@ -448,7 +448,7 @@ static void ircomm_control_indication(struct ircomm_cb *self, ...@@ -448,7 +448,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
* see ircomm_tty_control_indication(). */ * see ircomm_tty_control_indication(). */
dev_kfree_skb(ctrl_skb); dev_kfree_skb(ctrl_skb);
} else { } else {
IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
} }
} }
...@@ -463,7 +463,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata) ...@@ -463,7 +463,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
struct ircomm_info info; struct ircomm_info info;
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -484,7 +484,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request); ...@@ -484,7 +484,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request);
void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info) struct ircomm_info *info)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(info != NULL, return;); IRDA_ASSERT(info != NULL, return;);
...@@ -492,7 +492,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -492,7 +492,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
self->notify.disconnect_indication(self->notify.instance, self, self->notify.disconnect_indication(self->notify.instance, self,
info->reason, skb); info->reason, skb);
} else { } else {
IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
} }
} }
...@@ -504,7 +504,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -504,7 +504,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
*/ */
void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
......
...@@ -108,7 +108,7 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -108,7 +108,7 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_connect_indication(self, skb, info); ircomm_connect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(4, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -138,7 +138,7 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -138,7 +138,7 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_disconnect_indication(self, skb, info); ircomm_disconnect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -171,7 +171,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -171,7 +171,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_disconnect_indication(self, skb, info); ircomm_disconnect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -213,7 +213,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -213,7 +213,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
ret = self->issue.disconnect_request(self, skb, info); ret = self->issue.disconnect_request(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
ircomm_event[event]); ircomm_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -229,7 +229,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -229,7 +229,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
struct sk_buff *skb, struct ircomm_info *info) struct sk_buff *skb, struct ircomm_info *info)
{ {
IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __FUNCTION__ , IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __func__ ,
ircomm_state[self->state], ircomm_event[event]); ircomm_state[self->state], ircomm_event[event]);
return (*state[self->state])(self, event, skb, info); return (*state[self->state])(self, event, skb, info);
...@@ -245,6 +245,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state) ...@@ -245,6 +245,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state)
{ {
self->state = state; self->state = state;
IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __FUNCTION__ , IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __func__ ,
ircomm_state[self->state], self->service_type); ircomm_state[self->state], self->service_type);
} }
...@@ -53,7 +53,7 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self, ...@@ -53,7 +53,7 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
/* Don't forget to refcount it - should be NULL anyway */ /* Don't forget to refcount it - should be NULL anyway */
if(userdata) if(userdata)
...@@ -76,7 +76,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self, ...@@ -76,7 +76,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self,
struct sk_buff *tx_skb; struct sk_buff *tx_skb;
int ret; int ret;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
/* Any userdata supplied? */ /* Any userdata supplied? */
if (userdata == NULL) { if (userdata == NULL) {
...@@ -111,7 +111,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, ...@@ -111,7 +111,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self,
struct sk_buff *tx_skb; struct sk_buff *tx_skb;
int ret; int ret;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
if (!userdata) { if (!userdata) {
tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
...@@ -148,13 +148,13 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) ...@@ -148,13 +148,13 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
cb = (struct irda_skb_cb *) skb->cb; cb = (struct irda_skb_cb *) skb->cb;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
line = cb->line; line = cb->line;
self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
if (!self) { if (!self) {
IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ );
return; return;
} }
...@@ -164,7 +164,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) ...@@ -164,7 +164,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
self->pkt_count--; self->pkt_count--;
if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) {
IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __func__ );
self->flow_status = FLOW_START; self->flow_status = FLOW_START;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
...@@ -191,7 +191,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, ...@@ -191,7 +191,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
cb->line = self->line; cb->line = self->line;
IRDA_DEBUG(4, "%s(), sending frame\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s(), sending frame\n", __func__ );
/* Don't forget to refcount it - see ircomm_tty_do_softint() */ /* Don't forget to refcount it - see ircomm_tty_do_softint() */
skb_get(skb); skb_get(skb);
...@@ -199,7 +199,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, ...@@ -199,7 +199,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
skb->destructor = ircomm_lmp_flow_control; skb->destructor = ircomm_lmp_flow_control;
if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __func__ );
self->flow_status = FLOW_STOP; self->flow_status = FLOW_STOP;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
...@@ -207,7 +207,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, ...@@ -207,7 +207,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
} }
ret = irlmp_data_request(self->lsap, skb); ret = irlmp_data_request(self->lsap, skb);
if (ret) { if (ret) {
IRDA_ERROR("%s(), failed\n", __FUNCTION__); IRDA_ERROR("%s(), failed\n", __func__);
/* irlmp_data_request already free the packet */ /* irlmp_data_request already free the packet */
} }
...@@ -225,7 +225,7 @@ static int ircomm_lmp_data_indication(void *instance, void *sap, ...@@ -225,7 +225,7 @@ static int ircomm_lmp_data_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -255,7 +255,7 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap, ...@@ -255,7 +255,7 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -288,7 +288,7 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap, ...@@ -288,7 +288,7 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *)instance; struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -318,7 +318,7 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap, ...@@ -318,7 +318,7 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -341,7 +341,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) ...@@ -341,7 +341,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
/* Register callbacks */ /* Register callbacks */
irda_notify_init(&notify); irda_notify_init(&notify);
...@@ -354,7 +354,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) ...@@ -354,7 +354,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0); self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
if (!self->lsap) { if (!self->lsap) {
IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ ); IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ );
return -1; return -1;
} }
self->slsap_sel = self->lsap->slsap_sel; self->slsap_sel = self->lsap->slsap_sel;
......
...@@ -103,7 +103,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -103,7 +103,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
struct sk_buff *skb; struct sk_buff *skb;
int count; int count;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
...@@ -136,7 +136,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -136,7 +136,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
count = irda_param_insert(self, pi, skb_tail_pointer(skb), count = irda_param_insert(self, pi, skb_tail_pointer(skb),
skb_tailroom(skb), &ircomm_param_info); skb_tailroom(skb), &ircomm_param_info);
if (count < 0) { if (count < 0) {
IRDA_WARNING("%s(), no room for parameter!\n", __FUNCTION__); IRDA_WARNING("%s(), no room for parameter!\n", __func__);
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
return -1; return -1;
} }
...@@ -144,7 +144,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -144,7 +144,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(2, "%s(), skb->len=%d\n", __FUNCTION__ , skb->len); IRDA_DEBUG(2, "%s(), skb->len=%d\n", __func__ , skb->len);
if (flush) { if (flush) {
/* ircomm_tty_do_softint will take care of the rest */ /* ircomm_tty_do_softint will take care of the rest */
...@@ -179,10 +179,10 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, ...@@ -179,10 +179,10 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
service_type &= self->service_type; service_type &= self->service_type;
if (!service_type) { if (!service_type) {
IRDA_DEBUG(2, IRDA_DEBUG(2,
"%s(), No common service type to use!\n", __FUNCTION__ ); "%s(), No common service type to use!\n", __func__ );
return -1; return -1;
} }
IRDA_DEBUG(0, "%s(), services in common=%02x\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ ,
service_type); service_type);
/* /*
...@@ -197,7 +197,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, ...@@ -197,7 +197,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
else if (service_type & IRCOMM_3_WIRE_RAW) else if (service_type & IRCOMM_3_WIRE_RAW)
self->settings.service_type = IRCOMM_3_WIRE_RAW; self->settings.service_type = IRCOMM_3_WIRE_RAW;
IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __func__ ,
self->settings.service_type); self->settings.service_type);
/* /*
...@@ -240,7 +240,7 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get) ...@@ -240,7 +240,7 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get)
else { else {
self->settings.port_type = (__u8) param->pv.i; self->settings.port_type = (__u8) param->pv.i;
IRDA_DEBUG(0, "%s(), port type=%d\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), port type=%d\n", __func__ ,
self->settings.port_type); self->settings.port_type);
} }
return 0; return 0;
...@@ -260,9 +260,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get) ...@@ -260,9 +260,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get)
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get) { if (get) {
IRDA_DEBUG(0, "%s(), not imp!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), not imp!\n", __func__ );
} else { } else {
IRDA_DEBUG(0, "%s(), port-name=%s\n", __FUNCTION__ , param->pv.c); IRDA_DEBUG(0, "%s(), port-name=%s\n", __func__ , param->pv.c);
strncpy(self->settings.port_name, param->pv.c, 32); strncpy(self->settings.port_name, param->pv.c, 32);
} }
...@@ -287,7 +287,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get) ...@@ -287,7 +287,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get)
else else
self->settings.data_rate = param->pv.i; self->settings.data_rate = param->pv.i;
IRDA_DEBUG(2, "%s(), data rate = %d\n", __FUNCTION__ , param->pv.i); IRDA_DEBUG(2, "%s(), data rate = %d\n", __func__ , param->pv.i);
return 0; return 0;
} }
...@@ -333,7 +333,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param, ...@@ -333,7 +333,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param,
else else
self->settings.flow_control = (__u8) param->pv.i; self->settings.flow_control = (__u8) param->pv.i;
IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i); IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __func__ , (__u8) param->pv.i);
return 0; return 0;
} }
...@@ -359,7 +359,7 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get) ...@@ -359,7 +359,7 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get)
self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; self->settings.xonxoff[1] = (__u16) param->pv.i >> 8;
} }
IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ ,
param->pv.i & 0xff, param->pv.i >> 8); param->pv.i & 0xff, param->pv.i >> 8);
return 0; return 0;
...@@ -386,7 +386,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) ...@@ -386,7 +386,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
self->settings.enqack[1] = (__u16) param->pv.i >> 8; self->settings.enqack[1] = (__u16) param->pv.i >> 8;
} }
IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __FUNCTION__ , IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ ,
param->pv.i & 0xff, param->pv.i >> 8); param->pv.i & 0xff, param->pv.i >> 8);
return 0; return 0;
...@@ -401,7 +401,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) ...@@ -401,7 +401,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
static int ircomm_param_line_status(void *instance, irda_param_t *param, static int ircomm_param_line_status(void *instance, irda_param_t *param,
int get) int get)
{ {
IRDA_DEBUG(2, "%s(), not impl.\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), not impl.\n", __func__ );
return 0; return 0;
} }
...@@ -462,7 +462,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) ...@@ -462,7 +462,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
__u8 dce; __u8 dce;
IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i); IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __func__ , (__u8) param->pv.i);
dce = (__u8) param->pv.i; dce = (__u8) param->pv.i;
...@@ -474,7 +474,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) ...@@ -474,7 +474,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
/* Check if any of the settings have changed */ /* Check if any of the settings have changed */
if (dce & 0x0f) { if (dce & 0x0f) {
if (dce & IRCOMM_DELTA_CTS) { if (dce & IRCOMM_DELTA_CTS) {
IRDA_DEBUG(2, "%s(), CTS \n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), CTS \n", __func__ );
} }
} }
......
...@@ -78,7 +78,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) ...@@ -78,7 +78,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
/* Register callbacks */ /* Register callbacks */
irda_notify_init(&notify); irda_notify_init(&notify);
...@@ -93,7 +93,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) ...@@ -93,7 +93,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT,
&notify); &notify);
if (!self->tsap) { if (!self->tsap) {
IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __FUNCTION__ ); IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ );
return -1; return -1;
} }
self->slsap_sel = self->tsap->stsap_sel; self->slsap_sel = self->tsap->stsap_sel;
...@@ -121,7 +121,7 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self, ...@@ -121,7 +121,7 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
/* Don't forget to refcount it - should be NULL anyway */ /* Don't forget to refcount it - should be NULL anyway */
if(userdata) if(userdata)
...@@ -145,7 +145,7 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self, ...@@ -145,7 +145,7 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self,
{ {
int ret; int ret;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
/* Don't forget to refcount it - should be NULL anyway */ /* Don't forget to refcount it - should be NULL anyway */
if(userdata) if(userdata)
...@@ -173,7 +173,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self, ...@@ -173,7 +173,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
IRDA_ASSERT(skb != NULL, return -1;); IRDA_ASSERT(skb != NULL, return -1;);
IRDA_DEBUG(2, "%s(), clen=%d\n", __FUNCTION__ , clen); IRDA_DEBUG(2, "%s(), clen=%d\n", __func__ , clen);
/* /*
* Insert clen field, currently we either send data only, or control * Insert clen field, currently we either send data only, or control
...@@ -190,7 +190,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self, ...@@ -190,7 +190,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
ret = irttp_data_request(self->tsap, skb); ret = irttp_data_request(self->tsap, skb);
if (ret) { if (ret) {
IRDA_ERROR("%s(), failed\n", __FUNCTION__); IRDA_ERROR("%s(), failed\n", __func__);
/* irttp_data_request already free the packet */ /* irttp_data_request already free the packet */
} }
...@@ -208,7 +208,7 @@ static int ircomm_ttp_data_indication(void *instance, void *sap, ...@@ -208,7 +208,7 @@ static int ircomm_ttp_data_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -231,7 +231,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap, ...@@ -231,7 +231,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -240,7 +240,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap, ...@@ -240,7 +240,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
if (max_sdu_size != TTP_SAR_DISABLE) { if (max_sdu_size != TTP_SAR_DISABLE) {
IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
__FUNCTION__); __func__);
goto out; goto out;
} }
...@@ -272,7 +272,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap, ...@@ -272,7 +272,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *)instance; struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -281,7 +281,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap, ...@@ -281,7 +281,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
if (max_sdu_size != TTP_SAR_DISABLE) { if (max_sdu_size != TTP_SAR_DISABLE) {
IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
__FUNCTION__); __func__);
goto out; goto out;
} }
...@@ -331,7 +331,7 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap, ...@@ -331,7 +331,7 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -356,7 +356,7 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap, ...@@ -356,7 +356,7 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
......
...@@ -115,7 +115,7 @@ static int __init ircomm_tty_init(void) ...@@ -115,7 +115,7 @@ static int __init ircomm_tty_init(void)
return -ENOMEM; return -ENOMEM;
ircomm_tty = hashbin_new(HB_LOCK); ircomm_tty = hashbin_new(HB_LOCK);
if (ircomm_tty == NULL) { if (ircomm_tty == NULL) {
IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
put_tty_driver(driver); put_tty_driver(driver);
return -ENOMEM; return -ENOMEM;
} }
...@@ -133,7 +133,7 @@ static int __init ircomm_tty_init(void) ...@@ -133,7 +133,7 @@ static int __init ircomm_tty_init(void)
tty_set_operations(driver, &ops); tty_set_operations(driver, &ops);
if (tty_register_driver(driver)) { if (tty_register_driver(driver)) {
IRDA_ERROR("%s(): Couldn't register serial driver\n", IRDA_ERROR("%s(): Couldn't register serial driver\n",
__FUNCTION__); __func__);
put_tty_driver(driver); put_tty_driver(driver);
return -1; return -1;
} }
...@@ -142,7 +142,7 @@ static int __init ircomm_tty_init(void) ...@@ -142,7 +142,7 @@ static int __init ircomm_tty_init(void)
static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -163,12 +163,12 @@ static void __exit ircomm_tty_cleanup(void) ...@@ -163,12 +163,12 @@ static void __exit ircomm_tty_cleanup(void)
{ {
int ret; int ret;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
ret = tty_unregister_driver(driver); ret = tty_unregister_driver(driver);
if (ret) { if (ret) {
IRDA_ERROR("%s(), failed to unregister driver\n", IRDA_ERROR("%s(), failed to unregister driver\n",
__FUNCTION__); __func__);
return; return;
} }
...@@ -187,14 +187,14 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self) ...@@ -187,14 +187,14 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
notify_t notify; notify_t notify;
int ret = -ENODEV; int ret = -ENODEV;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Check if already open */ /* Check if already open */
if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) { if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) {
IRDA_DEBUG(2, "%s(), already open so break out!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), already open so break out!\n", __func__ );
return 0; return 0;
} }
...@@ -224,7 +224,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self) ...@@ -224,7 +224,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
/* Connect IrCOMM link with remote device */ /* Connect IrCOMM link with remote device */
ret = ircomm_tty_attach_cable(self); ret = ircomm_tty_attach_cable(self);
if (ret < 0) { if (ret < 0) {
IRDA_ERROR("%s(), error attaching cable!\n", __FUNCTION__); IRDA_ERROR("%s(), error attaching cable!\n", __func__);
goto err; goto err;
} }
...@@ -249,7 +249,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, ...@@ -249,7 +249,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
unsigned long flags; unsigned long flags;
struct tty_struct *tty; struct tty_struct *tty;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
tty = self->tty; tty = self->tty;
...@@ -260,12 +260,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, ...@@ -260,12 +260,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){ if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){
/* nonblock mode is set or port is not enabled */ /* nonblock mode is set or port is not enabled */
self->flags |= ASYNC_NORMAL_ACTIVE; self->flags |= ASYNC_NORMAL_ACTIVE;
IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __func__ );
return 0; return 0;
} }
if (tty->termios->c_cflag & CLOCAL) { if (tty->termios->c_cflag & CLOCAL) {
IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __func__ );
do_clocal = 1; do_clocal = 1;
} }
...@@ -368,7 +368,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -368,7 +368,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
unsigned long flags; unsigned long flags;
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
line = tty->index; line = tty->index;
if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) { if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
...@@ -381,7 +381,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -381,7 +381,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
/* No, so make new instance */ /* No, so make new instance */
self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
if (self == NULL) { if (self == NULL) {
IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); IRDA_ERROR("%s(), kmalloc failed!\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -420,7 +420,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -420,7 +420,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
self->tty = tty; self->tty = tty;
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver->name, IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name,
self->line, self->open_count); self->line, self->open_count);
/* Not really used by us, but lets do it anyway */ /* Not really used by us, but lets do it anyway */
...@@ -442,7 +442,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -442,7 +442,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) { if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) {
IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n", IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n",
__FUNCTION__); __func__);
return -ERESTARTSYS; return -ERESTARTSYS;
} }
...@@ -460,9 +460,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -460,9 +460,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
/* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */
IRDA_DEBUG(2, "%s(), IrCOMM device\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrCOMM device\n", __func__ );
} else { } else {
IRDA_DEBUG(2, "%s(), IrLPT device\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ );
self->service_type = IRCOMM_3_WIRE_RAW; self->service_type = IRCOMM_3_WIRE_RAW;
self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */
} }
...@@ -474,7 +474,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -474,7 +474,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
ret = ircomm_tty_block_til_ready(self, filp); ret = ircomm_tty_block_til_ready(self, filp);
if (ret) { if (ret) {
IRDA_DEBUG(2, IRDA_DEBUG(2,
"%s(), returning after block_til_ready with %d\n", __FUNCTION__ , "%s(), returning after block_til_ready with %d\n", __func__ ,
ret); ret);
return ret; return ret;
...@@ -493,7 +493,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -493,7 +493,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
if (!tty) if (!tty)
return; return;
...@@ -506,7 +506,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -506,7 +506,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
if (tty_hung_up_p(filp)) { if (tty_hung_up_p(filp)) {
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, "%s(), returning 1\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), returning 1\n", __func__ );
return; return;
} }
...@@ -519,20 +519,20 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -519,20 +519,20 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
* serial port won't be shutdown. * serial port won't be shutdown.
*/ */
IRDA_DEBUG(0, "%s(), bad serial port count; " IRDA_DEBUG(0, "%s(), bad serial port count; "
"tty->count is 1, state->count is %d\n", __FUNCTION__ , "tty->count is 1, state->count is %d\n", __func__ ,
self->open_count); self->open_count);
self->open_count = 1; self->open_count = 1;
} }
if (--self->open_count < 0) { if (--self->open_count < 0) {
IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n", IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n",
__FUNCTION__, self->line, self->open_count); __func__, self->line, self->open_count);
self->open_count = 0; self->open_count = 0;
} }
if (self->open_count) { if (self->open_count) {
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, "%s(), open count > 0\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
return; return;
} }
...@@ -608,7 +608,7 @@ static void ircomm_tty_do_softint(struct work_struct *work) ...@@ -608,7 +608,7 @@ static void ircomm_tty_do_softint(struct work_struct *work)
unsigned long flags; unsigned long flags;
struct sk_buff *skb, *ctrl_skb; struct sk_buff *skb, *ctrl_skb;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if (!self || self->magic != IRCOMM_TTY_MAGIC) if (!self || self->magic != IRCOMM_TTY_MAGIC)
return; return;
...@@ -678,7 +678,7 @@ static int ircomm_tty_write(struct tty_struct *tty, ...@@ -678,7 +678,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
int len = 0; int len = 0;
int size; int size;
IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __FUNCTION__ , count, IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __func__ , count,
tty->hw_stopped); tty->hw_stopped);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -701,7 +701,7 @@ static int ircomm_tty_write(struct tty_struct *tty, ...@@ -701,7 +701,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
* we don't mess up the original "safe skb" (see tx_data_size). * we don't mess up the original "safe skb" (see tx_data_size).
* Jean II */ * Jean II */
if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) {
IRDA_DEBUG(1, "%s() : not initialised\n", __FUNCTION__); IRDA_DEBUG(1, "%s() : not initialised\n", __func__);
#ifdef IRCOMM_NO_TX_BEFORE_INIT #ifdef IRCOMM_NO_TX_BEFORE_INIT
/* We didn't consume anything, TTY will retry */ /* We didn't consume anything, TTY will retry */
return 0; return 0;
...@@ -830,7 +830,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty) ...@@ -830,7 +830,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty)
ret = self->max_data_size; ret = self->max_data_size;
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
} }
IRDA_DEBUG(2, "%s(), ret=%d\n", __FUNCTION__ , ret); IRDA_DEBUG(2, "%s(), ret=%d\n", __func__ , ret);
return ret; return ret;
} }
...@@ -847,7 +847,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -847,7 +847,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
unsigned long orig_jiffies, poll_time; unsigned long orig_jiffies, poll_time;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -882,7 +882,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty) ...@@ -882,7 +882,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty)
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -913,7 +913,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) ...@@ -913,7 +913,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -928,7 +928,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) ...@@ -928,7 +928,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS);
ircomm_param_request(self, IRCOMM_DTE, TRUE); ircomm_param_request(self, IRCOMM_DTE, TRUE);
IRDA_DEBUG(1, "%s(), FLOW_START\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s(), FLOW_START\n", __func__ );
} }
ircomm_flow_request(self->ircomm, FLOW_START); ircomm_flow_request(self->ircomm, FLOW_START);
} }
...@@ -965,7 +965,7 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self) ...@@ -965,7 +965,7 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self)
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
if (!test_and_clear_bit(ASYNC_B_INITIALIZED, &self->flags)) if (!test_and_clear_bit(ASYNC_B_INITIALIZED, &self->flags))
return; return;
...@@ -1008,7 +1008,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty) ...@@ -1008,7 +1008,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -1037,7 +1037,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty) ...@@ -1037,7 +1037,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
*/ */
static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch)
{ {
IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), not impl\n", __func__ );
} }
/* /*
...@@ -1081,7 +1081,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1081,7 +1081,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
struct tty_struct *tty; struct tty_struct *tty;
int status; int status;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -1095,14 +1095,14 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1095,14 +1095,14 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
} }
if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) {
IRDA_DEBUG(2, IRDA_DEBUG(2,
"%s(), ircomm%d CD now %s...\n", __FUNCTION__ , self->line, "%s(), ircomm%d CD now %s...\n", __func__ , self->line,
(status & IRCOMM_CD) ? "on" : "off"); (status & IRCOMM_CD) ? "on" : "off");
if (status & IRCOMM_CD) { if (status & IRCOMM_CD) {
wake_up_interruptible(&self->open_wait); wake_up_interruptible(&self->open_wait);
} else { } else {
IRDA_DEBUG(2, IRDA_DEBUG(2,
"%s(), Doing serial hangup..\n", __FUNCTION__ ); "%s(), Doing serial hangup..\n", __func__ );
if (tty) if (tty)
tty_hangup(tty); tty_hangup(tty);
...@@ -1114,7 +1114,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1114,7 +1114,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
if (tty->hw_stopped) { if (tty->hw_stopped) {
if (status & IRCOMM_CTS) { if (status & IRCOMM_CTS) {
IRDA_DEBUG(2, IRDA_DEBUG(2,
"%s(), CTS tx start...\n", __FUNCTION__ ); "%s(), CTS tx start...\n", __func__ );
tty->hw_stopped = 0; tty->hw_stopped = 0;
/* Wake up processes blocked on open */ /* Wake up processes blocked on open */
...@@ -1126,7 +1126,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1126,7 +1126,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
} else { } else {
if (!(status & IRCOMM_CTS)) { if (!(status & IRCOMM_CTS)) {
IRDA_DEBUG(2, IRDA_DEBUG(2,
"%s(), CTS tx stop...\n", __FUNCTION__ ); "%s(), CTS tx stop...\n", __func__ );
tty->hw_stopped = 1; tty->hw_stopped = 1;
} }
} }
...@@ -1144,14 +1144,14 @@ static int ircomm_tty_data_indication(void *instance, void *sap, ...@@ -1144,14 +1144,14 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
IRDA_ASSERT(skb != NULL, return -1;); IRDA_ASSERT(skb != NULL, return -1;);
if (!self->tty) { if (!self->tty) {
IRDA_DEBUG(0, "%s(), no tty!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), no tty!\n", __func__ );
return 0; return 0;
} }
...@@ -1162,7 +1162,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap, ...@@ -1162,7 +1162,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
* params, we can just as well declare the hardware for running. * params, we can just as well declare the hardware for running.
*/ */
if (self->tty->hw_stopped && (self->flow == FLOW_START)) { if (self->tty->hw_stopped && (self->flow == FLOW_START)) {
IRDA_DEBUG(0, "%s(), polling for line settings!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), polling for line settings!\n", __func__ );
ircomm_param_request(self, IRCOMM_POLL, TRUE); ircomm_param_request(self, IRCOMM_POLL, TRUE);
/* We can just as well declare the hardware for running */ /* We can just as well declare the hardware for running */
...@@ -1194,7 +1194,7 @@ static int ircomm_tty_control_indication(void *instance, void *sap, ...@@ -1194,7 +1194,7 @@ static int ircomm_tty_control_indication(void *instance, void *sap,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
int clen; int clen;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
...@@ -1230,7 +1230,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, ...@@ -1230,7 +1230,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
switch (cmd) { switch (cmd) {
case FLOW_START: case FLOW_START:
IRDA_DEBUG(2, "%s(), hw start!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), hw start!\n", __func__ );
tty->hw_stopped = 0; tty->hw_stopped = 0;
/* ircomm_tty_do_softint will take care of the rest */ /* ircomm_tty_do_softint will take care of the rest */
...@@ -1238,7 +1238,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, ...@@ -1238,7 +1238,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
break; break;
default: /* If we get here, something is very wrong, better stop */ default: /* If we get here, something is very wrong, better stop */
case FLOW_STOP: case FLOW_STOP:
IRDA_DEBUG(2, "%s(), hw stopped!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ );
tty->hw_stopped = 1; tty->hw_stopped = 1;
break; break;
} }
......
...@@ -129,14 +129,14 @@ static int (*state[])(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, ...@@ -129,14 +129,14 @@ static int (*state[])(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
*/ */
int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Check if somebody has already connected to us */ /* Check if somebody has already connected to us */
if (ircomm_is_connected(self->ircomm)) { if (ircomm_is_connected(self->ircomm)) {
IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), already connected!\n", __func__ );
return 0; return 0;
} }
...@@ -158,7 +158,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) ...@@ -158,7 +158,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
*/ */
void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) void ircomm_tty_detach_cable(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -207,7 +207,7 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self) ...@@ -207,7 +207,7 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self)
__u8 oct_seq[6]; __u8 oct_seq[6];
__u16 hints; __u16 hints;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -308,16 +308,16 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self) ...@@ -308,16 +308,16 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self)
* Set default values, but only if the application for some reason * Set default values, but only if the application for some reason
* haven't set them already * haven't set them already
*/ */
IRDA_DEBUG(2, "%s(), data-rate = %d\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), data-rate = %d\n", __func__ ,
self->settings.data_rate); self->settings.data_rate);
if (!self->settings.data_rate) if (!self->settings.data_rate)
self->settings.data_rate = 9600; self->settings.data_rate = 9600;
IRDA_DEBUG(2, "%s(), data-format = %d\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), data-format = %d\n", __func__ ,
self->settings.data_format); self->settings.data_format);
if (!self->settings.data_format) if (!self->settings.data_format)
self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */
IRDA_DEBUG(2, "%s(), flow-control = %d\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), flow-control = %d\n", __func__ ,
self->settings.flow_control); self->settings.flow_control);
/*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/
...@@ -362,7 +362,7 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery, ...@@ -362,7 +362,7 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery,
struct ircomm_tty_cb *self; struct ircomm_tty_cb *self;
struct ircomm_tty_info info; struct ircomm_tty_info info;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Important note : /* Important note :
* We need to drop all passive discoveries. * We need to drop all passive discoveries.
...@@ -398,7 +398,7 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap, ...@@ -398,7 +398,7 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -428,7 +428,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, ...@@ -428,7 +428,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -439,13 +439,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, ...@@ -439,13 +439,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
/* Check if request succeeded */ /* Check if request succeeded */
if (result != IAS_SUCCESS) { if (result != IAS_SUCCESS) {
IRDA_DEBUG(4, "%s(), got NULL value!\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s(), got NULL value!\n", __func__ );
return; return;
} }
switch (value->type) { switch (value->type) {
case IAS_OCT_SEQ: case IAS_OCT_SEQ:
IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), got octet sequence\n", __func__ );
irda_param_extract_all(self, value->t.oct_seq, value->len, irda_param_extract_all(self, value->t.oct_seq, value->len,
&ircomm_param_info); &ircomm_param_info);
...@@ -455,21 +455,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, ...@@ -455,21 +455,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
break; break;
case IAS_INTEGER: case IAS_INTEGER:
/* Got LSAP selector */ /* Got LSAP selector */
IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __func__ ,
value->t.integer); value->t.integer);
if (value->t.integer == -1) { if (value->t.integer == -1) {
IRDA_DEBUG(0, "%s(), invalid value!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), invalid value!\n", __func__ );
} else } else
self->dlsap_sel = value->t.integer; self->dlsap_sel = value->t.integer;
ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL);
break; break;
case IAS_MISSING: case IAS_MISSING:
IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(0, "%s(), got unknown type!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), got unknown type!\n", __func__ );
break; break;
} }
irias_delete_value(value); irias_delete_value(value);
...@@ -489,7 +489,7 @@ void ircomm_tty_connect_confirm(void *instance, void *sap, ...@@ -489,7 +489,7 @@ void ircomm_tty_connect_confirm(void *instance, void *sap,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -520,7 +520,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap, ...@@ -520,7 +520,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
int clen; int clen;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -549,7 +549,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap, ...@@ -549,7 +549,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
*/ */
void ircomm_tty_link_established(struct ircomm_tty_cb *self) void ircomm_tty_link_established(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -566,10 +566,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self) ...@@ -566,10 +566,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self)
* line. * line.
*/ */
if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) { if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) {
IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __func__ );
return; return;
} else { } else {
IRDA_DEBUG(1, "%s(), starting hardware!\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s(), starting hardware!\n", __func__ );
self->tty->hw_stopped = 0; self->tty->hw_stopped = 0;
...@@ -607,7 +607,7 @@ static void ircomm_tty_watchdog_timer_expired(void *data) ...@@ -607,7 +607,7 @@ static void ircomm_tty_watchdog_timer_expired(void *data)
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -628,7 +628,7 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, ...@@ -628,7 +628,7 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
return (*state[self->state])(self, event, skb, info); return (*state[self->state])(self, event, skb, info);
...@@ -646,7 +646,7 @@ static inline void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_ ...@@ -646,7 +646,7 @@ static inline void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __FUNCTION__ , IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __func__ ,
ircomm_tty_state[self->state], self->service_type); ircomm_tty_state[self->state], self->service_type);
*/ */
self->state = state; self->state = state;
...@@ -665,7 +665,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, ...@@ -665,7 +665,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
case IRCOMM_TTY_ATTACH_CABLE: case IRCOMM_TTY_ATTACH_CABLE:
...@@ -681,7 +681,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, ...@@ -681,7 +681,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
if (self->iriap) { if (self->iriap) {
IRDA_WARNING("%s(), busy with a previous query\n", IRDA_WARNING("%s(), busy with a previous query\n",
__FUNCTION__); __func__);
return -EBUSY; return -EBUSY;
} }
...@@ -709,7 +709,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, ...@@ -709,7 +709,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -729,7 +729,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, ...@@ -729,7 +729,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
...@@ -739,7 +739,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, ...@@ -739,7 +739,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
if (self->iriap) { if (self->iriap) {
IRDA_WARNING("%s(), busy with a previous query\n", IRDA_WARNING("%s(), busy with a previous query\n",
__FUNCTION__); __func__);
return -EBUSY; return -EBUSY;
} }
...@@ -782,7 +782,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, ...@@ -782,7 +782,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -802,14 +802,14 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, ...@@ -802,14 +802,14 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
case IRCOMM_TTY_GOT_PARAMETERS: case IRCOMM_TTY_GOT_PARAMETERS:
if (self->iriap) { if (self->iriap) {
IRDA_WARNING("%s(), busy with a previous query\n", IRDA_WARNING("%s(), busy with a previous query\n",
__FUNCTION__); __func__);
return -EBUSY; return -EBUSY;
} }
...@@ -840,7 +840,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, ...@@ -840,7 +840,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -860,7 +860,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, ...@@ -860,7 +860,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
...@@ -889,7 +889,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, ...@@ -889,7 +889,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -909,7 +909,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, ...@@ -909,7 +909,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
...@@ -943,7 +943,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, ...@@ -943,7 +943,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -981,13 +981,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self, ...@@ -981,13 +981,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self,
self->settings.dce = IRCOMM_DELTA_CD; self->settings.dce = IRCOMM_DELTA_CD;
ircomm_tty_check_modem_status(self); ircomm_tty_check_modem_status(self);
} else { } else {
IRDA_DEBUG(0, "%s(), hanging up!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), hanging up!\n", __func__ );
if (self->tty) if (self->tty)
tty_hangup(self->tty); tty_hangup(self->tty);
} }
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
ret = -EINVAL; ret = -EINVAL;
} }
......
...@@ -57,7 +57,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) ...@@ -57,7 +57,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
unsigned cflag, cval; unsigned cflag, cval;
int baud; int baud;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if (!self->tty || !self->tty->termios || !self->ircomm) if (!self->tty || !self->tty->termios || !self->ircomm)
return; return;
...@@ -94,7 +94,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) ...@@ -94,7 +94,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
self->settings.flow_control |= IRCOMM_RTS_CTS_IN; self->settings.flow_control |= IRCOMM_RTS_CTS_IN;
/* This got me. Bummer. Jean II */ /* This got me. Bummer. Jean II */
if (self->service_type == IRCOMM_3_WIRE_RAW) if (self->service_type == IRCOMM_3_WIRE_RAW)
IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __FUNCTION__); IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __func__);
} else { } else {
self->flags &= ~ASYNC_CTS_FLOW; self->flags &= ~ASYNC_CTS_FLOW;
self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN;
...@@ -150,7 +150,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty, ...@@ -150,7 +150,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned int cflag = tty->termios->c_cflag; unsigned int cflag = tty->termios->c_cflag;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if ((cflag == old_termios->c_cflag) && if ((cflag == old_termios->c_cflag) &&
(RELEVANT_IFLAG(tty->termios->c_iflag) == (RELEVANT_IFLAG(tty->termios->c_iflag) ==
...@@ -199,7 +199,7 @@ int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file) ...@@ -199,7 +199,7 @@ int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned int result; unsigned int result;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if (tty->flags & (1 << TTY_IO_ERROR)) if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO; return -EIO;
...@@ -224,7 +224,7 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file, ...@@ -224,7 +224,7 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if (tty->flags & (1 << TTY_IO_ERROR)) if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO; return -EIO;
...@@ -266,7 +266,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, ...@@ -266,7 +266,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
if (!retinfo) if (!retinfo)
return -EFAULT; return -EFAULT;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
info.line = self->line; info.line = self->line;
...@@ -302,7 +302,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, ...@@ -302,7 +302,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self,
struct serial_struct new_serial; struct serial_struct new_serial;
struct ircomm_tty_cb old_state, *state; struct ircomm_tty_cb old_state, *state;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
return -EFAULT; return -EFAULT;
...@@ -376,7 +376,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -376,7 +376,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
...@@ -397,7 +397,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -397,7 +397,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
break; break;
case TIOCGICOUNT: case TIOCGICOUNT:
IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ );
#if 0 #if 0
save_flags(flags); cli(); save_flags(flags); cli();
cnow = driver->icount; cnow = driver->icount;
......
...@@ -90,7 +90,7 @@ static void leftover_dongle(void *arg) ...@@ -90,7 +90,7 @@ static void leftover_dongle(void *arg)
void irda_device_cleanup(void) void irda_device_cleanup(void)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete); hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
...@@ -107,7 +107,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status) ...@@ -107,7 +107,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
{ {
struct irlap_cb *self; struct irlap_cb *self;
IRDA_DEBUG(4, "%s(%s)\n", __FUNCTION__, status ? "TRUE" : "FALSE"); IRDA_DEBUG(4, "%s(%s)\n", __func__, status ? "TRUE" : "FALSE");
self = (struct irlap_cb *) dev->atalk_ptr; self = (struct irlap_cb *) dev->atalk_ptr;
...@@ -147,11 +147,11 @@ int irda_device_is_receiving(struct net_device *dev) ...@@ -147,11 +147,11 @@ int irda_device_is_receiving(struct net_device *dev)
struct if_irda_req req; struct if_irda_req req;
int ret; int ret;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
if (!dev->do_ioctl) { if (!dev->do_ioctl) {
IRDA_ERROR("%s: do_ioctl not impl. by device driver\n", IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
__FUNCTION__); __func__);
return -1; return -1;
} }
...@@ -191,7 +191,7 @@ static int irda_task_kick(struct irda_task *task) ...@@ -191,7 +191,7 @@ static int irda_task_kick(struct irda_task *task)
int count = 0; int count = 0;
int timeout; int timeout;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(task != NULL, return -1;); IRDA_ASSERT(task != NULL, return -1;);
IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
...@@ -201,14 +201,14 @@ static int irda_task_kick(struct irda_task *task) ...@@ -201,14 +201,14 @@ static int irda_task_kick(struct irda_task *task)
timeout = task->function(task); timeout = task->function(task);
if (count++ > 100) { if (count++ > 100) {
IRDA_ERROR("%s: error in task handler!\n", IRDA_ERROR("%s: error in task handler!\n",
__FUNCTION__); __func__);
irda_task_delete(task); irda_task_delete(task);
return TRUE; return TRUE;
} }
} while ((timeout == 0) && (task->state != IRDA_TASK_DONE)); } while ((timeout == 0) && (task->state != IRDA_TASK_DONE));
if (timeout < 0) { if (timeout < 0) {
IRDA_ERROR("%s: Error executing task!\n", __FUNCTION__); IRDA_ERROR("%s: Error executing task!\n", __func__);
irda_task_delete(task); irda_task_delete(task);
return TRUE; return TRUE;
} }
...@@ -241,7 +241,7 @@ static int irda_task_kick(struct irda_task *task) ...@@ -241,7 +241,7 @@ static int irda_task_kick(struct irda_task *task)
finished = FALSE; finished = FALSE;
} else { } else {
IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n", IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n",
__FUNCTION__); __func__);
finished = FALSE; finished = FALSE;
} }
...@@ -258,7 +258,7 @@ static void irda_task_timer_expired(void *data) ...@@ -258,7 +258,7 @@ static void irda_task_timer_expired(void *data)
{ {
struct irda_task *task; struct irda_task *task;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
task = (struct irda_task *) data; task = (struct irda_task *) data;
......
...@@ -108,7 +108,7 @@ int __init iriap_init(void) ...@@ -108,7 +108,7 @@ int __init iriap_init(void)
irias_objects = hashbin_new(HB_LOCK); irias_objects = hashbin_new(HB_LOCK);
if (!irias_objects) { if (!irias_objects) {
IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n", IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n",
__FUNCTION__); __func__);
hashbin_delete(iriap, NULL); hashbin_delete(iriap, NULL);
return -ENOMEM; return -ENOMEM;
} }
...@@ -139,7 +139,7 @@ int __init iriap_init(void) ...@@ -139,7 +139,7 @@ int __init iriap_init(void)
*/ */
server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
if (!server) { if (!server) {
IRDA_DEBUG(0, "%s(), unable to open server\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), unable to open server\n", __func__);
return -1; return -1;
} }
iriap_register_lsap(server, LSAP_IAS, IAS_SERVER); iriap_register_lsap(server, LSAP_IAS, IAS_SERVER);
...@@ -171,11 +171,11 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, ...@@ -171,11 +171,11 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
{ {
struct iriap_cb *self; struct iriap_cb *self;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
self = kzalloc(sizeof(*self), GFP_ATOMIC); self = kzalloc(sizeof(*self), GFP_ATOMIC);
if (!self) { if (!self) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL; return NULL;
} }
...@@ -217,7 +217,7 @@ EXPORT_SYMBOL(iriap_open); ...@@ -217,7 +217,7 @@ EXPORT_SYMBOL(iriap_open);
*/ */
static void __iriap_close(struct iriap_cb *self) static void __iriap_close(struct iriap_cb *self)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -241,7 +241,7 @@ void iriap_close(struct iriap_cb *self) ...@@ -241,7 +241,7 @@ void iriap_close(struct iriap_cb *self)
{ {
struct iriap_cb *entry; struct iriap_cb *entry;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -262,7 +262,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode) ...@@ -262,7 +262,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
irda_notify_init(&notify); irda_notify_init(&notify);
notify.connect_confirm = iriap_connect_confirm; notify.connect_confirm = iriap_connect_confirm;
...@@ -277,7 +277,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode) ...@@ -277,7 +277,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0); self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0);
if (self->lsap == NULL) { if (self->lsap == NULL) {
IRDA_ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__); IRDA_ERROR("%s: Unable to allocated LSAP!\n", __func__);
return -1; return -1;
} }
self->slsap_sel = self->lsap->slsap_sel; self->slsap_sel = self->lsap->slsap_sel;
...@@ -297,7 +297,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, ...@@ -297,7 +297,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
{ {
struct iriap_cb *self; struct iriap_cb *self;
IRDA_DEBUG(4, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]); IRDA_DEBUG(4, "%s(), reason=%s\n", __func__, irlmp_reasons[reason]);
self = (struct iriap_cb *) instance; self = (struct iriap_cb *) instance;
...@@ -313,7 +313,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, ...@@ -313,7 +313,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
dev_kfree_skb(skb); dev_kfree_skb(skb);
if (self->mode == IAS_CLIENT) { if (self->mode == IAS_CLIENT) {
IRDA_DEBUG(4, "%s(), disconnect as client\n", __FUNCTION__); IRDA_DEBUG(4, "%s(), disconnect as client\n", __func__);
iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION, iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION,
...@@ -326,7 +326,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, ...@@ -326,7 +326,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
if (self->confirm) if (self->confirm)
self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
} else { } else {
IRDA_DEBUG(4, "%s(), disconnect as server\n", __FUNCTION__); IRDA_DEBUG(4, "%s(), disconnect as server\n", __func__);
iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION, iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION,
NULL); NULL);
iriap_close(self); iriap_close(self);
...@@ -340,7 +340,7 @@ static void iriap_disconnect_request(struct iriap_cb *self) ...@@ -340,7 +340,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
{ {
struct sk_buff *tx_skb; struct sk_buff *tx_skb;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -349,7 +349,7 @@ static void iriap_disconnect_request(struct iriap_cb *self) ...@@ -349,7 +349,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
if (tx_skb == NULL) { if (tx_skb == NULL) {
IRDA_DEBUG(0, IRDA_DEBUG(0,
"%s(), Could not allocate an sk_buff of length %d\n", "%s(), Could not allocate an sk_buff of length %d\n",
__FUNCTION__, LMP_MAX_HEADER); __func__, LMP_MAX_HEADER);
return; return;
} }
...@@ -453,13 +453,13 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, ...@@ -453,13 +453,13 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
/* Get length, MSB first */ /* Get length, MSB first */
len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len); IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len);
/* Get object ID, MSB first */ /* Get object ID, MSB first */
obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
type = fp[n++]; type = fp[n++];
IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type); IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type);
switch (type) { switch (type) {
case IAS_INTEGER: case IAS_INTEGER:
...@@ -468,7 +468,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, ...@@ -468,7 +468,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
value = irias_new_integer_value(tmp_cpu32); value = irias_new_integer_value(tmp_cpu32);
/* Legal values restricted to 0x01-0x6f, page 15 irttp */ /* Legal values restricted to 0x01-0x6f, page 15 irttp */
IRDA_DEBUG(4, "%s(), lsap=%d\n", __FUNCTION__, value->t.integer); IRDA_DEBUG(4, "%s(), lsap=%d\n", __func__, value->t.integer);
break; break;
case IAS_STRING: case IAS_STRING:
charset = fp[n++]; charset = fp[n++];
...@@ -488,7 +488,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, ...@@ -488,7 +488,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
/* case CS_UNICODE: */ /* case CS_UNICODE: */
default: default:
IRDA_DEBUG(0, "%s(), charset %s, not supported\n", IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
__FUNCTION__, ias_charset_types[charset]); __func__, ias_charset_types[charset]);
/* Aborting, close connection! */ /* Aborting, close connection! */
iriap_disconnect_request(self); iriap_disconnect_request(self);
...@@ -496,7 +496,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, ...@@ -496,7 +496,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
/* break; */ /* break; */
} }
value_len = fp[n++]; value_len = fp[n++];
IRDA_DEBUG(4, "%s(), strlen=%d\n", __FUNCTION__, value_len); IRDA_DEBUG(4, "%s(), strlen=%d\n", __func__, value_len);
/* Make sure the string is null-terminated */ /* Make sure the string is null-terminated */
fp[n+value_len] = 0x00; fp[n+value_len] = 0x00;
...@@ -526,7 +526,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, ...@@ -526,7 +526,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
if (self->confirm) if (self->confirm)
self->confirm(IAS_SUCCESS, obj_id, value, self->priv); self->confirm(IAS_SUCCESS, obj_id, value, self->priv);
else { else {
IRDA_DEBUG(0, "%s(), missing handler!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), missing handler!\n", __func__);
irias_delete_value(value); irias_delete_value(value);
} }
} }
...@@ -548,7 +548,7 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self, ...@@ -548,7 +548,7 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
__be16 tmp_be16; __be16 tmp_be16;
__u8 *fp; __u8 *fp;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -610,12 +610,12 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self, ...@@ -610,12 +610,12 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len; memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len;
break; break;
case IAS_MISSING: case IAS_MISSING:
IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __FUNCTION__); IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __func__);
skb_put(tx_skb, 1); skb_put(tx_skb, 1);
fp[n++] = value->type; fp[n++] = value->type;
break; break;
default: default:
IRDA_DEBUG(0, "%s(), type not implemented!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), type not implemented!\n", __func__);
break; break;
} }
iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb); iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb);
...@@ -642,7 +642,7 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self, ...@@ -642,7 +642,7 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self,
__u8 *fp; __u8 *fp;
int n; int n;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -697,7 +697,7 @@ void iriap_send_ack(struct iriap_cb *self) ...@@ -697,7 +697,7 @@ void iriap_send_ack(struct iriap_cb *self)
struct sk_buff *tx_skb; struct sk_buff *tx_skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -728,7 +728,7 @@ void iriap_connect_request(struct iriap_cb *self) ...@@ -728,7 +728,7 @@ void iriap_connect_request(struct iriap_cb *self)
self->saddr, self->daddr, self->saddr, self->daddr,
NULL, NULL); NULL, NULL);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
} }
} }
...@@ -776,7 +776,7 @@ static void iriap_connect_indication(void *instance, void *sap, ...@@ -776,7 +776,7 @@ static void iriap_connect_indication(void *instance, void *sap,
{ {
struct iriap_cb *self, *new; struct iriap_cb *self, *new;
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __func__);
self = (struct iriap_cb *) instance; self = (struct iriap_cb *) instance;
...@@ -787,14 +787,14 @@ static void iriap_connect_indication(void *instance, void *sap, ...@@ -787,14 +787,14 @@ static void iriap_connect_indication(void *instance, void *sap,
/* Start new server */ /* Start new server */
new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
if (!new) { if (!new) {
IRDA_DEBUG(0, "%s(), open failed\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), open failed\n", __func__);
goto out; goto out;
} }
/* Now attach up the new "socket" */ /* Now attach up the new "socket" */
new->lsap = irlmp_dup(self->lsap, new); new->lsap = irlmp_dup(self->lsap, new);
if (!new->lsap) { if (!new->lsap) {
IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
goto out; goto out;
} }
...@@ -824,7 +824,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -824,7 +824,7 @@ static int iriap_data_indication(void *instance, void *sap,
__u8 *frame; __u8 *frame;
__u8 opcode; __u8 opcode;
IRDA_DEBUG(3, "%s()\n", __FUNCTION__); IRDA_DEBUG(3, "%s()\n", __func__);
self = (struct iriap_cb *) instance; self = (struct iriap_cb *) instance;
...@@ -836,7 +836,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -836,7 +836,7 @@ static int iriap_data_indication(void *instance, void *sap,
if (self->mode == IAS_SERVER) { if (self->mode == IAS_SERVER) {
/* Call server */ /* Call server */
IRDA_DEBUG(4, "%s(), Calling server!\n", __FUNCTION__); IRDA_DEBUG(4, "%s(), Calling server!\n", __func__);
iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb); iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb);
goto out; goto out;
} }
...@@ -844,13 +844,13 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -844,13 +844,13 @@ static int iriap_data_indication(void *instance, void *sap,
if (~opcode & IAP_LST) { if (~opcode & IAP_LST) {
IRDA_WARNING("%s:, IrIAS multiframe commands or " IRDA_WARNING("%s:, IrIAS multiframe commands or "
"results is not implemented yet!\n", "results is not implemented yet!\n",
__FUNCTION__); __func__);
goto out; goto out;
} }
/* Check for ack frames since they don't contain any data */ /* Check for ack frames since they don't contain any data */
if (opcode & IAP_ACK) { if (opcode & IAP_ACK) {
IRDA_DEBUG(0, "%s() Got ack frame!\n", __FUNCTION__); IRDA_DEBUG(0, "%s() Got ack frame!\n", __func__);
goto out; goto out;
} }
...@@ -868,7 +868,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -868,7 +868,7 @@ static int iriap_data_indication(void *instance, void *sap,
iriap_getvaluebyclass_confirm(self, skb); iriap_getvaluebyclass_confirm(self, skb);
break; break;
case IAS_CLASS_UNKNOWN: case IAS_CLASS_UNKNOWN:
IRDA_DEBUG(1, "%s(), No such class!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), No such class!\n", __func__);
/* Finished, close connection! */ /* Finished, close connection! */
iriap_disconnect_request(self); iriap_disconnect_request(self);
...@@ -881,7 +881,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -881,7 +881,7 @@ static int iriap_data_indication(void *instance, void *sap,
self->priv); self->priv);
break; break;
case IAS_ATTRIB_UNKNOWN: case IAS_ATTRIB_UNKNOWN:
IRDA_DEBUG(1, "%s(), No such attribute!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), No such attribute!\n", __func__);
/* Finished, close connection! */ /* Finished, close connection! */
iriap_disconnect_request(self); iriap_disconnect_request(self);
...@@ -896,7 +896,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -896,7 +896,7 @@ static int iriap_data_indication(void *instance, void *sap,
} }
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __FUNCTION__, IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __func__,
opcode); opcode);
break; break;
} }
...@@ -918,7 +918,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb) ...@@ -918,7 +918,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
__u8 *fp; __u8 *fp;
__u8 opcode; __u8 opcode;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -929,7 +929,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb) ...@@ -929,7 +929,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
opcode = fp[0]; opcode = fp[0];
if (~opcode & 0x80) { if (~opcode & 0x80) {
IRDA_WARNING("%s: IrIAS multiframe commands or results " IRDA_WARNING("%s: IrIAS multiframe commands or results "
"is not implemented yet!\n", __FUNCTION__); "is not implemented yet!\n", __func__);
return; return;
} }
opcode &= 0x7f; /* Mask away LST bit */ opcode &= 0x7f; /* Mask away LST bit */
...@@ -937,7 +937,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb) ...@@ -937,7 +937,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
switch (opcode) { switch (opcode) {
case GET_INFO_BASE: case GET_INFO_BASE:
IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n", IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n",
__FUNCTION__); __func__);
break; break;
case GET_VALUE_BY_CLASS: case GET_VALUE_BY_CLASS:
iriap_getvaluebyclass_indication(self, skb); iriap_getvaluebyclass_indication(self, skb);
......
...@@ -185,7 +185,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -185,7 +185,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
case IAP_LM_DISCONNECT_INDICATION: case IAP_LM_DISCONNECT_INDICATION:
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break; break;
} }
} }
...@@ -217,7 +217,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -217,7 +217,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_client_state(self, S_DISCONNECT); iriap_next_client_state(self, S_DISCONNECT);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break; break;
} }
} }
...@@ -269,7 +269,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -269,7 +269,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_call_state(self, S_OUTSTANDING); iriap_next_call_state(self, S_OUTSTANDING);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break; break;
} }
} }
...@@ -283,7 +283,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -283,7 +283,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
} }
/* /*
...@@ -305,7 +305,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -305,7 +305,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_call_state(self, S_WAIT_FOR_CALL); iriap_next_call_state(self, S_WAIT_FOR_CALL);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break; break;
} }
} }
...@@ -318,7 +318,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -318,7 +318,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
} }
/* /*
...@@ -330,7 +330,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -330,7 +330,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
} }
...@@ -343,7 +343,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -343,7 +343,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
} }
/************************************************************************** /**************************************************************************
...@@ -367,7 +367,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -367,7 +367,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
case IAP_LM_CONNECT_INDICATION: case IAP_LM_CONNECT_INDICATION:
tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
if (tx_skb == NULL) { if (tx_skb == NULL) {
IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__); IRDA_WARNING("%s: unable to malloc!\n", __func__);
return; return;
} }
...@@ -386,7 +386,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -386,7 +386,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_r_connect_state(self, R_RECEIVING); iriap_next_r_connect_state(self, R_RECEIVING);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event %d\n", __FUNCTION__, event); IRDA_DEBUG(0, "%s(), unknown event %d\n", __func__, event);
break; break;
} }
} }
...@@ -397,7 +397,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -397,7 +397,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) { switch (event) {
case IAP_LM_DISCONNECT_INDICATION: case IAP_LM_DISCONNECT_INDICATION:
...@@ -406,7 +406,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -406,7 +406,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_r_connect_state(self, R_WAITING); iriap_next_r_connect_state(self, R_WAITING);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
break; break;
} }
} }
...@@ -421,13 +421,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -421,13 +421,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
} }
static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
} }
/* /*
...@@ -439,7 +439,7 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -439,7 +439,7 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) { switch (event) {
case IAP_RECV_F_LST: case IAP_RECV_F_LST:
...@@ -448,7 +448,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -448,7 +448,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
iriap_call_indication(self, skb); iriap_call_indication(self, skb);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
break; break;
} }
} }
...@@ -462,7 +462,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -462,7 +462,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
...@@ -483,7 +483,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -483,7 +483,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
irlmp_data_request(self->lsap, skb); irlmp_data_request(self->lsap, skb);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
break; break;
} }
} }
...@@ -491,7 +491,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -491,7 +491,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, "%s(), event=%d\n", __FUNCTION__, event); IRDA_DEBUG(0, "%s(), event=%d\n", __func__, event);
switch (event) { switch (event) {
case IAP_RECV_F_LST: case IAP_RECV_F_LST:
......
...@@ -47,12 +47,12 @@ struct ias_object *irias_new_object( char *name, int id) ...@@ -47,12 +47,12 @@ struct ias_object *irias_new_object( char *name, int id)
{ {
struct ias_object *obj; struct ias_object *obj;
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); IRDA_DEBUG( 4, "%s()\n", __func__);
obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
if (obj == NULL) { if (obj == NULL) {
IRDA_WARNING("%s(), Unable to allocate object!\n", IRDA_WARNING("%s(), Unable to allocate object!\n",
__FUNCTION__); __func__);
return NULL; return NULL;
} }
...@@ -60,7 +60,7 @@ struct ias_object *irias_new_object( char *name, int id) ...@@ -60,7 +60,7 @@ struct ias_object *irias_new_object( char *name, int id)
obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC); obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC);
if (!obj->name) { if (!obj->name) {
IRDA_WARNING("%s(), Unable to allocate name!\n", IRDA_WARNING("%s(), Unable to allocate name!\n",
__FUNCTION__); __func__);
kfree(obj); kfree(obj);
return NULL; return NULL;
} }
...@@ -73,7 +73,7 @@ struct ias_object *irias_new_object( char *name, int id) ...@@ -73,7 +73,7 @@ struct ias_object *irias_new_object( char *name, int id)
if (obj->attribs == NULL) { if (obj->attribs == NULL) {
IRDA_WARNING("%s(), Unable to allocate attribs!\n", IRDA_WARNING("%s(), Unable to allocate attribs!\n",
__FUNCTION__); __func__);
kfree(obj->name); kfree(obj->name);
kfree(obj); kfree(obj);
return NULL; return NULL;
...@@ -134,7 +134,7 @@ int irias_delete_object(struct ias_object *obj) ...@@ -134,7 +134,7 @@ int irias_delete_object(struct ias_object *obj)
node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj);
if (!node) if (!node)
IRDA_DEBUG( 0, "%s(), object already removed!\n", IRDA_DEBUG( 0, "%s(), object already removed!\n",
__FUNCTION__); __func__);
/* Destroy */ /* Destroy */
__irias_delete_object(obj); __irias_delete_object(obj);
...@@ -268,7 +268,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name, ...@@ -268,7 +268,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
/* Find object */ /* Find object */
obj = hashbin_lock_find(irias_objects, 0, obj_name); obj = hashbin_lock_find(irias_objects, 0, obj_name);
if (obj == NULL) { if (obj == NULL) {
IRDA_WARNING("%s: Unable to find object: %s\n", __FUNCTION__, IRDA_WARNING("%s: Unable to find object: %s\n", __func__,
obj_name); obj_name);
return -1; return -1;
} }
...@@ -280,14 +280,14 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name, ...@@ -280,14 +280,14 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
attrib = hashbin_find(obj->attribs, 0, attrib_name); attrib = hashbin_find(obj->attribs, 0, attrib_name);
if (attrib == NULL) { if (attrib == NULL) {
IRDA_WARNING("%s: Unable to find attribute: %s\n", IRDA_WARNING("%s: Unable to find attribute: %s\n",
__FUNCTION__, attrib_name); __func__, attrib_name);
spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
return -1; return -1;
} }
if ( attrib->value->type != new_value->type) { if ( attrib->value->type != new_value->type) {
IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n", IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n",
__FUNCTION__); __func__);
spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
return -1; return -1;
} }
...@@ -322,7 +322,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value, ...@@ -322,7 +322,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
if (attrib == NULL) { if (attrib == NULL) {
IRDA_WARNING("%s: Unable to allocate attribute!\n", IRDA_WARNING("%s: Unable to allocate attribute!\n",
__FUNCTION__); __func__);
return; return;
} }
...@@ -333,7 +333,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value, ...@@ -333,7 +333,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
attrib->value = irias_new_integer_value(value); attrib->value = irias_new_integer_value(value);
if (!attrib->name || !attrib->value) { if (!attrib->name || !attrib->value) {
IRDA_WARNING("%s: Unable to allocate attribute!\n", IRDA_WARNING("%s: Unable to allocate attribute!\n",
__FUNCTION__); __func__);
if (attrib->value) if (attrib->value)
irias_delete_value(attrib->value); irias_delete_value(attrib->value);
kfree(attrib->name); kfree(attrib->name);
...@@ -366,7 +366,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets, ...@@ -366,7 +366,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
if (attrib == NULL) { if (attrib == NULL) {
IRDA_WARNING("%s: Unable to allocate attribute!\n", IRDA_WARNING("%s: Unable to allocate attribute!\n",
__FUNCTION__); __func__);
return; return;
} }
...@@ -376,7 +376,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets, ...@@ -376,7 +376,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
attrib->value = irias_new_octseq_value( octets, len); attrib->value = irias_new_octseq_value( octets, len);
if (!attrib->name || !attrib->value) { if (!attrib->name || !attrib->value) {
IRDA_WARNING("%s: Unable to allocate attribute!\n", IRDA_WARNING("%s: Unable to allocate attribute!\n",
__FUNCTION__); __func__);
if (attrib->value) if (attrib->value)
irias_delete_value(attrib->value); irias_delete_value(attrib->value);
kfree(attrib->name); kfree(attrib->name);
...@@ -408,7 +408,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value, ...@@ -408,7 +408,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC); attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC);
if (attrib == NULL) { if (attrib == NULL) {
IRDA_WARNING("%s: Unable to allocate attribute!\n", IRDA_WARNING("%s: Unable to allocate attribute!\n",
__FUNCTION__); __func__);
return; return;
} }
...@@ -418,7 +418,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value, ...@@ -418,7 +418,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
attrib->value = irias_new_string_value(value); attrib->value = irias_new_string_value(value);
if (!attrib->name || !attrib->value) { if (!attrib->name || !attrib->value) {
IRDA_WARNING("%s: Unable to allocate attribute!\n", IRDA_WARNING("%s: Unable to allocate attribute!\n",
__FUNCTION__); __func__);
if (attrib->value) if (attrib->value)
irias_delete_value(attrib->value); irias_delete_value(attrib->value);
kfree(attrib->name); kfree(attrib->name);
...@@ -442,7 +442,7 @@ struct ias_value *irias_new_integer_value(int integer) ...@@ -442,7 +442,7 @@ struct ias_value *irias_new_integer_value(int integer)
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL; return NULL;
} }
...@@ -467,7 +467,7 @@ struct ias_value *irias_new_string_value(char *string) ...@@ -467,7 +467,7 @@ struct ias_value *irias_new_string_value(char *string)
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL; return NULL;
} }
...@@ -475,7 +475,7 @@ struct ias_value *irias_new_string_value(char *string) ...@@ -475,7 +475,7 @@ struct ias_value *irias_new_string_value(char *string)
value->charset = CS_ASCII; value->charset = CS_ASCII;
value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC); value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC);
if (!value->t.string) { if (!value->t.string) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
kfree(value); kfree(value);
return NULL; return NULL;
} }
...@@ -498,7 +498,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len) ...@@ -498,7 +498,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL; return NULL;
} }
...@@ -510,7 +510,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len) ...@@ -510,7 +510,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC); value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC);
if (value->t.oct_seq == NULL){ if (value->t.oct_seq == NULL){
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
kfree(value); kfree(value);
return NULL; return NULL;
} }
...@@ -523,7 +523,7 @@ struct ias_value *irias_new_missing_value(void) ...@@ -523,7 +523,7 @@ struct ias_value *irias_new_missing_value(void)
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) { if (value == NULL) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL; return NULL;
} }
...@@ -540,7 +540,7 @@ struct ias_value *irias_new_missing_value(void) ...@@ -540,7 +540,7 @@ struct ias_value *irias_new_missing_value(void)
*/ */
void irias_delete_value(struct ias_value *value) void irias_delete_value(struct ias_value *value)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(value != NULL, return;); IRDA_ASSERT(value != NULL, return;);
...@@ -558,7 +558,7 @@ void irias_delete_value(struct ias_value *value) ...@@ -558,7 +558,7 @@ void irias_delete_value(struct ias_value *value)
kfree(value->t.oct_seq); kfree(value->t.oct_seq);
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__);
break; break;
} }
kfree(value); kfree(value);
......
...@@ -72,7 +72,7 @@ static void irlan_client_kick_timer_expired(void *data) ...@@ -72,7 +72,7 @@ static void irlan_client_kick_timer_expired(void *data)
{ {
struct irlan_cb *self = (struct irlan_cb *) data; struct irlan_cb *self = (struct irlan_cb *) data;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -91,7 +91,7 @@ static void irlan_client_kick_timer_expired(void *data) ...@@ -91,7 +91,7 @@ static void irlan_client_kick_timer_expired(void *data)
static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
irda_start_timer(&self->client.kick_timer, timeout, (void *) self, irda_start_timer(&self->client.kick_timer, timeout, (void *) self,
irlan_client_kick_timer_expired); irlan_client_kick_timer_expired);
...@@ -105,7 +105,7 @@ static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) ...@@ -105,7 +105,7 @@ static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
*/ */
void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
{ {
IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -117,7 +117,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) ...@@ -117,7 +117,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
if ((self->client.state != IRLAN_IDLE) || if ((self->client.state != IRLAN_IDLE) ||
(self->provider.access_type == ACCESS_DIRECT)) (self->provider.access_type == ACCESS_DIRECT))
{ {
IRDA_DEBUG(0, "%s(), already awake!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), already awake!\n", __func__ );
return; return;
} }
...@@ -126,7 +126,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) ...@@ -126,7 +126,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
self->daddr = daddr; self->daddr = daddr;
if (self->disconnect_reason == LM_USER_REQUEST) { if (self->disconnect_reason == LM_USER_REQUEST) {
IRDA_DEBUG(0, "%s(), still stopped by user\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), still stopped by user\n", __func__ );
return; return;
} }
...@@ -153,7 +153,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery, ...@@ -153,7 +153,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
struct irlan_cb *self; struct irlan_cb *self;
__u32 saddr, daddr; __u32 saddr, daddr;
IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s()\n", __func__ );
IRDA_ASSERT(discovery != NULL, return;); IRDA_ASSERT(discovery != NULL, return;);
...@@ -175,7 +175,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery, ...@@ -175,7 +175,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
if (self) { if (self) {
IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;);
IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ , IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __func__ ,
daddr); daddr);
irlan_client_wakeup(self, saddr, daddr); irlan_client_wakeup(self, saddr, daddr);
...@@ -195,7 +195,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap, ...@@ -195,7 +195,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
...@@ -206,7 +206,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap, ...@@ -206,7 +206,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb);
/* Ready for a new command */ /* Ready for a new command */
IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __func__ );
self->client.tx_busy = FALSE; self->client.tx_busy = FALSE;
/* Check if we have some queued commands waiting to be sent */ /* Check if we have some queued commands waiting to be sent */
...@@ -223,7 +223,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, ...@@ -223,7 +223,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
struct tsap_cb *tsap; struct tsap_cb *tsap;
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason); IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason);
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -255,7 +255,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self) ...@@ -255,7 +255,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
struct tsap_cb *tsap; struct tsap_cb *tsap;
notify_t notify; notify_t notify;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -275,7 +275,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self) ...@@ -275,7 +275,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
if (!tsap) { if (!tsap) {
IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
return; return;
} }
self->client.tsap_ctrl = tsap; self->client.tsap_ctrl = tsap;
...@@ -295,7 +295,7 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, ...@@ -295,7 +295,7 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap,
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
...@@ -374,13 +374,13 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) ...@@ -374,13 +374,13 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
IRDA_DEBUG(4, "%s() skb->len=%d\n", __FUNCTION__ , (int) skb->len); IRDA_DEBUG(4, "%s() skb->len=%d\n", __func__ , (int) skb->len);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
if (!skb) { if (!skb) {
IRDA_ERROR("%s(), Got NULL skb!\n", __FUNCTION__); IRDA_ERROR("%s(), Got NULL skb!\n", __func__);
return; return;
} }
frame = skb->data; frame = skb->data;
...@@ -405,7 +405,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) ...@@ -405,7 +405,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
/* How many parameters? */ /* How many parameters? */
count = frame[1]; count = frame[1];
IRDA_DEBUG(4, "%s(), got %d parameters\n", __FUNCTION__ , count); IRDA_DEBUG(4, "%s(), got %d parameters\n", __func__ , count);
ptr = frame+2; ptr = frame+2;
...@@ -413,7 +413,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) ...@@ -413,7 +413,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
for (i=0; i<count;i++) { for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len); ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
break; break;
} }
ptr += ret; ptr += ret;
...@@ -438,7 +438,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, ...@@ -438,7 +438,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
int i; int i;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
IRDA_DEBUG(4, "%s(), parm=%s\n", __FUNCTION__ , param); IRDA_DEBUG(4, "%s(), parm=%s\n", __func__ , param);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -476,7 +476,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, ...@@ -476,7 +476,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
else if (strcmp(value, "HOSTED") == 0) else if (strcmp(value, "HOSTED") == 0)
self->client.access_type = ACCESS_HOSTED; self->client.access_type = ACCESS_HOSTED;
else { else {
IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
} }
} }
/* IRLAN version */ /* IRLAN version */
...@@ -498,14 +498,14 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, ...@@ -498,14 +498,14 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
memcpy(&tmp_cpu, value, 2); /* Align value */ memcpy(&tmp_cpu, value, 2); /* Align value */
le16_to_cpus(&tmp_cpu); /* Convert to host order */ le16_to_cpus(&tmp_cpu); /* Convert to host order */
self->client.recv_arb_val = tmp_cpu; self->client.recv_arb_val = tmp_cpu;
IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __FUNCTION__ , IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __func__ ,
self->client.recv_arb_val); self->client.recv_arb_val);
} }
if (strcmp(param, "MAX_FRAME") == 0) { if (strcmp(param, "MAX_FRAME") == 0) {
memcpy(&tmp_cpu, value, 2); /* Align value */ memcpy(&tmp_cpu, value, 2); /* Align value */
le16_to_cpus(&tmp_cpu); /* Convert to host order */ le16_to_cpus(&tmp_cpu); /* Convert to host order */
self->client.max_frame = tmp_cpu; self->client.max_frame = tmp_cpu;
IRDA_DEBUG(4, "%s(), max frame=%d\n", __FUNCTION__ , IRDA_DEBUG(4, "%s(), max frame=%d\n", __func__ ,
self->client.max_frame); self->client.max_frame);
} }
...@@ -539,7 +539,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, ...@@ -539,7 +539,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(priv != NULL, return;); IRDA_ASSERT(priv != NULL, return;);
...@@ -552,7 +552,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, ...@@ -552,7 +552,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
/* Check if request succeeded */ /* Check if request succeeded */
if (result != IAS_SUCCESS) { if (result != IAS_SUCCESS) {
IRDA_DEBUG(2, "%s(), got NULL value!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), got NULL value!\n", __func__ );
irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL,
NULL); NULL);
return; return;
...@@ -570,7 +570,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, ...@@ -570,7 +570,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
irias_delete_value(value); irias_delete_value(value);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown type!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), unknown type!\n", __func__ );
break; break;
} }
irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL); irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL);
......
...@@ -92,7 +92,7 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -92,7 +92,7 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -101,7 +101,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -101,7 +101,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
case IRLAN_DISCOVERY_INDICATION: case IRLAN_DISCOVERY_INDICATION:
if (self->client.iriap) { if (self->client.iriap) {
IRDA_WARNING("%s(), busy with a previous query\n", IRDA_WARNING("%s(), busy with a previous query\n",
__FUNCTION__); __func__);
return -EBUSY; return -EBUSY;
} }
...@@ -114,10 +114,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -114,10 +114,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
"IrLAN", "IrDA:TinyTP:LsapSel"); "IrLAN", "IrDA:TinyTP:LsapSel");
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -136,7 +136,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -136,7 +136,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -154,7 +154,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -154,7 +154,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_CONN); irlan_next_client_state(self, IRLAN_CONN);
break; break;
case IRLAN_IAS_PROVIDER_NOT_AVAIL: case IRLAN_IAS_PROVIDER_NOT_AVAIL:
IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __func__ );
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
/* Give the client a kick! */ /* Give the client a kick! */
...@@ -167,10 +167,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -167,10 +167,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -189,7 +189,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -189,7 +189,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -204,10 +204,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -204,10 +204,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -224,7 +224,7 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -224,7 +224,7 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -244,10 +244,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -244,10 +244,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -266,7 +266,7 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -266,7 +266,7 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -281,10 +281,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -281,10 +281,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -305,7 +305,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -305,7 +305,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
{ {
struct qos_info qos; struct qos_info qos;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -344,7 +344,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -344,7 +344,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_DATA); irlan_next_client_state(self, IRLAN_DATA);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
break; break;
} }
break; break;
...@@ -353,10 +353,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -353,10 +353,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
...@@ -376,7 +376,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -376,7 +376,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -390,10 +390,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -390,10 +390,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -407,7 +407,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -407,7 +407,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
{ {
struct qos_info qos; struct qos_info qos;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -429,7 +429,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -429,7 +429,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
} else if (self->client.recv_arb_val > } else if (self->client.recv_arb_val >
self->provider.send_arb_val) self->provider.send_arb_val)
{ {
IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __func__ );
} }
break; break;
case IRLAN_DATA_CONNECT_INDICATION: case IRLAN_DATA_CONNECT_INDICATION:
...@@ -440,10 +440,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -440,10 +440,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -462,7 +462,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -462,7 +462,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -476,7 +476,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -476,7 +476,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -494,7 +494,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -494,7 +494,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -511,7 +511,7 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -511,7 +511,7 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
......
...@@ -124,7 +124,7 @@ static int __init irlan_init(void) ...@@ -124,7 +124,7 @@ static int __init irlan_init(void)
struct irlan_cb *new; struct irlan_cb *new;
__u16 hints; __u16 hints;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
{ struct proc_dir_entry *proc; { struct proc_dir_entry *proc;
...@@ -136,7 +136,7 @@ static int __init irlan_init(void) ...@@ -136,7 +136,7 @@ static int __init irlan_init(void)
} }
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
hints = irlmp_service_to_hint(S_LAN); hints = irlmp_service_to_hint(S_LAN);
/* Register with IrLMP as a client */ /* Register with IrLMP as a client */
...@@ -179,7 +179,7 @@ static void __exit irlan_cleanup(void) ...@@ -179,7 +179,7 @@ static void __exit irlan_cleanup(void)
{ {
struct irlan_cb *self, *next; struct irlan_cb *self, *next;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
irlmp_unregister_client(ckey); irlmp_unregister_client(ckey);
irlmp_unregister_service(skey); irlmp_unregister_service(skey);
...@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) ...@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
struct net_device *dev; struct net_device *dev;
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Create network device with irlan */ /* Create network device with irlan */
dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); dev = alloc_irlandev(eth ? "eth%d" : "irlan%d");
...@@ -252,7 +252,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) ...@@ -252,7 +252,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
if (register_netdev(dev)) { if (register_netdev(dev)) {
IRDA_DEBUG(2, "%s(), register_netdev() failed!\n", IRDA_DEBUG(2, "%s(), register_netdev() failed!\n",
__FUNCTION__ ); __func__ );
self = NULL; self = NULL;
free_netdev(dev); free_netdev(dev);
} else { } else {
...@@ -272,7 +272,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) ...@@ -272,7 +272,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
*/ */
static void __irlan_close(struct irlan_cb *self) static void __irlan_close(struct irlan_cb *self)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
ASSERT_RTNL(); ASSERT_RTNL();
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
...@@ -320,7 +320,7 @@ static void irlan_connect_indication(void *instance, void *sap, ...@@ -320,7 +320,7 @@ static void irlan_connect_indication(void *instance, void *sap,
struct irlan_cb *self; struct irlan_cb *self;
struct tsap_cb *tsap; struct tsap_cb *tsap;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -332,7 +332,7 @@ static void irlan_connect_indication(void *instance, void *sap, ...@@ -332,7 +332,7 @@ static void irlan_connect_indication(void *instance, void *sap,
self->max_sdu_size = max_sdu_size; self->max_sdu_size = max_sdu_size;
self->max_header_size = max_header_size; self->max_header_size = max_header_size;
IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__); IRDA_DEBUG(0, "%s: We are now connected!\n", __func__);
del_timer(&self->watchdog_timer); del_timer(&self->watchdog_timer);
...@@ -376,7 +376,7 @@ static void irlan_connect_confirm(void *instance, void *sap, ...@@ -376,7 +376,7 @@ static void irlan_connect_confirm(void *instance, void *sap,
/* TODO: we could set the MTU depending on the max_sdu_size */ /* TODO: we could set the MTU depending on the max_sdu_size */
IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__); IRDA_DEBUG(0, "%s: We are now connected!\n", __func__);
del_timer(&self->watchdog_timer); del_timer(&self->watchdog_timer);
/* /*
...@@ -412,7 +412,7 @@ static void irlan_disconnect_indication(void *instance, ...@@ -412,7 +412,7 @@ static void irlan_disconnect_indication(void *instance,
struct irlan_cb *self; struct irlan_cb *self;
struct tsap_cb *tsap; struct tsap_cb *tsap;
IRDA_DEBUG(0, "%s(), reason=%d\n", __FUNCTION__ , reason); IRDA_DEBUG(0, "%s(), reason=%d\n", __func__ , reason);
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -431,22 +431,22 @@ static void irlan_disconnect_indication(void *instance, ...@@ -431,22 +431,22 @@ static void irlan_disconnect_indication(void *instance,
switch (reason) { switch (reason) {
case LM_USER_REQUEST: /* User request */ case LM_USER_REQUEST: /* User request */
IRDA_DEBUG(2, "%s(), User requested\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), User requested\n", __func__ );
break; break;
case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */
IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __func__ );
break; break;
case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */
IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __func__ );
break; break;
case LM_LAP_RESET: /* IrLAP reset */ case LM_LAP_RESET: /* IrLAP reset */
IRDA_DEBUG(2, "%s(), IrLAP reset\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLAP reset\n", __func__ );
break; break;
case LM_INIT_DISCONNECT: case LM_INIT_DISCONNECT:
IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ );
break; break;
default: default:
IRDA_ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__); IRDA_ERROR("%s(), Unknown disconnect reason\n", __func__);
break; break;
} }
...@@ -468,7 +468,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) ...@@ -468,7 +468,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
struct tsap_cb *tsap; struct tsap_cb *tsap;
notify_t notify; notify_t notify;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -490,7 +490,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) ...@@ -490,7 +490,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
if (!tsap) { if (!tsap) {
IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
return; return;
} }
self->tsap_data = tsap; self->tsap_data = tsap;
...@@ -504,7 +504,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) ...@@ -504,7 +504,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
void irlan_close_tsaps(struct irlan_cb *self) void irlan_close_tsaps(struct irlan_cb *self)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -594,7 +594,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) ...@@ -594,7 +594,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
if (irda_lock(&self->client.tx_busy) == FALSE) if (irda_lock(&self->client.tx_busy) == FALSE)
return -EBUSY; return -EBUSY;
...@@ -613,7 +613,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) ...@@ -613,7 +613,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
dev_kfree_skb(skb); dev_kfree_skb(skb);
return -1; return -1;
} }
IRDA_DEBUG(2, "%s(), sending ...\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), sending ...\n", __func__ );
return irttp_data_request(self->client.tsap_ctrl, skb); return irttp_data_request(self->client.tsap_ctrl, skb);
} }
...@@ -626,7 +626,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) ...@@ -626,7 +626,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
*/ */
static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Queue command */ /* Queue command */
skb_queue_tail(&self->client.txq, skb); skb_queue_tail(&self->client.txq, skb);
...@@ -646,7 +646,7 @@ void irlan_get_provider_info(struct irlan_cb *self) ...@@ -646,7 +646,7 @@ void irlan_get_provider_info(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -679,7 +679,7 @@ void irlan_open_data_channel(struct irlan_cb *self) ...@@ -679,7 +679,7 @@ void irlan_open_data_channel(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -714,7 +714,7 @@ void irlan_close_data_channel(struct irlan_cb *self) ...@@ -714,7 +714,7 @@ void irlan_close_data_channel(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -755,7 +755,7 @@ static void irlan_open_unicast_addr(struct irlan_cb *self) ...@@ -755,7 +755,7 @@ static void irlan_open_unicast_addr(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -797,7 +797,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status) ...@@ -797,7 +797,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -841,7 +841,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status) ...@@ -841,7 +841,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -886,7 +886,7 @@ static void irlan_get_unicast_addr(struct irlan_cb *self) ...@@ -886,7 +886,7 @@ static void irlan_get_unicast_addr(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -926,7 +926,7 @@ void irlan_get_media_char(struct irlan_cb *self) ...@@ -926,7 +926,7 @@ void irlan_get_media_char(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -1014,7 +1014,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, ...@@ -1014,7 +1014,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
int n=0; int n=0;
if (skb == NULL) { if (skb == NULL) {
IRDA_DEBUG(2, "%s(), Got NULL skb\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Got NULL skb\n", __func__ );
return 0; return 0;
} }
...@@ -1031,7 +1031,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, ...@@ -1031,7 +1031,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
IRDA_ASSERT(value_len > 0, return 0;); IRDA_ASSERT(value_len > 0, return 0;);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ );
return 0; return 0;
break; break;
} }
...@@ -1041,7 +1041,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, ...@@ -1041,7 +1041,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
/* Make space for data */ /* Make space for data */
if (skb_tailroom(skb) < (param_len+value_len+3)) { if (skb_tailroom(skb) < (param_len+value_len+3)) {
IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __func__ );
return 0; return 0;
} }
skb_put(skb, param_len+value_len+3); skb_put(skb, param_len+value_len+3);
...@@ -1088,13 +1088,13 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) ...@@ -1088,13 +1088,13 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
__u16 val_len; __u16 val_len;
int n=0; int n=0;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
/* get length of parameter name (1 byte) */ /* get length of parameter name (1 byte) */
name_len = buf[n++]; name_len = buf[n++];
if (name_len > 254) { if (name_len > 254) {
IRDA_DEBUG(2, "%s(), name_len > 254\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), name_len > 254\n", __func__ );
return -RSP_INVALID_COMMAND_FORMAT; return -RSP_INVALID_COMMAND_FORMAT;
} }
...@@ -1111,7 +1111,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) ...@@ -1111,7 +1111,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
le16_to_cpus(&val_len); n+=2; le16_to_cpus(&val_len); n+=2;
if (val_len > 1016) { if (val_len > 1016) {
IRDA_DEBUG(2, "%s(), parameter length to long\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), parameter length to long\n", __func__ );
return -RSP_INVALID_COMMAND_FORMAT; return -RSP_INVALID_COMMAND_FORMAT;
} }
*len = val_len; *len = val_len;
......
...@@ -103,7 +103,7 @@ static int irlan_eth_open(struct net_device *dev) ...@@ -103,7 +103,7 @@ static int irlan_eth_open(struct net_device *dev)
{ {
struct irlan_cb *self = netdev_priv(dev); struct irlan_cb *self = netdev_priv(dev);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Ready to play! */ /* Ready to play! */
netif_stop_queue(dev); /* Wait until data link is ready */ netif_stop_queue(dev); /* Wait until data link is ready */
...@@ -130,7 +130,7 @@ static int irlan_eth_close(struct net_device *dev) ...@@ -130,7 +130,7 @@ static int irlan_eth_close(struct net_device *dev)
{ {
struct irlan_cb *self = netdev_priv(dev); struct irlan_cb *self = netdev_priv(dev);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Stop device */ /* Stop device */
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -221,7 +221,7 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb) ...@@ -221,7 +221,7 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
} }
if (skb->len < ETH_HLEN) { if (skb->len < ETH_HLEN) {
IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n", IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n",
__FUNCTION__, skb->len); __func__, skb->len);
++self->stats.rx_dropped; ++self->stats.rx_dropped;
dev_kfree_skb(skb); dev_kfree_skb(skb);
return 0; return 0;
...@@ -270,7 +270,7 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) ...@@ -270,7 +270,7 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
IRDA_ASSERT(dev != NULL, return;); IRDA_ASSERT(dev != NULL, return;);
IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __FUNCTION__, IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __func__,
flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START", flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
netif_running(dev)); netif_running(dev));
...@@ -332,11 +332,11 @@ static void irlan_eth_set_multicast_list(struct net_device *dev) ...@@ -332,11 +332,11 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
{ {
struct irlan_cb *self = netdev_priv(dev); struct irlan_cb *self = netdev_priv(dev);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __func__ );
/* Check if data channel has been connected yet */ /* Check if data channel has been connected yet */
if (self->client.state != IRLAN_DATA) { if (self->client.state != IRLAN_DATA) {
IRDA_DEBUG(1, "%s(), delaying!\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s(), delaying!\n", __func__ );
return; return;
} }
...@@ -346,20 +346,20 @@ static void irlan_eth_set_multicast_list(struct net_device *dev) ...@@ -346,20 +346,20 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
} }
else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) { else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
/* Disable promiscuous mode, use normal mode. */ /* Disable promiscuous mode, use normal mode. */
IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
/* hardware_set_filter(NULL); */ /* hardware_set_filter(NULL); */
irlan_set_multicast_filter(self, TRUE); irlan_set_multicast_filter(self, TRUE);
} }
else if (dev->mc_count) { else if (dev->mc_count) {
IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
/* Walk the address list, and load the filter */ /* Walk the address list, and load the filter */
/* hardware_set_filter(dev->mc_list); */ /* hardware_set_filter(dev->mc_list); */
irlan_set_multicast_filter(self, TRUE); irlan_set_multicast_filter(self, TRUE);
} }
else { else {
IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__ );
irlan_set_multicast_filter(self, FALSE); irlan_set_multicast_filter(self, FALSE);
} }
......
...@@ -40,7 +40,7 @@ char *irlan_state[] = { ...@@ -40,7 +40,7 @@ char *irlan_state[] = {
void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
{ {
IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]); IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) ...@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state) void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
{ {
IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]); IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
......
...@@ -145,7 +145,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value) ...@@ -145,7 +145,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
{ {
__u8 *bytes; __u8 *bytes;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
bytes = value; bytes = value;
...@@ -158,7 +158,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value) ...@@ -158,7 +158,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
* This is experimental!! DB. * This is experimental!! DB.
*/ */
if (strcmp(param, "MODE") == 0) { if (strcmp(param, "MODE") == 0) {
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
self->use_udata = TRUE; self->use_udata = TRUE;
return; return;
} }
......
...@@ -70,7 +70,7 @@ static int irlan_provider_data_indication(void *instance, void *sap, ...@@ -70,7 +70,7 @@ static int irlan_provider_data_indication(void *instance, void *sap,
struct irlan_cb *self; struct irlan_cb *self;
__u8 code; __u8 code;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
...@@ -99,15 +99,15 @@ static int irlan_provider_data_indication(void *instance, void *sap, ...@@ -99,15 +99,15 @@ static int irlan_provider_data_indication(void *instance, void *sap,
irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb); irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb);
break; break;
case CMD_RECONNECT_DATA_CHAN: case CMD_RECONNECT_DATA_CHAN:
IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __func__ );
IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ );
break; break;
case CMD_CLOSE_DATA_CHAN: case CMD_CLOSE_DATA_CHAN:
IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n"); IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n");
IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ );
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
break; break;
} }
return 0; return 0;
...@@ -129,7 +129,7 @@ static void irlan_provider_connect_indication(void *instance, void *sap, ...@@ -129,7 +129,7 @@ static void irlan_provider_connect_indication(void *instance, void *sap,
struct tsap_cb *tsap; struct tsap_cb *tsap;
__u32 saddr, daddr; __u32 saddr, daddr;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __func__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -182,7 +182,7 @@ static void irlan_provider_disconnect_indication(void *instance, void *sap, ...@@ -182,7 +182,7 @@ static void irlan_provider_disconnect_indication(void *instance, void *sap,
struct irlan_cb *self; struct irlan_cb *self;
struct tsap_cb *tsap; struct tsap_cb *tsap;
IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason); IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason);
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -236,7 +236,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd, ...@@ -236,7 +236,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;);
IRDA_DEBUG(4, "%s(), skb->len=%d\n", __FUNCTION__ , (int)skb->len); IRDA_DEBUG(4, "%s(), skb->len=%d\n", __func__ , (int)skb->len);
IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;);
...@@ -266,7 +266,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd, ...@@ -266,7 +266,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
for (i=0; i<count;i++) { for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len); ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
break; break;
} }
ptr+=ret; ptr+=ret;
...@@ -291,7 +291,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -291,7 +291,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -323,7 +323,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -323,7 +323,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
irlan_insert_string_param(skb, "MEDIA", "802.5"); irlan_insert_string_param(skb, "MEDIA", "802.5");
break; break;
default: default:
IRDA_DEBUG(2, "%s(), unknown media type!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), unknown media type!\n", __func__ );
break; break;
} }
irlan_insert_short_param(skb, "IRLAN_VER", 0x0101); irlan_insert_short_param(skb, "IRLAN_VER", 0x0101);
...@@ -347,7 +347,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -347,7 +347,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED"); irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED");
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown access type\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Unknown access type\n", __func__ );
break; break;
} }
irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee); irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee);
...@@ -367,7 +367,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -367,7 +367,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
irlan_filter_request(self, skb); irlan_filter_request(self, skb);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
break; break;
} }
...@@ -385,7 +385,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self) ...@@ -385,7 +385,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
struct tsap_cb *tsap; struct tsap_cb *tsap;
notify_t notify; notify_t notify;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -406,7 +406,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self) ...@@ -406,7 +406,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
tsap = irttp_open_tsap(LSAP_ANY, 1, &notify); tsap = irttp_open_tsap(LSAP_ANY, 1, &notify);
if (!tsap) { if (!tsap) {
IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
return -1; return -1;
} }
self->provider.tsap_ctrl = tsap; self->provider.tsap_ctrl = tsap;
......
...@@ -72,7 +72,7 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -72,7 +72,7 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -82,7 +82,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -82,7 +82,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state( self, IRLAN_INFO); irlan_next_provider_state( self, IRLAN_INFO);
break; break;
default: default:
IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -101,7 +101,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -101,7 +101,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
{ {
int ret; int ret;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -147,7 +147,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -147,7 +147,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state(self, IRLAN_IDLE); irlan_next_provider_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -166,7 +166,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -166,7 +166,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
...@@ -186,7 +186,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -186,7 +186,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state(self, IRLAN_IDLE); irlan_next_provider_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -205,7 +205,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -205,7 +205,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -221,7 +221,7 @@ static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -221,7 +221,7 @@ static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state(self, IRLAN_IDLE); irlan_next_provider_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event); IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
break; break;
} }
if (skb) if (skb)
......
...@@ -88,7 +88,7 @@ int __init irlap_init(void) ...@@ -88,7 +88,7 @@ int __init irlap_init(void)
irlap = hashbin_new(HB_LOCK); irlap = hashbin_new(HB_LOCK);
if (irlap == NULL) { if (irlap == NULL) {
IRDA_ERROR("%s: can't allocate irlap hashbin!\n", IRDA_ERROR("%s: can't allocate irlap hashbin!\n",
__FUNCTION__); __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -113,7 +113,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, ...@@ -113,7 +113,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
{ {
struct irlap_cb *self; struct irlap_cb *self;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
/* Initialize the irlap structure. */ /* Initialize the irlap structure. */
self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL); self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL);
...@@ -215,7 +215,7 @@ void irlap_close(struct irlap_cb *self) ...@@ -215,7 +215,7 @@ void irlap_close(struct irlap_cb *self)
{ {
struct irlap_cb *lap; struct irlap_cb *lap;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -231,7 +231,7 @@ void irlap_close(struct irlap_cb *self) ...@@ -231,7 +231,7 @@ void irlap_close(struct irlap_cb *self)
/* Be sure that we manage to remove ourself from the hash */ /* Be sure that we manage to remove ourself from the hash */
lap = hashbin_remove(irlap, self->saddr, NULL); lap = hashbin_remove(irlap, self->saddr, NULL);
if (!lap) { if (!lap) {
IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __func__);
return; return;
} }
__irlap_close(lap); __irlap_close(lap);
...@@ -246,7 +246,7 @@ EXPORT_SYMBOL(irlap_close); ...@@ -246,7 +246,7 @@ EXPORT_SYMBOL(irlap_close);
*/ */
void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -265,7 +265,7 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) ...@@ -265,7 +265,7 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
*/ */
void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata) void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL); irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL);
} }
...@@ -280,7 +280,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata) ...@@ -280,7 +280,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
void irlap_connect_request(struct irlap_cb *self, __u32 daddr, void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
struct qos_info *qos_user, int sniff) struct qos_info *qos_user, int sniff)
{ {
IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __FUNCTION__, daddr); IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __func__, daddr);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -307,7 +307,7 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr, ...@@ -307,7 +307,7 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
*/ */
void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb) void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -344,7 +344,7 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb, ...@@ -344,7 +344,7 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb,
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
IRDA_DEBUG(3, "%s()\n", __FUNCTION__); IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
return;); return;);
...@@ -391,7 +391,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb) ...@@ -391,7 +391,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
IRDA_DEBUG(3, "%s()\n", __FUNCTION__); IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
return;); return;);
...@@ -417,7 +417,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb) ...@@ -417,7 +417,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
#ifdef CONFIG_IRDA_ULTRA #ifdef CONFIG_IRDA_ULTRA
void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -437,7 +437,7 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) ...@@ -437,7 +437,7 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
*/ */
void irlap_disconnect_request(struct irlap_cb *self) void irlap_disconnect_request(struct irlap_cb *self)
{ {
IRDA_DEBUG(3, "%s()\n", __FUNCTION__); IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -458,7 +458,7 @@ void irlap_disconnect_request(struct irlap_cb *self) ...@@ -458,7 +458,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL); irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), disconnect pending!\n", __FUNCTION__); IRDA_DEBUG(2, "%s(), disconnect pending!\n", __func__);
self->disconnect_pending = TRUE; self->disconnect_pending = TRUE;
break; break;
} }
...@@ -472,7 +472,7 @@ void irlap_disconnect_request(struct irlap_cb *self) ...@@ -472,7 +472,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
*/ */
void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
{ {
IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, lap_reasons[reason]); IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, lap_reasons[reason]);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -482,7 +482,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) ...@@ -482,7 +482,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
switch (reason) { switch (reason) {
case LAP_RESET_INDICATION: case LAP_RESET_INDICATION:
IRDA_DEBUG(1, "%s(), Sending reset request!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), Sending reset request!\n", __func__);
irlap_do_event(self, RESET_REQUEST, NULL, NULL); irlap_do_event(self, RESET_REQUEST, NULL, NULL);
break; break;
case LAP_NO_RESPONSE: /* FALLTROUGH */ case LAP_NO_RESPONSE: /* FALLTROUGH */
...@@ -493,7 +493,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) ...@@ -493,7 +493,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
reason, NULL); reason, NULL);
break; break;
default: default:
IRDA_ERROR("%s: Unknown reason %d\n", __FUNCTION__, reason); IRDA_ERROR("%s: Unknown reason %d\n", __func__, reason);
} }
} }
...@@ -511,7 +511,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) ...@@ -511,7 +511,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
IRDA_ASSERT(discovery != NULL, return;); IRDA_ASSERT(discovery != NULL, return;);
IRDA_DEBUG(4, "%s(), nslots = %d\n", __FUNCTION__, discovery->nslots); IRDA_DEBUG(4, "%s(), nslots = %d\n", __func__, discovery->nslots);
IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) ||
(discovery->nslots == 8) || (discovery->nslots == 16), (discovery->nslots == 8) || (discovery->nslots == 16),
...@@ -520,7 +520,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) ...@@ -520,7 +520,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
/* Discovery is only possible in NDM mode */ /* Discovery is only possible in NDM mode */
if (self->state != LAP_NDM) { if (self->state != LAP_NDM) {
IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n", IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n",
__FUNCTION__); __func__);
irlap_discovery_confirm(self, NULL); irlap_discovery_confirm(self, NULL);
/* Note : in theory, if we are not in NDM, we could postpone /* Note : in theory, if we are not in NDM, we could postpone
* the discovery like we do for connection request. * the discovery like we do for connection request.
...@@ -543,7 +543,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) ...@@ -543,7 +543,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
if (self->discovery_log == NULL) { if (self->discovery_log == NULL) {
IRDA_WARNING("%s(), Unable to allocate discovery log!\n", IRDA_WARNING("%s(), Unable to allocate discovery log!\n",
__FUNCTION__); __func__);
return; return;
} }
...@@ -598,7 +598,7 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log) ...@@ -598,7 +598,7 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log)
*/ */
void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery) void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -644,7 +644,7 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link) ...@@ -644,7 +644,7 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
*/ */
void irlap_reset_indication(struct irlap_cb *self) void irlap_reset_indication(struct irlap_cb *self)
{ {
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -660,7 +660,7 @@ void irlap_reset_indication(struct irlap_cb *self) ...@@ -660,7 +660,7 @@ void irlap_reset_indication(struct irlap_cb *self)
*/ */
void irlap_reset_confirm(void) void irlap_reset_confirm(void)
{ {
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __func__);
} }
/* /*
...@@ -760,7 +760,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr) ...@@ -760,7 +760,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
{ {
/* nr as expected? */ /* nr as expected? */
if (nr == self->vs) { if (nr == self->vs) {
IRDA_DEBUG(4, "%s(), expected!\n", __FUNCTION__); IRDA_DEBUG(4, "%s(), expected!\n", __func__);
return NR_EXPECTED; return NR_EXPECTED;
} }
...@@ -788,7 +788,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr) ...@@ -788,7 +788,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
*/ */
void irlap_initiate_connection_state(struct irlap_cb *self) void irlap_initiate_connection_state(struct irlap_cb *self)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -871,7 +871,7 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now) ...@@ -871,7 +871,7 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(0, "%s(), setting speed to %d\n", __FUNCTION__, speed); IRDA_DEBUG(0, "%s(), setting speed to %d\n", __func__, speed);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -914,7 +914,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self, ...@@ -914,7 +914,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
* user may not have set all of them. * user may not have set all of them.
*/ */
if (qos_user) { if (qos_user) {
IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __func__);
if (qos_user->baud_rate.bits) if (qos_user->baud_rate.bits)
self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits; self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits;
...@@ -944,7 +944,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self, ...@@ -944,7 +944,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
*/ */
void irlap_apply_default_connection_parameters(struct irlap_cb *self) void irlap_apply_default_connection_parameters(struct irlap_cb *self)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -1007,7 +1007,7 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self) ...@@ -1007,7 +1007,7 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self)
*/ */
void irlap_apply_connection_parameters(struct irlap_cb *self, int now) void irlap_apply_connection_parameters(struct irlap_cb *self, int now)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
......
...@@ -217,7 +217,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout) ...@@ -217,7 +217,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
} else } else
self->fast_RR = FALSE; self->fast_RR = FALSE;
IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __FUNCTION__, timeout, jiffies); IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies);
#endif /* CONFIG_IRDA_FAST_RR */ #endif /* CONFIG_IRDA_FAST_RR */
if (timeout == 0) if (timeout == 0)
...@@ -241,7 +241,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -241,7 +241,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
if (!self || self->magic != LAP_MAGIC) if (!self || self->magic != LAP_MAGIC)
return; return;
IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __FUNCTION__, IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __func__,
irlap_event[event], irlap_state[self->state]); irlap_event[event], irlap_state[self->state]);
ret = (*state[self->state])(self, event, skb, info); ret = (*state[self->state])(self, event, skb, info);
...@@ -259,7 +259,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -259,7 +259,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
* try to disconnect link if we send any data frames, since * try to disconnect link if we send any data frames, since
* that will change the state away form XMIT * that will change the state away form XMIT
*/ */
IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__, IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__,
skb_queue_len(&self->txq)); skb_queue_len(&self->txq));
if (!skb_queue_empty(&self->txq)) { if (!skb_queue_empty(&self->txq)) {
...@@ -340,7 +340,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -340,7 +340,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
* media busy in irlap_connect_request() and * media busy in irlap_connect_request() and
* postpone the event... - Jean II */ * postpone the event... - Jean II */
IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n", IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n",
__FUNCTION__); __func__);
/* Always switch state before calling upper layers */ /* Always switch state before calling upper layers */
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);
...@@ -367,7 +367,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -367,7 +367,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
irlap_connect_indication(self, skb); irlap_connect_indication(self, skb);
} else { } else {
IRDA_DEBUG(0, "%s(), SNRM frame does not " IRDA_DEBUG(0, "%s(), SNRM frame does not "
"contain an I field!\n", __FUNCTION__); "contain an I field!\n", __func__);
} }
break; break;
case DISCOVERY_REQUEST: case DISCOVERY_REQUEST:
...@@ -375,7 +375,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -375,7 +375,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
if (self->media_busy) { if (self->media_busy) {
IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n", IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n",
__FUNCTION__); __func__);
/* irlap->log.condition = MEDIA_BUSY; */ /* irlap->log.condition = MEDIA_BUSY; */
/* This will make IrLMP try again */ /* This will make IrLMP try again */
...@@ -441,7 +441,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -441,7 +441,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
* those cases... * those cases...
* Jean II * Jean II
*/ */
IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __func__);
/* Last discovery request -> in the log */ /* Last discovery request -> in the log */
irlap_discovery_indication(self, info->discovery); irlap_discovery_indication(self, info->discovery);
...@@ -520,7 +520,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -520,7 +520,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
/* Only accept broadcast frames in NDM mode */ /* Only accept broadcast frames in NDM mode */
if (info->caddr != CBROADCAST) { if (info->caddr != CBROADCAST) {
IRDA_DEBUG(0, "%s(), not a broadcast frame!\n", IRDA_DEBUG(0, "%s(), not a broadcast frame!\n",
__FUNCTION__); __func__);
} else } else
irlap_unitdata_indication(self, skb); irlap_unitdata_indication(self, skb);
break; break;
...@@ -536,10 +536,10 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -536,10 +536,10 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); irlap_send_test_frame(self, CBROADCAST, info->daddr, skb);
break; break;
case RECV_TEST_RSP: case RECV_TEST_RSP:
IRDA_DEBUG(0, "%s() not implemented!\n", __FUNCTION__); IRDA_DEBUG(0, "%s() not implemented!\n", __func__);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]); irlap_event[event]);
ret = -1; ret = -1;
...@@ -567,13 +567,13 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -567,13 +567,13 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
IRDA_ASSERT(info != NULL, return -1;); IRDA_ASSERT(info != NULL, return -1;);
IRDA_ASSERT(info->discovery != NULL, return -1;); IRDA_ASSERT(info->discovery != NULL, return -1;);
IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__, IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__,
info->discovery->data.daddr); info->discovery->data.daddr);
if (!self->discovery_log) { if (!self->discovery_log) {
IRDA_WARNING("%s: discovery log is gone! " IRDA_WARNING("%s: discovery log is gone! "
"maybe the discovery timeout has been set" "maybe the discovery timeout has been set"
" too short?\n", __FUNCTION__); " too short?\n", __func__);
break; break;
} }
hashbin_insert(self->discovery_log, hashbin_insert(self->discovery_log,
...@@ -598,7 +598,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -598,7 +598,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
IRDA_ASSERT(info != NULL, return -1;); IRDA_ASSERT(info != NULL, return -1;);
IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __FUNCTION__, info->s); IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __func__, info->s);
/* Last discovery request ? */ /* Last discovery request ? */
if (info->s == 0xff) if (info->s == 0xff)
...@@ -613,7 +613,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -613,7 +613,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
*/ */
if (irda_device_is_receiving(self->netdev) && !self->add_wait) { if (irda_device_is_receiving(self->netdev) && !self->add_wait) {
IRDA_DEBUG(2, "%s(), device is slow to answer, " IRDA_DEBUG(2, "%s(), device is slow to answer, "
"waiting some more!\n", __FUNCTION__); "waiting some more!\n", __func__);
irlap_start_slot_timer(self, msecs_to_jiffies(10)); irlap_start_slot_timer(self, msecs_to_jiffies(10));
self->add_wait = TRUE; self->add_wait = TRUE;
return ret; return ret;
...@@ -649,7 +649,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -649,7 +649,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]); irlap_event[event]);
ret = -1; ret = -1;
...@@ -671,7 +671,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -671,7 +671,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
discovery_t *discovery_rsp; discovery_t *discovery_rsp;
int ret=0; int ret=0;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -679,7 +679,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -679,7 +679,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
switch (event) { switch (event) {
case QUERY_TIMER_EXPIRED: case QUERY_TIMER_EXPIRED:
IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n", IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n",
__FUNCTION__, jiffies); __func__, jiffies);
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);
break; break;
case RECV_DISCOVERY_XID_CMD: case RECV_DISCOVERY_XID_CMD:
...@@ -717,7 +717,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -717,7 +717,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -1; ret = -1;
...@@ -738,7 +738,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -738,7 +738,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -799,18 +799,18 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -799,18 +799,18 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
break; break;
case RECV_DISCOVERY_XID_CMD: case RECV_DISCOVERY_XID_CMD:
IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n", IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n",
__FUNCTION__); __func__);
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);
break; break;
case DISCONNECT_REQUEST: case DISCONNECT_REQUEST:
IRDA_DEBUG(0, "%s(), Disconnect request!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), Disconnect request!\n", __func__);
irlap_send_dm_frame(self); irlap_send_dm_frame(self);
irlap_next_state( self, LAP_NDM); irlap_next_state( self, LAP_NDM);
irlap_disconnect_indication(self, LAP_DISC_INDICATION); irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -1; ret = -1;
...@@ -832,7 +832,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -832,7 +832,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -861,7 +861,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -861,7 +861,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
self->retry_count++; self->retry_count++;
break; break;
case RECV_SNRM_CMD: case RECV_SNRM_CMD:
IRDA_DEBUG(4, "%s(), SNRM battle!\n", __FUNCTION__); IRDA_DEBUG(4, "%s(), SNRM battle!\n", __func__);
IRDA_ASSERT(skb != NULL, return 0;); IRDA_ASSERT(skb != NULL, return 0;);
IRDA_ASSERT(info != NULL, return 0;); IRDA_ASSERT(info != NULL, return 0;);
...@@ -948,7 +948,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -948,7 +948,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
irlap_disconnect_indication(self, LAP_DISC_INDICATION); irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -1; ret = -1;
...@@ -966,7 +966,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -966,7 +966,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event,
struct sk_buff *skb, struct irlap_info *info) struct sk_buff *skb, struct irlap_info *info)
{ {
IRDA_DEBUG( 0, "%s(), Unknown event\n", __FUNCTION__); IRDA_DEBUG( 0, "%s(), Unknown event\n", __func__);
return -1; return -1;
} }
...@@ -1030,7 +1030,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1030,7 +1030,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
*/ */
if((!nextfit) && (skb->len > self->bytes_left)) { if((!nextfit) && (skb->len > self->bytes_left)) {
IRDA_DEBUG(0, "%s(), Not allowed to transmit" IRDA_DEBUG(0, "%s(), Not allowed to transmit"
" more bytes!\n", __FUNCTION__); " more bytes!\n", __func__);
/* Requeue the skb */ /* Requeue the skb */
skb_queue_head(&self->txq, skb_get(skb)); skb_queue_head(&self->txq, skb_get(skb));
/* /*
...@@ -1082,7 +1082,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1082,7 +1082,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
#endif /* CONFIG_IRDA_FAST_RR */ #endif /* CONFIG_IRDA_FAST_RR */
} else { } else {
IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n", IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n",
__FUNCTION__); __func__);
skb_queue_head(&self->txq, skb_get(skb)); skb_queue_head(&self->txq, skb_get(skb));
/* /*
...@@ -1094,7 +1094,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1094,7 +1094,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
break; break;
case POLL_TIMER_EXPIRED: case POLL_TIMER_EXPIRED:
IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n", IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n",
__FUNCTION__, jiffies); __func__, jiffies);
irlap_send_rr_frame(self, CMD_FRAME); irlap_send_rr_frame(self, CMD_FRAME);
/* Return to NRM properly - Jean II */ /* Return to NRM properly - Jean II */
self->window = self->window_size; self->window = self->window_size;
...@@ -1120,7 +1120,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1120,7 +1120,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
__FUNCTION__, irlap_event[event]); __func__, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -1138,7 +1138,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1138,7 +1138,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1173,7 +1173,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1173,7 +1173,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %d\n", __FUNCTION__, event); IRDA_DEBUG(1, "%s(), Unknown event %d\n", __func__, event);
ret = -1; ret = -1;
break; break;
...@@ -1297,7 +1297,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1297,7 +1297,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
} else { } else {
IRDA_DEBUG(4, IRDA_DEBUG(4,
"%s(), missing or duplicate frame!\n", "%s(), missing or duplicate frame!\n",
__FUNCTION__); __func__);
/* Update Nr received */ /* Update Nr received */
irlap_update_nr_received(self, info->nr); irlap_update_nr_received(self, info->nr);
...@@ -1367,7 +1367,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1367,7 +1367,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
(nr_status == NR_UNEXPECTED)) (nr_status == NR_UNEXPECTED))
{ {
IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n", IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n",
__FUNCTION__); __func__);
if (info->pf) { if (info->pf) {
/* Resend rejected frames */ /* Resend rejected frames */
irlap_resend_rejected_frames(self, CMD_FRAME); irlap_resend_rejected_frames(self, CMD_FRAME);
...@@ -1407,9 +1407,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1407,9 +1407,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
} }
IRDA_DEBUG(1, "%s(), Not implemented!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), Not implemented!\n", __func__);
IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n", IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n",
__FUNCTION__, irlap_event[event], ns_status, nr_status); __func__, irlap_event[event], ns_status, nr_status);
break; break;
case RECV_UI_FRAME: case RECV_UI_FRAME:
/* Poll bit cleared? */ /* Poll bit cleared? */
...@@ -1420,7 +1420,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1420,7 +1420,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
del_timer(&self->final_timer); del_timer(&self->final_timer);
irlap_data_indication(self, skb, TRUE); irlap_data_indication(self, skb, TRUE);
irlap_next_state(self, LAP_XMIT_P); irlap_next_state(self, LAP_XMIT_P);
IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __FUNCTION__, irlap_state[self->state]); IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __func__, irlap_state[self->state]);
irlap_start_poll_timer(self, self->poll_timeout); irlap_start_poll_timer(self, self->poll_timeout);
} }
break; break;
...@@ -1475,7 +1475,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1475,7 +1475,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
irlap_next_state(self, LAP_NRM_P); irlap_next_state(self, LAP_NRM_P);
} else if (ret == NR_INVALID) { } else if (ret == NR_INVALID) {
IRDA_DEBUG(1, "%s(), Received RR with " IRDA_DEBUG(1, "%s(), Received RR with "
"invalid nr !\n", __FUNCTION__); "invalid nr !\n", __func__);
irlap_next_state(self, LAP_RESET_WAIT); irlap_next_state(self, LAP_RESET_WAIT);
...@@ -1580,7 +1580,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1580,7 +1580,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
irlap_start_final_timer(self, 2 * self->final_timeout); irlap_start_final_timer(self, 2 * self->final_timeout);
break; break;
case RECV_RD_RSP: case RECV_RD_RSP:
IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __func__);
irlap_flush_all_queues(self); irlap_flush_all_queues(self);
irlap_next_state(self, LAP_XMIT_P); irlap_next_state(self, LAP_XMIT_P);
...@@ -1589,7 +1589,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1589,7 +1589,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %s\n", IRDA_DEBUG(1, "%s(), Unknown event %s\n",
__FUNCTION__, irlap_event[event]); __func__, irlap_event[event]);
ret = -1; ret = -1;
break; break;
...@@ -1609,7 +1609,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1609,7 +1609,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1635,7 +1635,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1635,7 +1635,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
irlap_next_state( self, LAP_PCLOSE); irlap_next_state( self, LAP_PCLOSE);
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]); irlap_event[event]);
ret = -1; ret = -1;
...@@ -1656,7 +1656,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1656,7 +1656,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1714,7 +1714,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1714,7 +1714,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
* state * state
*/ */
if (!info) { if (!info) {
IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __FUNCTION__); IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __func__);
irlap_initiate_connection_state(self); irlap_initiate_connection_state(self);
irlap_wait_min_turn_around(self, &self->qos_tx); irlap_wait_min_turn_around(self, &self->qos_tx);
irlap_send_ua_response_frame(self, &self->qos_rx); irlap_send_ua_response_frame(self, &self->qos_rx);
...@@ -1724,12 +1724,12 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1724,12 +1724,12 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
} else { } else {
IRDA_DEBUG(0, IRDA_DEBUG(0,
"%s(), SNRM frame contained an I field!\n", "%s(), SNRM frame contained an I field!\n",
__FUNCTION__); __func__);
} }
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %s\n", IRDA_DEBUG(1, "%s(), Unknown event %s\n",
__FUNCTION__, irlap_event[event]); __func__, irlap_event[event]);
ret = -1; ret = -1;
break; break;
...@@ -1749,7 +1749,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1749,7 +1749,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[event]);
IRDA_ASSERT(self != NULL, return -ENODEV;); IRDA_ASSERT(self != NULL, return -ENODEV;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
...@@ -1786,7 +1786,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1786,7 +1786,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
*/ */
if((!nextfit) && (skb->len > self->bytes_left)) { if((!nextfit) && (skb->len > self->bytes_left)) {
IRDA_DEBUG(0, "%s(), Not allowed to transmit" IRDA_DEBUG(0, "%s(), Not allowed to transmit"
" more bytes!\n", __FUNCTION__); " more bytes!\n", __func__);
/* Requeue the skb */ /* Requeue the skb */
skb_queue_head(&self->txq, skb_get(skb)); skb_queue_head(&self->txq, skb_get(skb));
...@@ -1832,7 +1832,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1832,7 +1832,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
ret = -EPROTO; ret = -EPROTO;
} }
} else { } else {
IRDA_DEBUG(2, "%s(), Unable to send!\n", __FUNCTION__); IRDA_DEBUG(2, "%s(), Unable to send!\n", __func__);
skb_queue_head(&self->txq, skb_get(skb)); skb_queue_head(&self->txq, skb_get(skb));
ret = -EPROTO; ret = -EPROTO;
} }
...@@ -1848,7 +1848,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1848,7 +1848,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
* when we return... - Jean II */ * when we return... - Jean II */
break; break;
default: default:
IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]); irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
...@@ -1871,7 +1871,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1871,7 +1871,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
int nr_status; int nr_status;
int ret = 0; int ret = 0;
IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]);
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1880,7 +1880,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1880,7 +1880,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
case RECV_I_CMD: /* Optimize for the common case */ case RECV_I_CMD: /* Optimize for the common case */
/* FIXME: must check for remote_busy below */ /* FIXME: must check for remote_busy below */
IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, " IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, "
"vr=%d, pf=%d\n", __FUNCTION__, "vr=%d, pf=%d\n", __func__,
irlap_event[event], info->nr, irlap_event[event], info->nr,
self->vs, info->ns, self->vr, info->pf); self->vs, info->ns, self->vr, info->pf);
...@@ -2112,21 +2112,21 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2112,21 +2112,21 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
irlap_next_state(self, LAP_NRM_S); irlap_next_state(self, LAP_NRM_S);
} else { } else {
IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n", IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n",
__FUNCTION__); __func__);
} }
break; break;
case RECV_SNRM_CMD: case RECV_SNRM_CMD:
/* SNRM frame is not allowed to contain an I-field */ /* SNRM frame is not allowed to contain an I-field */
if (!info) { if (!info) {
del_timer(&self->wd_timer); del_timer(&self->wd_timer);
IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __func__);
irlap_next_state(self, LAP_RESET_CHECK); irlap_next_state(self, LAP_RESET_CHECK);
irlap_reset_indication(self); irlap_reset_indication(self);
} else { } else {
IRDA_DEBUG(0, IRDA_DEBUG(0,
"%s(), SNRM frame contained an I-field!\n", "%s(), SNRM frame contained an I-field!\n",
__FUNCTION__); __func__);
} }
break; break;
...@@ -2158,7 +2158,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2158,7 +2158,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
* which explain why we use (self->N2 / 2) here !!! * which explain why we use (self->N2 / 2) here !!!
* Jean II * Jean II
*/ */
IRDA_DEBUG(1, "%s(), retry_count = %d\n", __FUNCTION__, IRDA_DEBUG(1, "%s(), retry_count = %d\n", __func__,
self->retry_count); self->retry_count);
if (self->retry_count < (self->N2 / 2)) { if (self->retry_count < (self->N2 / 2)) {
...@@ -2211,7 +2211,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2211,7 +2211,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
irlap_send_test_frame(self, self->caddr, info->daddr, skb); irlap_send_test_frame(self, self->caddr, info->daddr, skb);
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
...@@ -2228,7 +2228,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2228,7 +2228,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -ENODEV;); IRDA_ASSERT(self != NULL, return -ENODEV;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
...@@ -2285,7 +2285,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2285,7 +2285,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
break; /* stay in SCLOSE */ break; /* stay in SCLOSE */
} }
IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
...@@ -2301,7 +2301,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2301,7 +2301,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(1, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); IRDA_DEBUG(1, "%s(), event=%s\n", __func__, irlap_event[event]);
IRDA_ASSERT(self != NULL, return -ENODEV;); IRDA_ASSERT(self != NULL, return -ENODEV;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
...@@ -2322,7 +2322,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2322,7 +2322,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
irlap_next_state(self, LAP_SCLOSE); irlap_next_state(self, LAP_SCLOSE);
break; break;
default: default:
IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -44,7 +44,7 @@ inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, ...@@ -44,7 +44,7 @@ inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
skb->data[1] = slsap; skb->data[1] = slsap;
if (expedited) { if (expedited) {
IRDA_DEBUG(4, "%s(), sending expedited data\n", __FUNCTION__); IRDA_DEBUG(4, "%s(), sending expedited data\n", __func__);
irlap_data_request(self->irlap, skb, TRUE); irlap_data_request(self->irlap, skb, TRUE);
} else } else
irlap_data_request(self->irlap, skb, FALSE); irlap_data_request(self->irlap, skb, FALSE);
...@@ -60,7 +60,7 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, ...@@ -60,7 +60,7 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
{ {
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -95,7 +95,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -95,7 +95,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
__u8 dlsap_sel; /* Destination LSAP address */ __u8 dlsap_sel; /* Destination LSAP address */
__u8 *fp; __u8 *fp;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -117,7 +117,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -117,7 +117,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) { if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) {
IRDA_DEBUG(3, "%s(), incoming connection, " IRDA_DEBUG(3, "%s(), incoming connection, "
"source LSAP=%d, dest LSAP=%d\n", "source LSAP=%d, dest LSAP=%d\n",
__FUNCTION__, slsap_sel, dlsap_sel); __func__, slsap_sel, dlsap_sel);
/* Try to find LSAP among the unconnected LSAPs */ /* Try to find LSAP among the unconnected LSAPs */
lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD, lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD,
...@@ -125,7 +125,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -125,7 +125,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
/* Maybe LSAP was already connected, so try one more time */ /* Maybe LSAP was already connected, so try one more time */
if (!lsap) { if (!lsap) {
IRDA_DEBUG(1, "%s(), incoming connection for LSAP already connected\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), incoming connection for LSAP already connected\n", __func__);
lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0,
self->lsaps); self->lsaps);
} }
...@@ -136,12 +136,12 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -136,12 +136,12 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
if (lsap == NULL) { if (lsap == NULL) {
IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n"); IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n");
IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n", IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n",
__FUNCTION__, slsap_sel, dlsap_sel); __func__, slsap_sel, dlsap_sel);
if (fp[0] & CONTROL_BIT) { if (fp[0] & CONTROL_BIT) {
IRDA_DEBUG(2, "%s(), received control frame %02x\n", IRDA_DEBUG(2, "%s(), received control frame %02x\n",
__FUNCTION__, fp[2]); __func__, fp[2]);
} else { } else {
IRDA_DEBUG(2, "%s(), received data frame\n", __FUNCTION__); IRDA_DEBUG(2, "%s(), received data frame\n", __func__);
} }
return; return;
} }
...@@ -160,7 +160,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -160,7 +160,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
break; break;
case DISCONNECT: case DISCONNECT:
IRDA_DEBUG(4, "%s(), Disconnect indication!\n", IRDA_DEBUG(4, "%s(), Disconnect indication!\n",
__FUNCTION__); __func__);
irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION, irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION,
skb); skb);
break; break;
...@@ -172,7 +172,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -172,7 +172,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
break; break;
default: default:
IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n", IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n",
__FUNCTION__, fp[2]); __func__, fp[2]);
break; break;
} }
} else if (unreliable) { } else if (unreliable) {
...@@ -206,7 +206,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) ...@@ -206,7 +206,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
__u8 *fp; __u8 *fp;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -224,13 +224,13 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) ...@@ -224,13 +224,13 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
if (pid & 0x80) { if (pid & 0x80) {
IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", IRDA_DEBUG(0, "%s(), extension in PID not supp!\n",
__FUNCTION__); __func__);
return; return;
} }
/* Check if frame is addressed to the connectionless LSAP */ /* Check if frame is addressed to the connectionless LSAP */
if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) { if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) {
IRDA_DEBUG(0, "%s(), dropping frame!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), dropping frame!\n", __func__);
return; return;
} }
...@@ -254,7 +254,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) ...@@ -254,7 +254,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
if (lsap) if (lsap)
irlmp_connless_data_indication(lsap, skb); irlmp_connless_data_indication(lsap, skb);
else { else {
IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __FUNCTION__); IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __func__);
} }
} }
#endif /* CONFIG_IRDA_ULTRA */ #endif /* CONFIG_IRDA_ULTRA */
...@@ -270,7 +270,7 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap, ...@@ -270,7 +270,7 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap,
LAP_REASON reason, LAP_REASON reason,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(lap != NULL, return;); IRDA_ASSERT(lap != NULL, return;);
IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
...@@ -296,7 +296,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr, ...@@ -296,7 +296,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
__u32 daddr, struct qos_info *qos, __u32 daddr, struct qos_info *qos,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
/* Copy QoS settings for this session */ /* Copy QoS settings for this session */
self->qos = qos; self->qos = qos;
...@@ -317,7 +317,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr, ...@@ -317,7 +317,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos, void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -383,7 +383,7 @@ void irlmp_link_discovery_indication(struct lap_cb *self, ...@@ -383,7 +383,7 @@ void irlmp_link_discovery_indication(struct lap_cb *self,
*/ */
void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log) void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log)
{ {
IRDA_DEBUG(4, "%s()\n", __FUNCTION__); IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
......
...@@ -90,7 +90,7 @@ static int __init irda_init(void) ...@@ -90,7 +90,7 @@ static int __init irda_init(void)
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__); IRDA_DEBUG(0, "%s()\n", __func__);
/* Lower layer of the stack */ /* Lower layer of the stack */
irlmp_init(); irlmp_init();
......
...@@ -337,27 +337,27 @@ ...@@ -337,27 +337,27 @@
/* All error messages (will show up in the normal logs) */ /* All error messages (will show up in the normal logs) */
#define DERROR(dbg, format, args...) \ #define DERROR(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_INFO "irnet: %s(): " format, __FUNCTION__ , ##args);} printk(KERN_INFO "irnet: %s(): " format, __func__ , ##args);}
/* Normal debug message (will show up in /var/log/debug) */ /* Normal debug message (will show up in /var/log/debug) */
#define DEBUG(dbg, format, args...) \ #define DEBUG(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: %s(): " format, __FUNCTION__ , ##args);} printk(KERN_DEBUG "irnet: %s(): " format, __func__ , ##args);}
/* Entering a function (trace) */ /* Entering a function (trace) */
#define DENTER(dbg, format, args...) \ #define DENTER(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: -> %s" format, __FUNCTION__ , ##args);} printk(KERN_DEBUG "irnet: -> %s" format, __func__ , ##args);}
/* Entering and exiting a function in one go (trace) */ /* Entering and exiting a function in one go (trace) */
#define DPASS(dbg, format, args...) \ #define DPASS(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: <>%s" format, __FUNCTION__ , ##args);} printk(KERN_DEBUG "irnet: <>%s" format, __func__ , ##args);}
/* Exiting a function (trace) */ /* Exiting a function (trace) */
#define DEXIT(dbg, format, args...) \ #define DEXIT(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: <-%s()" format, __FUNCTION__ , ##args);} printk(KERN_DEBUG "irnet: <-%s()" format, __func__ , ##args);}
/* Exit a function with debug */ /* Exit a function with debug */
#define DRETURN(ret, dbg, args...) \ #define DRETURN(ret, dbg, args...) \
......
...@@ -40,7 +40,7 @@ static struct net_device * ifname_to_netdev(struct net *net, struct genl_info *i ...@@ -40,7 +40,7 @@ static struct net_device * ifname_to_netdev(struct net *net, struct genl_info *i
ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]); ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]);
IRDA_DEBUG(5, "%s(): Looking for %s\n", __FUNCTION__, ifname); IRDA_DEBUG(5, "%s(): Looking for %s\n", __func__, ifname);
return dev_get_by_name(net, ifname); return dev_get_by_name(net, ifname);
} }
...@@ -56,7 +56,7 @@ static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info) ...@@ -56,7 +56,7 @@ static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info)
mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]); mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]);
IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __FUNCTION__, mode); IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __func__, mode);
dev = ifname_to_netdev(&init_net, info); dev = ifname_to_netdev(&init_net, info);
if (!dev) if (!dev)
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -1427,7 +1427,7 @@ static void llc_process_tmr_ev(struct sock *sk, struct sk_buff *skb) ...@@ -1427,7 +1427,7 @@ static void llc_process_tmr_ev(struct sock *sk, struct sk_buff *skb)
{ {
if (llc_sk(sk)->state == LLC_CONN_OUT_OF_SVC) { if (llc_sk(sk)->state == LLC_CONN_OUT_OF_SVC) {
printk(KERN_WARNING "%s: timer called on closed connection\n", printk(KERN_WARNING "%s: timer called on closed connection\n",
__FUNCTION__); __func__);
kfree_skb(skb); kfree_skb(skb);
} else { } else {
if (!sock_owned_by_user(sk)) if (!sock_owned_by_user(sk))
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -2176,7 +2176,7 @@ static int __init af_unix_init(void) ...@@ -2176,7 +2176,7 @@ static int __init af_unix_init(void)
rc = proto_register(&unix_proto, 1); rc = proto_register(&unix_proto, 1);
if (rc != 0) { if (rc != 0) {
printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n", printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n",
__FUNCTION__); __func__);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册