skb->dev = __find_vlan_dev(dev, vid);
if (!skb->dev) {
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;
}
ntohs(vhdr->h_vlan_TCI));
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) {
case PACKET_BROADCAST: /* Yeah, stats collect these together.. */
struct net_device *vdev = dev;
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);
/* build vlan header only if re_order_header flag is NOT set. This
return -ENOMEM;
}
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) {
vlan_dev_info(dev)->cnt_encap_on_xmit++;
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
* like:
* usr_priority: 3 bits (high bits)
}
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",
veth->h_dest[0], veth->h_dest[1], veth->h_dest[2],
veth->h_dest[3], veth->h_dest[4], veth->h_dest[5],
return 0;
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();
return -ENOBUFS;
}
if (errno == 0) {
/* TODO: if error isn't found, add it dynamically */
errstr[len] = 0;
- printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__,
+ printk(KERN_ERR "%s: errstr :%s: not found\n", __func__,
errstr);
errno = 1;
}
err = sysfs_create_group(brobj, &bridge_group);
if (err) {
pr_info("%s: can't create group %s/%s\n",
- __FUNCTION__, dev->name, bridge_group.name);
+ __func__, dev->name, bridge_group.name);
goto out1;
}
err = sysfs_create_bin_file(brobj, &bridge_forward);
if (err) {
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;
}
br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj);
if (!br->ifobj) {
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;
}
return 0;
if (atomic_read(&sk->sk_omem_alloc))
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);
sk_prot_free(sk->sk_prot_creator, sk);
* DCCP - specific warning and debugging macros.
*/
#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, \
- __FILE__, __LINE__, __FUNCTION__)
+ __FILE__, __LINE__, __func__)
#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
#define DCCP_BUG_ON(cond) do { if (unlikely((cond) != 0)) \
DCCP_BUG("\"%s\" holds (exception!)", \
printk(fmt, ##args); \
} while(0)
#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
extern int dccp_debug;
do { \
if (unlikely(!(expr))) { \
printkl(KERN_ERR PFX "ASSERTION FAILED (%s) at: %s:%d:%s()\n", #expr, \
- __FILE__, __LINE__, __FUNCTION__); \
+ __FILE__, __LINE__, __func__); \
} \
} while (0)
#else
if (sysctl_ip_dynaddr > 1) {
printk(KERN_INFO "%s(): shifting inet->"
"saddr from %d.%d.%d.%d to %d.%d.%d.%d\n",
- __FUNCTION__,
+ __func__,
NIPQUAD(old_saddr),
NIPQUAD(new_saddr));
}
IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
"%u.%u.%u.%u:%u to app %s on port %u\n",
- __FUNCTION__,
+ __func__,
NIPQUAD(cp->caddr), ntohs(cp->cport),
NIPQUAD(cp->vaddr), ntohs(cp->vport),
inc->name, ntohs(inc->port));
IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
"%u.%u.%u.%u:%u to app %s on port %u\n",
- __FUNCTION__,
+ __func__,
NIPQUAD(cp->caddr), ntohs(cp->cport),
NIPQUAD(cp->vaddr), ntohs(cp->vport),
inc->name, ntohs(inc->port));
if (!tinfo)
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",
sizeof(struct ip_vs_sync_conn));
(state == IP_VS_STATE_BACKUP && !sync_backup_pid))
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",
(state == IP_VS_STATE_MASTER) ?
sync_master_pid : sync_backup_pid);
do { \
if (!(x)) \
printk("ARP_NF_ASSERT: %s:%s:%u\n", \
- __FUNCTION__, __FILE__, __LINE__); \
+ __func__, __FILE__, __LINE__); \
} while(0)
#else
#define ARP_NF_ASSERT(x)
do { \
if (!(x)) \
printk("IP_NF_ASSERT: %s:%s:%u\n", \
- __FUNCTION__, __FILE__, __LINE__); \
+ __func__, __FILE__, __LINE__); \
} while(0)
#else
#define IP_NF_ASSERT(x)
* cases we should never reach this piece of code.
*/
printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n",
- __FUNCTION__, sk->sk_state);
+ __func__, sk->sk_state);
break;
}
#ifdef CONFIG_PROC_FS
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
return;
out_unregister_proto:
proto_unregister(&udplite_prot);
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);
if (snmp6_alloc_dev(ndev) < 0) {
ADBG((KERN_WARNING
"%s(): cannot allocate memory for statistics; dev=%s.\n",
- __FUNCTION__, dev->name));
+ __func__, dev->name));
neigh_parms_release(&nd_tbl, ndev->nd_parms);
ndev->dead = 1;
in6_dev_finish_destroy(ndev);
if (snmp6_register_dev(ndev) < 0) {
ADBG((KERN_WARNING
"%s(): cannot create /proc/net/dev_snmp6/%s\n",
- __FUNCTION__, dev->name));
+ __func__, dev->name));
neigh_parms_release(&nd_tbl, ndev->nd_parms);
ndev->dead = 1;
in6_dev_finish_destroy(ndev);
rcu_read_unlock();
ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n",
- __FUNCTION__,
+ __func__,
NIP6(*addr), type, ifindex,
label);
int addrtype;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n",
- __FUNCTION__,
+ __func__,
NIP6(*prefix), prefixlen,
ifindex,
(unsigned int)label);
int ret = 0;
ADDRLABEL(KERN_DEBUG "%s(newp=%p, replace=%d)\n",
- __FUNCTION__,
+ __func__,
newp, replace);
if (hlist_empty(&ip6addrlbl_table.head)) {
int ret = 0;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n",
- __FUNCTION__,
+ __func__,
NIP6(*prefix), prefixlen,
ifindex,
(unsigned int)label,
int ret = -ESRCH;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
- __FUNCTION__,
+ __func__,
NIP6(*prefix), prefixlen,
ifindex);
int ret;
ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
- __FUNCTION__,
+ __func__,
NIP6(*prefix), prefixlen,
ifindex);
int err = 0;
int i;
- ADDRLABEL(KERN_DEBUG "%s()\n", __FUNCTION__);
+ ADDRLABEL(KERN_DEBUG "%s()\n", __func__);
for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) {
int ret = ip6addrlbl_add(ip6addrlbl_init_table[i].prefix,
#define IPV6_TLV_TEL_DST_SIZE 8
#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
#define IP6_TNL_TRACE(x...) do {;} while(0)
#endif
static int mip6_destopt_init_state(struct xfrm_state *x)
{
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);
return -EINVAL;
}
if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
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;
}
static int mip6_rthdr_init_state(struct xfrm_state *x)
{
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);
return -EINVAL;
}
if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
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;
}
printk(KERN_INFO "Mobile IPv6\n");
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;
}
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;
}
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;
}
static void __exit mip6_fini(void)
{
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)
- 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)
- 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);
if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) {
ND_PRINTK2(KERN_WARNING
"%s(): duplicated ND6 option found: type=%d\n",
- __FUNCTION__,
+ __func__,
nd_opt->nd_opt_type);
} else {
ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
*/
ND_PRINTK2(KERN_NOTICE
"%s(): ignored unsupported option; type=%d, len=%d\n",
- __FUNCTION__,
+ __func__,
nd_opt->nd_opt_type, nd_opt->nd_opt_len);
}
}
if (!skb) {
ND_PRINTK0(KERN_ERR
"ICMPv6 ND: %s() failed to allocate an skb.\n",
- __FUNCTION__);
+ __func__);
dst_release(dst);
return;
}
ND_PRINTK1(KERN_DEBUG
"%s(): trying to ucast probe in NUD_INVALID: "
NIP6_FMT "\n",
- __FUNCTION__,
+ __func__,
NIP6(*target));
}
ndisc_send_ns(dev, neigh, target, target, saddr);
if (rt == NULL) {
ND_PRINTK0(KERN_ERR
"ICMPv6 RA: %s() failed to add default route.\n",
- __FUNCTION__);
+ __func__);
in6_dev_put(in6_dev);
return;
}
if (neigh == NULL) {
ND_PRINTK0(KERN_ERR
"ICMPv6 RA: %s() got default router without neighbour.\n",
- __FUNCTION__);
+ __func__);
dst_release(&rt->u.dst);
in6_dev_put(in6_dev);
return;
if (buff == NULL) {
ND_PRINTK0(KERN_ERR
"ICMPv6 Redirect: %s() failed to allocate an skb.\n",
- __FUNCTION__);
+ __func__);
dst_release(dst);
return;
}
do { \
if (!(x)) \
printk("IP_NF_ASSERT: %s:%s:%u\n", \
- __FUNCTION__, __FILE__, __LINE__); \
+ __func__, __FILE__, __LINE__); \
} while(0)
#else
#define IP_NF_ASSERT(x)
{
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.
This means that the ip6tables jump stack is now crap. We
must return an absolute verdict. --RR */
struct net *net;
RT6_TRACE("%s(fn->leaf=%p, oif=%d)\n",
- __FUNCTION__, fn->leaf, oif);
+ __func__, fn->leaf, oif);
rt0 = fn->rr_ptr;
if (!rt0)
}
RT6_TRACE("%s() => %p\n",
- __FUNCTION__, match);
+ __func__, match);
net = rt0->rt6i_dev->nd_net;
return (match ? match : net->ipv6.ip6_null_entry);
hp = tcp_get_md5sig_pool();
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;
}
bp = &hp->md5_blk.ip6;
/* Now store the hash into the packet */
err = crypto_hash_init(desc);
if (err) {
- printk(KERN_WARNING "%s(): hash_init failed\n", __FUNCTION__);
+ printk(KERN_WARNING "%s(): hash_init failed\n", __func__);
goto clear_hash;
}
err = crypto_hash_update(desc, sg, nbytes);
if (err) {
- printk(KERN_WARNING "%s(): hash_update failed\n", __FUNCTION__);
+ printk(KERN_WARNING "%s(): hash_update failed\n", __func__);
goto clear_hash;
}
err = crypto_hash_final(desc, md5_hash);
if (err) {
- printk(KERN_WARNING "%s(): hash_final failed\n", __FUNCTION__);
+ printk(KERN_WARNING "%s(): hash_final failed\n", __func__);
goto clear_hash;
}
struct sock *sk;
int err;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
self = instance;
sk = instance;
err = sock_queue_rcv_skb(sk, skb);
if (err) {
- IRDA_DEBUG(1, "%s(), error: no more mem!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), error: no more mem!\n", __func__);
self->rx_flow = FLOW_STOP;
/* When we return error, TTP will need to requeue the skb */
self = instance;
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
/* Don't care about it, but let's not leak it */
if(skb)
sk = instance;
if (sk == NULL) {
IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n",
- __FUNCTION__, self);
+ __func__, self);
return;
}
self = instance;
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
sk = instance;
if (sk == NULL) {
case SOCK_STREAM:
if (max_sdu_size != 0) {
IRDA_ERROR("%s: max_sdu_size must be 0\n",
- __FUNCTION__);
+ __func__);
return;
}
self->max_data_size = irttp_get_max_seg_size(self->tsap);
case SOCK_SEQPACKET:
if (max_sdu_size == 0) {
IRDA_ERROR("%s: max_sdu_size cannot be 0\n",
- __FUNCTION__);
+ __func__);
return;
}
self->max_data_size = max_sdu_size;
self->max_data_size = irttp_get_max_seg_size(self->tsap);
}
- IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__,
self->max_data_size);
memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
self = instance;
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
sk = instance;
if (sk == NULL) {
case SOCK_STREAM:
if (max_sdu_size != 0) {
IRDA_ERROR("%s: max_sdu_size must be 0\n",
- __FUNCTION__);
+ __func__);
kfree_skb(skb);
return;
}
case SOCK_SEQPACKET:
if (max_sdu_size == 0) {
IRDA_ERROR("%s: max_sdu_size cannot be 0\n",
- __FUNCTION__);
+ __func__);
kfree_skb(skb);
return;
}
self->max_data_size = irttp_get_max_seg_size(self->tsap);
}
- IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__,
self->max_data_size);
memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
{
struct sk_buff *skb;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER,
GFP_ATOMIC);
if (skb == NULL) {
IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n",
- __FUNCTION__);
+ __func__);
return;
}
struct irda_sock *self;
struct sock *sk;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
self = instance;
sk = instance;
switch (flow) {
case FLOW_STOP:
IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n",
- __FUNCTION__);
+ __func__);
self->tx_flow = flow;
break;
case FLOW_START:
self->tx_flow = flow;
IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n",
- __FUNCTION__);
+ __func__);
wake_up_interruptible(sk->sk_sleep);
break;
default:
- IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __func__);
/* Unknown flow command, better stop */
self->tx_flow = flow;
break;
self = (struct irda_sock *) priv;
if (!self) {
- IRDA_WARNING("%s: lost myself!\n", __FUNCTION__);
+ IRDA_WARNING("%s: lost myself!\n", __func__);
return;
}
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
/* We probably don't need to make any more queries */
iriap_close(self->iriap);
/* Check if request succeeded */
if (result != IAS_SUCCESS) {
- IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __FUNCTION__,
+ IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __func__,
result);
self->errno = result; /* We really need it later */
{
struct irda_sock *self;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
self = (struct irda_sock *) priv;
if (!self) {
- IRDA_WARNING("%s: lost myself!\n", __FUNCTION__);
+ IRDA_WARNING("%s: lost myself!\n", __func__);
return;
}
{
struct irda_sock *self;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
self = (struct irda_sock *) priv;
BUG_ON(self == NULL);
notify_t notify;
if (self->tsap) {
- IRDA_WARNING("%s: busy!\n", __FUNCTION__);
+ IRDA_WARNING("%s: busy!\n", __func__);
return -EBUSY;
}
¬ify);
if (self->tsap == NULL) {
IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n",
- __FUNCTION__);
+ __func__);
return -ENOMEM;
}
/* Remember which TSAP selector we actually got */
notify_t notify;
if (self->lsap) {
- IRDA_WARNING("%s(), busy!\n", __FUNCTION__);
+ IRDA_WARNING("%s(), busy!\n", __func__);
return -EBUSY;
}
self->lsap = irlmp_open_lsap(LSAP_CONNLESS, ¬ify, pid);
if (self->lsap == NULL) {
- IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __FUNCTION__);
+ IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __func__);
return -ENOMEM;
}
*/
static int irda_find_lsap_sel(struct irda_sock *self, char *name)
{
- IRDA_DEBUG(2, "%s(%p, %s)\n", __FUNCTION__, self, name);
+ IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name);
if (self->iriap) {
IRDA_WARNING("%s(): busy with a previous query\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
switch (self->ias_result->type) {
case IAS_INTEGER:
IRDA_DEBUG(4, "%s() int=%d\n",
- __FUNCTION__, self->ias_result->t.integer);
+ __func__, self->ias_result->t.integer);
if (self->ias_result->t.integer != -1)
self->dtsap_sel = self->ias_result->t.integer;
break;
default:
self->dtsap_sel = 0;
- IRDA_DEBUG(0, "%s(), bad type!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), bad type!\n", __func__);
break;
}
if (self->ias_result)
__u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */
__u8 dtsap_sel = 0x0; /* TSAP associated with it */
- IRDA_DEBUG(2, "%s(), name=%s\n", __FUNCTION__, name);
+ IRDA_DEBUG(2, "%s(), name=%s\n", __func__, name);
/* Ask lmp for the current discovery log
* Note : we have to use irlmp_get_discoveries(), as opposed
self->daddr = discoveries[i].daddr;
self->saddr = 0x0;
IRDA_DEBUG(1, "%s(), trying daddr = %08x\n",
- __FUNCTION__, self->daddr);
+ __func__, self->daddr);
/* Query remote LM-IAS for this service */
err = irda_find_lsap_sel(self, name);
/* We found the requested service */
if(daddr != DEV_ADDR_ANY) {
IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n",
- __FUNCTION__, name);
+ __func__, name);
self->daddr = DEV_ADDR_ANY;
kfree(discoveries);
return(-ENOTUNIQ);
break;
default:
/* Something bad did happen :-( */
- IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__);
self->daddr = DEV_ADDR_ANY;
kfree(discoveries);
return(-EHOSTUNREACH);
/* Check out what we found */
if(daddr == DEV_ADDR_ANY) {
IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n",
- __FUNCTION__, name);
+ __func__, name);
self->daddr = DEV_ADDR_ANY;
return(-EADDRNOTAVAIL);
}
self->dtsap_sel = dtsap_sel;
IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n",
- __FUNCTION__, name, self->daddr);
+ __func__, name, self->daddr);
return 0;
}
saddr.sir_addr = self->saddr;
}
- IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __FUNCTION__, saddr.sir_lsap_sel);
- IRDA_DEBUG(1, "%s(), addr = %08x\n", __FUNCTION__, saddr.sir_addr);
+ IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel);
+ IRDA_DEBUG(1, "%s(), addr = %08x\n", __func__, saddr.sir_addr);
/* uaddr_len come to us uninitialised */
*uaddr_len = sizeof (struct sockaddr_irda);
{
struct sock *sk = sock->sk;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) &&
(sk->sk_type != SOCK_DGRAM))
struct irda_sock *self = irda_sk(sk);
int err;
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
if (addr_len != sizeof(struct sockaddr_irda))
return -EINVAL;
(sk->sk_protocol == IRDAPROTO_ULTRA)) {
self->pid = addr->sir_lsap_sel;
if (self->pid & 0x80) {
- IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__);
return -EOPNOTSUPP;
}
err = irda_open_lsap(self, self->pid);
struct sk_buff *skb;
int err;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
err = irda_create(sk->sk_net, newsock, sk->sk_protocol);
if (err)
/* Now attach up the new socket */
new->tsap = irttp_dup(self->tsap, new);
if (!new->tsap) {
- IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
kfree_skb(skb);
return -1;
}
struct irda_sock *self = irda_sk(sk);
int err;
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
/* Don't allow connect for Ultra sockets */
if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA))
/* Try to find one suitable */
err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name);
if (err) {
- IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __func__);
return err;
}
} else {
/* Use the one provided by the user */
self->daddr = addr->sir_addr;
- IRDA_DEBUG(1, "%s(), daddr = %08x\n", __FUNCTION__, self->daddr);
+ IRDA_DEBUG(1, "%s(), daddr = %08x\n", __func__, self->daddr);
/* If we don't have a valid service name, we assume the
* user want to connect on a specific LSAP. Prevent
/* Query remote LM-IAS using service name */
err = irda_find_lsap_sel(self, addr->sir_name);
if (err) {
- IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
return err;
}
} else {
self->saddr, self->daddr, NULL,
self->max_sdu_size_rx, NULL);
if (err) {
- IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
return err;
}
struct sock *sk;
struct irda_sock *self;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
if (net != &init_net)
return -EAFNOSUPPORT;
return -ENOMEM;
self = irda_sk(sk);
- IRDA_DEBUG(2, "%s() : self is %p\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s() : self is %p\n", __func__, self);
init_waitqueue_head(&self->query_wait);
*/
static void irda_destroy_socket(struct irda_sock *self)
{
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
/* Unregister with IrLMP */
irlmp_unregister_client(self->ckey);
{
struct sock *sk = sock->sk;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
if (sk == NULL)
return 0;
struct sk_buff *skb;
int err = -EPIPE;
- IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len);
+ IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
/* Note : socket.c set MSG_EOR on SEQPACKET sockets */
if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT |
/* Check that we don't send out too big frames */
if (len > self->max_data_size) {
IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n",
- __FUNCTION__, len, self->max_data_size);
+ __func__, len, self->max_data_size);
len = self->max_data_size;
}
*/
err = irttp_data_request(self->tsap, skb);
if (err) {
- IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
+ IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
goto out_err;
}
/* Tell client how much data we actually sent */
size_t copied;
int err;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
if ((err = sock_error(sk)) < 0)
return err;
if (copied > size) {
IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n",
- __FUNCTION__, copied, size);
+ __func__, copied, size);
copied = size;
msg->msg_flags |= MSG_TRUNC;
}
*/
if (self->rx_flow == FLOW_STOP) {
if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
- IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__);
self->rx_flow = FLOW_START;
irttp_flow_request(self->tsap, FLOW_START);
}
int target, err;
long timeo;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
if ((err = sock_error(sk)) < 0)
return err;
/* put the skb back if we didn't use it up.. */
if (skb->len) {
IRDA_DEBUG(1, "%s(), back on q!\n",
- __FUNCTION__);
+ __func__);
skb_queue_head(&sk->sk_receive_queue, skb);
break;
}
kfree_skb(skb);
} else {
- IRDA_DEBUG(0, "%s() questionable!?\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() questionable!?\n", __func__);
/* put message back and return */
skb_queue_head(&sk->sk_receive_queue, skb);
*/
if (self->rx_flow == FLOW_STOP) {
if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
- IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__);
self->rx_flow = FLOW_START;
irttp_flow_request(self->tsap, FLOW_START);
}
struct sk_buff *skb;
int err;
- IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len);
+ IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
return -EINVAL;
if (len > self->max_data_size) {
IRDA_DEBUG(0, "%s(), Warning to much data! "
"Chopping frame from %zd to %d bytes!\n",
- __FUNCTION__, len, self->max_data_size);
+ __func__, len, self->max_data_size);
len = self->max_data_size;
}
skb_reserve(skb, self->max_header_size);
skb_reset_transport_header(skb);
- IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), appending user data\n", __func__);
skb_put(skb, len);
err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
if (err) {
*/
err = irttp_udata_request(self->tsap, skb);
if (err) {
- IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
+ IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
return err;
}
return len;
struct sk_buff *skb;
int err;
- IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len);
+ IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
return -EINVAL;
pid = addr->sir_lsap_sel;
if (pid & 0x80) {
- IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__);
return -EOPNOTSUPP;
}
} else {
if ((self->lsap == NULL) ||
(sk->sk_state != TCP_ESTABLISHED)) {
IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n",
- __FUNCTION__);
+ __func__);
return -ENOTCONN;
}
/* Use PID from socket */
if (len > self->max_data_size) {
IRDA_DEBUG(0, "%s(), Warning to much data! "
"Chopping frame from %zd to %d bytes!\n",
- __FUNCTION__, len, self->max_data_size);
+ __func__, len, self->max_data_size);
len = self->max_data_size;
}
skb_reserve(skb, self->max_header_size);
skb_reset_transport_header(skb);
- IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), appending user data\n", __func__);
skb_put(skb, len);
err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
if (err) {
err = irlmp_connless_data_request((bound ? self->lsap : NULL),
skb, pid);
if (err) {
- IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
+ IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
return err;
}
return len;
struct sock *sk = sock->sk;
struct irda_sock *self = irda_sk(sk);
- IRDA_DEBUG(1, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(1, "%s(%p)\n", __func__, self);
sk->sk_state = TCP_CLOSE;
sk->sk_shutdown |= SEND_SHUTDOWN;
struct irda_sock *self = irda_sk(sk);
unsigned int mask;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
poll_wait(file, sk->sk_sleep, wait);
mask = 0;
if (sk->sk_err)
mask |= POLLERR;
if (sk->sk_shutdown & RCV_SHUTDOWN) {
- IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__);
mask |= POLLHUP;
}
switch (sk->sk_type) {
case SOCK_STREAM:
if (sk->sk_state == TCP_CLOSE) {
- IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__);
mask |= POLLHUP;
}
{
struct sock *sk = sock->sk;
- IRDA_DEBUG(4, "%s(), cmd=%#x\n", __FUNCTION__, cmd);
+ IRDA_DEBUG(4, "%s(), cmd=%#x\n", __func__, cmd);
switch (cmd) {
case TIOCOUTQ: {
case SIOCSIFMETRIC:
return -EINVAL;
default:
- IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __func__);
return -ENOIOCTLCMD;
}
struct ias_attrib * ias_attr; /* Attribute in IAS object */
int opt, free_ias = 0;
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
if (level != SOL_IRLMP)
return -ENOPROTOOPT;
/* Check is the user space own the object */
if(ias_attr->value->owner != IAS_USER_ATTR) {
- IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __func__);
kfree(ias_opt);
return -EPERM;
}
/* Only possible for a seqpacket service (TTP with SAR) */
if (sk->sk_type != SOCK_SEQPACKET) {
IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n",
- __FUNCTION__, opt);
+ __func__, opt);
self->max_sdu_size_rx = opt;
} else {
IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n",
- __FUNCTION__);
+ __func__);
return -ENOPROTOOPT;
}
break;
int err;
int offset, total;
- IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
if (level != SOL_IRLMP)
return -ENOPROTOOPT;
/* Check that we can proceed with IAP */
if (self->iriap) {
IRDA_WARNING("%s: busy with a previous query\n",
- __FUNCTION__);
+ __func__);
kfree(ias_opt);
return -EBUSY;
}
if (!self->cachedaddr) {
int ret = 0;
- IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __func__);
/* Set watchdog timer to expire in <val> ms. */
self->errno = 0;
if(timer_pending(&(self->watchdog)))
del_timer(&(self->watchdog));
- IRDA_DEBUG(1, "%s(), ...waking up !\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__);
if (ret != 0)
return ret;
}
else
IRDA_DEBUG(1, "%s(), found immediately !\n",
- __FUNCTION__);
+ __func__);
/* Tell IrLMP that we have been notified */
irlmp_update_client(self->ckey, self->mask.word,
{
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
int i = 0; /* How many we expired */
IRDA_ASSERT(log != NULL, return;);
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
spin_lock_irqsave(&log->hb_spinlock, flags);
{
ircomm = hashbin_new(HB_LOCK);
if (ircomm == NULL) {
- IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__);
+ IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
return -ENOMEM;
}
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);
struct ircomm_cb *self = NULL;
int ret;
- IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ ,
service_type);
IRDA_ASSERT(ircomm != NULL, return NULL;);
*/
static int __ircomm_close(struct ircomm_cb *self)
{
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
/* Disconnect link if any */
ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
IRDA_ASSERT(self != NULL, 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);
struct ircomm_info info;
int ret;
- IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2 , "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
{
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 */
if (skb->len > 0)
info->qos, info->max_data_size,
info->max_header_size, skb);
else {
- IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
}
}
IRDA_ASSERT(self != NULL, 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);
void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
if (self->notify.connect_confirm )
self->notify.connect_confirm(self->notify.instance,
info->max_data_size,
info->max_header_size, skb);
else {
- IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
}
}
{
int ret;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -EFAULT;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
*/
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;);
if (self->notify.data_indication)
self->notify.data_indication(self->notify.instance, self, skb);
else {
- IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
}
}
*/
if (unlikely(skb->len < (clen + 1))) {
IRDA_DEBUG(2, "%s() throwing away illegal frame\n",
- __FUNCTION__ );
+ __func__ );
return;
}
ircomm_data_indication(self, skb);
else {
IRDA_DEBUG(4, "%s(), data was control info only!\n",
- __FUNCTION__ );
+ __func__ );
}
}
{
int ret;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -EFAULT;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
static void ircomm_control_indication(struct ircomm_cb *self,
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 */
if (self->notify.udata_indication) {
* see ircomm_tty_control_indication(). */
dev_kfree_skb(ctrl_skb);
} else {
- IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
}
}
struct ircomm_info info;
int ret;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info)
{
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(info != NULL, return;);
self->notify.disconnect_indication(self->notify.instance, self,
info->reason, skb);
} else {
- IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
}
}
*/
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->magic == IRCOMM_MAGIC, return;);
ircomm_connect_indication(self, skb, info);
break;
default:
- IRDA_DEBUG(4, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ ,
ircomm_event[event]);
ret = -EINVAL;
}
ircomm_disconnect_indication(self, skb, info);
break;
default:
- IRDA_DEBUG(0, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ ,
ircomm_event[event]);
ret = -EINVAL;
}
ircomm_disconnect_indication(self, skb, info);
break;
default:
- IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
ircomm_event[event]);
ret = -EINVAL;
}
ret = self->issue.disconnect_request(self, skb, info);
break;
default:
- IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
ircomm_event[event]);
ret = -EINVAL;
}
int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
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]);
return (*state[self->state])(self, event, skb, info);
{
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);
}
{
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 */
if(userdata)
struct sk_buff *tx_skb;
int ret;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
/* Any userdata supplied? */
if (userdata == NULL) {
struct sk_buff *tx_skb;
int ret;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
if (!userdata) {
tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
cb = (struct irda_skb_cb *) skb->cb;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
line = cb->line;
self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
if (!self) {
- IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ );
return;
}
self->pkt_count--;
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;
if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance,
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() */
skb_get(skb);
skb->destructor = ircomm_lmp_flow_control;
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;
if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance,
}
ret = irlmp_data_request(self->lsap, skb);
if (ret) {
- IRDA_ERROR("%s(), failed\n", __FUNCTION__);
+ IRDA_ERROR("%s(), failed\n", __func__);
/* irlmp_data_request already free the packet */
}
{
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->magic == IRCOMM_MAGIC, return -1;);
struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
{
notify_t notify;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
/* Register callbacks */
irda_notify_init(¬ify);
self->lsap = irlmp_open_lsap(LSAP_ANY, ¬ify, 0);
if (!self->lsap) {
- IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ );
+ IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ );
return -1;
}
self->slsap_sel = self->lsap->slsap_sel;
struct sk_buff *skb;
int count;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
count = irda_param_insert(self, pi, skb_tail_pointer(skb),
skb_tailroom(skb), &ircomm_param_info);
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);
return -1;
}
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) {
/* ircomm_tty_do_softint will take care of the rest */
service_type &= self->service_type;
if (!service_type) {
IRDA_DEBUG(2,
- "%s(), No common service type to use!\n", __FUNCTION__ );
+ "%s(), No common service type to use!\n", __func__ );
return -1;
}
- IRDA_DEBUG(0, "%s(), services in common=%02x\n", __FUNCTION__ ,
+ IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ ,
service_type);
/*
else if (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);
/*
else {
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);
}
return 0;
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get) {
- IRDA_DEBUG(0, "%s(), not imp!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), not imp!\n", __func__ );
} 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);
}
else
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;
}
else
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;
}
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);
return 0;
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);
return 0;
static int ircomm_param_line_status(void *instance, irda_param_t *param,
int get)
{
- IRDA_DEBUG(2, "%s(), not impl.\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), not impl.\n", __func__ );
return 0;
}
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
__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;
/* Check if any of the settings have changed */
if (dce & 0x0f) {
if (dce & IRCOMM_DELTA_CTS) {
- IRDA_DEBUG(2, "%s(), CTS \n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), CTS \n", __func__ );
}
}
{
notify_t notify;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
/* Register callbacks */
irda_notify_init(¬ify);
self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT,
¬ify);
if (!self->tsap) {
- IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ );
return -1;
}
self->slsap_sel = self->tsap->stsap_sel;
{
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 */
if(userdata)
{
int ret;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
/* Don't forget to refcount it - should be NULL anyway */
if(userdata)
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
ret = irttp_data_request(self->tsap, skb);
if (ret) {
- IRDA_ERROR("%s(), failed\n", __FUNCTION__);
+ IRDA_ERROR("%s(), failed\n", __func__);
/* irttp_data_request already free the packet */
}
{
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->magic == IRCOMM_MAGIC, return -1;);
struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
if (max_sdu_size != TTP_SAR_DISABLE) {
IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
- __FUNCTION__);
+ __func__);
goto out;
}
struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
if (max_sdu_size != TTP_SAR_DISABLE) {
IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
- __FUNCTION__);
+ __func__);
goto out;
}
struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
{
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->magic == IRCOMM_MAGIC, return;);
return -ENOMEM;
ircomm_tty = hashbin_new(HB_LOCK);
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);
return -ENOMEM;
}
tty_set_operations(driver, &ops);
if (tty_register_driver(driver)) {
IRDA_ERROR("%s(): Couldn't register serial driver\n",
- __FUNCTION__);
+ __func__);
put_tty_driver(driver);
return -1;
}
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->magic == IRCOMM_TTY_MAGIC, return;);
{
int ret;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
ret = tty_unregister_driver(driver);
if (ret) {
IRDA_ERROR("%s(), failed to unregister driver\n",
- __FUNCTION__);
+ __func__);
return;
}
notify_t notify;
int ret = -ENODEV;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Check if already open */
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;
}
/* Connect IrCOMM link with remote device */
ret = ircomm_tty_attach_cable(self);
if (ret < 0) {
- IRDA_ERROR("%s(), error attaching cable!\n", __FUNCTION__);
+ IRDA_ERROR("%s(), error attaching cable!\n", __func__);
goto err;
}
unsigned long flags;
struct tty_struct *tty;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
tty = self->tty;
if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){
/* nonblock mode is set or port is not enabled */
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;
}
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;
}
unsigned long flags;
int ret;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
line = tty->index;
if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
/* No, so make new instance */
self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
if (self == NULL) {
- IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__);
+ IRDA_ERROR("%s(), kmalloc failed!\n", __func__);
return -ENOMEM;
}
self->tty = tty;
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);
/* Not really used by us, but lets do it anyway */
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",
- __FUNCTION__);
+ __func__);
return -ERESTARTSYS;
}
self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
/* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
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 {
- IRDA_DEBUG(2, "%s(), IrLPT device\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ );
self->service_type = IRCOMM_3_WIRE_RAW;
self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */
}
ret = ircomm_tty_block_til_ready(self, filp);
if (ret) {
IRDA_DEBUG(2,
- "%s(), returning after block_til_ready with %d\n", __FUNCTION__ ,
+ "%s(), returning after block_til_ready with %d\n", __func__ ,
ret);
return ret;
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned long flags;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
if (!tty)
return;
if (tty_hung_up_p(filp)) {
spin_unlock_irqrestore(&self->spinlock, flags);
- IRDA_DEBUG(0, "%s(), returning 1\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), returning 1\n", __func__ );
return;
}
* serial port won't be shutdown.
*/
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 = 1;
}
if (--self->open_count < 0) {
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;
}
if (self->open_count) {
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;
}
unsigned long flags;
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)
return;
int len = 0;
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);
IRDA_ASSERT(self != NULL, return -1;);
* we don't mess up the original "safe skb" (see tx_data_size).
* Jean II */
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
/* We didn't consume anything, TTY will retry */
return 0;
ret = self->max_data_size;
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;
}
unsigned long orig_jiffies, poll_time;
unsigned long flags;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
{
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->magic == IRCOMM_TTY_MAGIC, return;);
{
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->magic == IRCOMM_TTY_MAGIC, return;);
self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS);
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);
}
IRDA_ASSERT(self != NULL, 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))
return;
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned long flags;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
*/
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__ );
}
/*
struct tty_struct *tty;
int status;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
}
if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) {
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");
if (status & IRCOMM_CD) {
wake_up_interruptible(&self->open_wait);
} else {
IRDA_DEBUG(2,
- "%s(), Doing serial hangup..\n", __FUNCTION__ );
+ "%s(), Doing serial hangup..\n", __func__ );
if (tty)
tty_hangup(tty);
if (tty->hw_stopped) {
if (status & IRCOMM_CTS) {
IRDA_DEBUG(2,
- "%s(), CTS tx start...\n", __FUNCTION__ );
+ "%s(), CTS tx start...\n", __func__ );
tty->hw_stopped = 0;
/* Wake up processes blocked on open */
} else {
if (!(status & IRCOMM_CTS)) {
IRDA_DEBUG(2,
- "%s(), CTS tx stop...\n", __FUNCTION__ );
+ "%s(), CTS tx stop...\n", __func__ );
tty->hw_stopped = 1;
}
}
{
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->magic == IRCOMM_TTY_MAGIC, return -1;);
IRDA_ASSERT(skb != NULL, return -1;);
if (!self->tty) {
- IRDA_DEBUG(0, "%s(), no tty!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), no tty!\n", __func__ );
return 0;
}
* params, we can just as well declare the hardware for running.
*/
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);
/* We can just as well declare the hardware for running */
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
int clen;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
switch (cmd) {
case FLOW_START:
- IRDA_DEBUG(2, "%s(), hw start!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), hw start!\n", __func__ );
tty->hw_stopped = 0;
/* ircomm_tty_do_softint will take care of the rest */
break;
default: /* If we get here, something is very wrong, better stop */
case FLOW_STOP:
- IRDA_DEBUG(2, "%s(), hw stopped!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ );
tty->hw_stopped = 1;
break;
}
*/
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->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Check if somebody has already connected to us */
if (ircomm_is_connected(self->ircomm)) {
- IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), already connected!\n", __func__ );
return 0;
}
*/
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->magic == IRCOMM_TTY_MAGIC, return;);
__u8 oct_seq[6];
__u16 hints;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
* Set default values, but only if the application for some reason
* 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);
if (!self->settings.data_rate)
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);
if (!self->settings.data_format)
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 = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/
struct ircomm_tty_cb *self;
struct ircomm_tty_info info;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
/* Important note :
* We need to drop all passive discoveries.
{
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->magic == IRCOMM_TTY_MAGIC, return;);
{
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->magic == IRCOMM_TTY_MAGIC, return;);
/* Check if request succeeded */
if (result != IAS_SUCCESS) {
- IRDA_DEBUG(4, "%s(), got NULL value!\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s(), got NULL value!\n", __func__ );
return;
}
switch (value->type) {
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,
&ircomm_param_info);
break;
case IAS_INTEGER:
/* Got LSAP selector */
- IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __func__ ,
value->t.integer);
if (value->t.integer == -1) {
- IRDA_DEBUG(0, "%s(), invalid value!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), invalid value!\n", __func__ );
} else
self->dlsap_sel = value->t.integer;
ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL);
break;
case IAS_MISSING:
- IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __func__ );
break;
default:
- IRDA_DEBUG(0, "%s(), got unknown type!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), got unknown type!\n", __func__ );
break;
}
irias_delete_value(value);
{
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->magic == IRCOMM_TTY_MAGIC, return;);
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
int clen;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
*/
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->magic == IRCOMM_TTY_MAGIC, return;);
* line.
*/
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;
} else {
- IRDA_DEBUG(1, "%s(), starting hardware!\n", __FUNCTION__ );
+ IRDA_DEBUG(1, "%s(), starting hardware!\n", __func__ );
self->tty->hw_stopped = 0;
{
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->magic == IRCOMM_TTY_MAGIC, return;);
IRDA_ASSERT(self != NULL, 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]);
return (*state[self->state])(self, event, skb, info);
IRDA_ASSERT(self != NULL, 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);
*/
self->state = state;
{
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]);
switch (event) {
case IRCOMM_TTY_ATTACH_CABLE:
if (self->iriap) {
IRDA_WARNING("%s(), busy with a previous query\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]);
ret = -EINVAL;
}
{
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]);
switch (event) {
if (self->iriap) {
IRDA_WARNING("%s(), busy with a previous query\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]);
ret = -EINVAL;
}
{
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]);
switch (event) {
case IRCOMM_TTY_GOT_PARAMETERS:
if (self->iriap) {
IRDA_WARNING("%s(), busy with a previous query\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]);
ret = -EINVAL;
}
{
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]);
switch (event) {
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]);
ret = -EINVAL;
}
{
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]);
switch (event) {
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break;
default:
- IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]);
ret = -EINVAL;
}
self->settings.dce = IRCOMM_DELTA_CD;
ircomm_tty_check_modem_status(self);
} else {
- IRDA_DEBUG(0, "%s(), hanging up!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), hanging up!\n", __func__ );
if (self->tty)
tty_hangup(self->tty);
}
break;
default:
- IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+ IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
ircomm_tty_event[event]);
ret = -EINVAL;
}
unsigned cflag, cval;
int baud;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
if (!self->tty || !self->tty->termios || !self->ircomm)
return;
self->settings.flow_control |= IRCOMM_RTS_CTS_IN;
/* This got me. Bummer. Jean II */
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 {
self->flags &= ~ASYNC_CTS_FLOW;
self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN;
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
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) &&
(RELEVANT_IFLAG(tty->termios->c_iflag) ==
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned int result;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
if (tty->flags & (1 << TTY_IO_ERROR))
return -EIO;
{
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))
return -EIO;
if (!retinfo)
return -EFAULT;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
memset(&info, 0, sizeof(info));
info.line = self->line;
struct serial_struct new_serial;
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)))
return -EFAULT;
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
int ret = 0;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
break;
case TIOCGICOUNT:
- IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ );
#if 0
save_flags(flags); cli();
cnow = driver->icount;
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);
{
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;
struct if_irda_req req;
int ret;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
if (!dev->do_ioctl) {
IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
- __FUNCTION__);
+ __func__);
return -1;
}
int count = 0;
int timeout;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(task != NULL, return -1;);
IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
timeout = task->function(task);
if (count++ > 100) {
IRDA_ERROR("%s: error in task handler!\n",
- __FUNCTION__);
+ __func__);
irda_task_delete(task);
return TRUE;
}
} while ((timeout == 0) && (task->state != IRDA_TASK_DONE));
if (timeout < 0) {
- IRDA_ERROR("%s: Error executing task!\n", __FUNCTION__);
+ IRDA_ERROR("%s: Error executing task!\n", __func__);
irda_task_delete(task);
return TRUE;
}
finished = FALSE;
} else {
IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n",
- __FUNCTION__);
+ __func__);
finished = FALSE;
}
{
struct irda_task *task;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
task = (struct irda_task *) data;
irias_objects = hashbin_new(HB_LOCK);
if (!irias_objects) {
IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n",
- __FUNCTION__);
+ __func__);
hashbin_delete(iriap, NULL);
return -ENOMEM;
}
*/
server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
if (!server) {
- IRDA_DEBUG(0, "%s(), unable to open server\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unable to open server\n", __func__);
return -1;
}
iriap_register_lsap(server, LSAP_IAS, IAS_SERVER);
{
struct iriap_cb *self;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
self = kzalloc(sizeof(*self), GFP_ATOMIC);
if (!self) {
- IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL;
}
*/
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->magic == IAS_MAGIC, return;);
{
struct iriap_cb *entry;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
{
notify_t notify;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
irda_notify_init(¬ify);
notify.connect_confirm = iriap_connect_confirm;
self->lsap = irlmp_open_lsap(slsap_sel, ¬ify, 0);
if (self->lsap == NULL) {
- IRDA_ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__);
+ IRDA_ERROR("%s: Unable to allocated LSAP!\n", __func__);
return -1;
}
self->slsap_sel = self->lsap->slsap_sel;
{
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;
dev_kfree_skb(skb);
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,
if (self->confirm)
self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
} 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,
NULL);
iriap_close(self);
{
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->magic == IAS_MAGIC, return;);
if (tx_skb == NULL) {
IRDA_DEBUG(0,
"%s(), Could not allocate an sk_buff of length %d\n",
- __FUNCTION__, LMP_MAX_HEADER);
+ __func__, LMP_MAX_HEADER);
return;
}
/* Get length, MSB first */
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 */
obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
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) {
case IAS_INTEGER:
value = irias_new_integer_value(tmp_cpu32);
/* 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;
case IAS_STRING:
charset = fp[n++];
/* case CS_UNICODE: */
default:
IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
- __FUNCTION__, ias_charset_types[charset]);
+ __func__, ias_charset_types[charset]);
/* Aborting, close connection! */
iriap_disconnect_request(self);
/* break; */
}
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 */
fp[n+value_len] = 0x00;
if (self->confirm)
self->confirm(IAS_SUCCESS, obj_id, value, self->priv);
else {
- IRDA_DEBUG(0, "%s(), missing handler!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), missing handler!\n", __func__);
irias_delete_value(value);
}
}
__be16 tmp_be16;
__u8 *fp;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len;
break;
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);
fp[n++] = value->type;
break;
default:
- IRDA_DEBUG(0, "%s(), type not implemented!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), type not implemented!\n", __func__);
break;
}
iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb);
__u8 *fp;
int n;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
struct sk_buff *tx_skb;
__u8 *frame;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
self->saddr, self->daddr,
NULL, NULL);
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);
}
}
{
struct iriap_cb *self, *new;
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
self = (struct iriap_cb *) instance;
/* Start new server */
new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
if (!new) {
- IRDA_DEBUG(0, "%s(), open failed\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), open failed\n", __func__);
goto out;
}
/* Now attach up the new "socket" */
new->lsap = irlmp_dup(self->lsap, new);
if (!new->lsap) {
- IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
goto out;
}
__u8 *frame;
__u8 opcode;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
self = (struct iriap_cb *) instance;
if (self->mode == IAS_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);
goto out;
}
if (~opcode & IAP_LST) {
IRDA_WARNING("%s:, IrIAS multiframe commands or "
"results is not implemented yet!\n",
- __FUNCTION__);
+ __func__);
goto out;
}
/* Check for ack frames since they don't contain any data */
if (opcode & IAP_ACK) {
- IRDA_DEBUG(0, "%s() Got ack frame!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() Got ack frame!\n", __func__);
goto out;
}
iriap_getvaluebyclass_confirm(self, skb);
break;
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! */
iriap_disconnect_request(self);
self->priv);
break;
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! */
iriap_disconnect_request(self);
}
break;
default:
- IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __FUNCTION__,
+ IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __func__,
opcode);
break;
}
__u8 *fp;
__u8 opcode;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
opcode = fp[0];
if (~opcode & 0x80) {
IRDA_WARNING("%s: IrIAS multiframe commands or results "
- "is not implemented yet!\n", __FUNCTION__);
+ "is not implemented yet!\n", __func__);
return;
}
opcode &= 0x7f; /* Mask away LST bit */
switch (opcode) {
case GET_INFO_BASE:
IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n",
- __FUNCTION__);
+ __func__);
break;
case GET_VALUE_BY_CLASS:
iriap_getvaluebyclass_indication(self, skb);
case IAP_LM_DISCONNECT_INDICATION:
break;
default:
- IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+ IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break;
}
}
iriap_next_client_state(self, S_DISCONNECT);
break;
default:
- IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+ IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break;
}
}
iriap_next_call_state(self, S_OUTSTANDING);
break;
default:
- IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+ IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break;
}
}
static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
}
/*
iriap_next_call_state(self, S_WAIT_FOR_CALL);
break;
default:
- IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+ IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
break;
}
}
static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
}
/*
static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
}
static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
}
/**************************************************************************
case IAP_LM_CONNECT_INDICATION:
tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
if (tx_skb == NULL) {
- IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: unable to malloc!\n", __func__);
return;
}
iriap_next_r_connect_state(self, R_RECEIVING);
break;
default:
- IRDA_DEBUG(0, "%s(), unknown event %d\n", __FUNCTION__, event);
+ IRDA_DEBUG(0, "%s(), unknown event %d\n", __func__, event);
break;
}
}
static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) {
case IAP_LM_DISCONNECT_INDICATION:
iriap_next_r_connect_state(self, R_WAITING);
break;
default:
- IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
break;
}
}
static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event,
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,
struct sk_buff *skb)
{
- IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
}
/*
static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) {
case IAP_RECV_F_LST:
iriap_call_indication(self, skb);
break;
default:
- IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
break;
}
}
static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(skb != NULL, return;);
IRDA_ASSERT(self != NULL, return;);
irlmp_data_request(self->lsap, skb);
break;
default:
- IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
break;
}
}
static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(0, "%s(), event=%d\n", __FUNCTION__, event);
+ IRDA_DEBUG(0, "%s(), event=%d\n", __func__, event);
switch (event) {
case IAP_RECV_F_LST:
{
struct ias_object *obj;
- IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG( 4, "%s()\n", __func__);
obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
if (obj == NULL) {
IRDA_WARNING("%s(), Unable to allocate object!\n",
- __FUNCTION__);
+ __func__);
return NULL;
}
obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC);
if (!obj->name) {
IRDA_WARNING("%s(), Unable to allocate name!\n",
- __FUNCTION__);
+ __func__);
kfree(obj);
return NULL;
}
if (obj->attribs == NULL) {
IRDA_WARNING("%s(), Unable to allocate attribs!\n",
- __FUNCTION__);
+ __func__);
kfree(obj->name);
kfree(obj);
return NULL;
node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj);
if (!node)
IRDA_DEBUG( 0, "%s(), object already removed!\n",
- __FUNCTION__);
+ __func__);
/* Destroy */
__irias_delete_object(obj);
/* Find object */
obj = hashbin_lock_find(irias_objects, 0, obj_name);
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);
return -1;
}
attrib = hashbin_find(obj->attribs, 0, attrib_name);
if (attrib == NULL) {
IRDA_WARNING("%s: Unable to find attribute: %s\n",
- __FUNCTION__, attrib_name);
+ __func__, attrib_name);
spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
return -1;
}
if ( attrib->value->type != new_value->type) {
IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n",
- __FUNCTION__);
+ __func__);
spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
return -1;
}
attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
if (attrib == NULL) {
IRDA_WARNING("%s: Unable to allocate attribute!\n",
- __FUNCTION__);
+ __func__);
return;
}
attrib->value = irias_new_integer_value(value);
if (!attrib->name || !attrib->value) {
IRDA_WARNING("%s: Unable to allocate attribute!\n",
- __FUNCTION__);
+ __func__);
if (attrib->value)
irias_delete_value(attrib->value);
kfree(attrib->name);
attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
if (attrib == NULL) {
IRDA_WARNING("%s: Unable to allocate attribute!\n",
- __FUNCTION__);
+ __func__);
return;
}
attrib->value = irias_new_octseq_value( octets, len);
if (!attrib->name || !attrib->value) {
IRDA_WARNING("%s: Unable to allocate attribute!\n",
- __FUNCTION__);
+ __func__);
if (attrib->value)
irias_delete_value(attrib->value);
kfree(attrib->name);
attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC);
if (attrib == NULL) {
IRDA_WARNING("%s: Unable to allocate attribute!\n",
- __FUNCTION__);
+ __func__);
return;
}
attrib->value = irias_new_string_value(value);
if (!attrib->name || !attrib->value) {
IRDA_WARNING("%s: Unable to allocate attribute!\n",
- __FUNCTION__);
+ __func__);
if (attrib->value)
irias_delete_value(attrib->value);
kfree(attrib->name);
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
- IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL;
}
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
- IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL;
}
value->charset = CS_ASCII;
value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC);
if (!value->t.string) {
- IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
kfree(value);
return NULL;
}
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
- IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL;
}
value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC);
if (value->t.oct_seq == NULL){
- IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
kfree(value);
return NULL;
}
value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
if (value == NULL) {
- IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
return NULL;
}
*/
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;);
kfree(value->t.oct_seq);
break;
default:
- IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__);
break;
}
kfree(value);
{
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->magic == IRLAN_MAGIC, return;);
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,
irlan_client_kick_timer_expired);
*/
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->magic == IRLAN_MAGIC, return;);
if ((self->client.state != IRLAN_IDLE) ||
(self->provider.access_type == ACCESS_DIRECT))
{
- IRDA_DEBUG(0, "%s(), already awake!\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s(), already awake!\n", __func__ );
return;
}
self->daddr = daddr;
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;
}
struct irlan_cb *self;
__u32 saddr, daddr;
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(1, "%s()\n", __func__ );
IRDA_ASSERT(discovery != NULL, return;);
if (self) {
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);
irlan_client_wakeup(self, saddr, daddr);
{
struct irlan_cb *self;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
self = (struct irlan_cb *) instance;
irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb);
/* 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;
/* Check if we have some queued commands waiting to be sent */
struct tsap_cb *tsap;
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;
tsap = (struct tsap_cb *) sap;
struct tsap_cb *tsap;
notify_t notify;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify);
if (!tsap) {
- IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
return;
}
self->client.tsap_ctrl = tsap;
{
struct irlan_cb *self;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
self = (struct irlan_cb *) instance;
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->magic == IRLAN_MAGIC, return;);
if (!skb) {
- IRDA_ERROR("%s(), Got NULL skb!\n", __FUNCTION__);
+ IRDA_ERROR("%s(), Got NULL skb!\n", __func__);
return;
}
frame = skb->data;
/* How many parameters? */
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;
for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) {
- IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
break;
}
ptr += ret;
int i;
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->magic == IRLAN_MAGIC, return;);
else if (strcmp(value, "HOSTED") == 0)
self->client.access_type = ACCESS_HOSTED;
else {
- IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
}
}
/* IRLAN version */
memcpy(&tmp_cpu, value, 2); /* Align value */
le16_to_cpus(&tmp_cpu); /* Convert to host order */
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);
}
if (strcmp(param, "MAX_FRAME") == 0) {
memcpy(&tmp_cpu, value, 2); /* Align value */
le16_to_cpus(&tmp_cpu); /* Convert to host order */
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);
}
{
struct irlan_cb *self;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(priv != NULL, return;);
/* Check if request succeeded */
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,
NULL);
return;
irias_delete_value(value);
break;
default:
- IRDA_DEBUG(2, "%s(), unknown type!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), unknown type!\n", __func__ );
break;
}
irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL);
static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
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->magic == IRLAN_MAGIC, return -1;);
case IRLAN_DISCOVERY_INDICATION:
if (self->client.iriap) {
IRDA_WARNING("%s(), busy with a previous query\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
"IrLAN", "IrDA:TinyTP:LsapSel");
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
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->magic == IRLAN_MAGIC, return -1;);
irlan_next_client_state(self, IRLAN_CONN);
break;
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);
/* Give the client a kick! */
irlan_next_client_state(self, IRLAN_IDLE);
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_client_state(self, IRLAN_IDLE);
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_client_state(self, IRLAN_IDLE);
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_client_state(self, IRLAN_IDLE);
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
{
struct qos_info qos;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_client_state(self, IRLAN_DATA);
break;
default:
- IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
break;
}
break;
irlan_next_client_state(self, IRLAN_IDLE);
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_client_state(self, IRLAN_IDLE);
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
{
struct qos_info qos;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
} else if (self->client.recv_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;
case IRLAN_DATA_CONNECT_INDICATION:
irlan_next_client_state(self, IRLAN_IDLE);
break;
case IRLAN_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
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->magic == IRLAN_MAGIC, return -1;);
irlan_next_client_state(self, IRLAN_IDLE);
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
if (skb)
dev_kfree_skb(skb);
static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
if (skb)
dev_kfree_skb(skb);
struct irlan_cb *new;
__u16 hints;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
#ifdef CONFIG_PROC_FS
{ struct proc_dir_entry *proc;
}
#endif /* CONFIG_PROC_FS */
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
hints = irlmp_service_to_hint(S_LAN);
/* Register with IrLMP as a client */
{
struct irlan_cb *self, *next;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
irlmp_unregister_client(ckey);
irlmp_unregister_service(skey);
struct net_device *dev;
struct irlan_cb *self;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
/* Create network device with irlan */
dev = alloc_irlandev(eth ? "eth%d" : "irlan%d");
if (register_netdev(dev)) {
IRDA_DEBUG(2, "%s(), register_netdev() failed!\n",
- __FUNCTION__ );
+ __func__ );
self = NULL;
free_netdev(dev);
} else {
*/
static void __irlan_close(struct irlan_cb *self)
{
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
ASSERT_RTNL();
IRDA_ASSERT(self != NULL, return;);
struct irlan_cb *self;
struct tsap_cb *tsap;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap;
self->max_sdu_size = max_sdu_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);
/* 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);
/*
struct irlan_cb *self;
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;
tsap = (struct tsap_cb *) sap;
switch (reason) {
case LM_USER_REQUEST: /* User request */
- IRDA_DEBUG(2, "%s(), User requested\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), User requested\n", __func__ );
break;
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;
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;
case LM_LAP_RESET: /* IrLAP reset */
- IRDA_DEBUG(2, "%s(), IrLAP reset\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IrLAP reset\n", __func__ );
break;
case LM_INIT_DISCONNECT:
- IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ );
break;
default:
- IRDA_ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__);
+ IRDA_ERROR("%s(), Unknown disconnect reason\n", __func__);
break;
}
struct tsap_cb *tsap;
notify_t notify;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify);
if (!tsap) {
- IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
return;
}
self->tsap_data = tsap;
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->magic == IRLAN_MAGIC, return;);
{
struct sk_buff *skb;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
if (irda_lock(&self->client.tx_busy) == FALSE)
return -EBUSY;
dev_kfree_skb(skb);
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);
}
*/
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 */
skb_queue_tail(&self->client.txq, skb);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
struct sk_buff *skb;
__u8 *frame;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
int n=0;
if (skb == NULL) {
- IRDA_DEBUG(2, "%s(), Got NULL skb\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Got NULL skb\n", __func__ );
return 0;
}
IRDA_ASSERT(value_len > 0, return 0;);
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ );
return 0;
break;
}
/* Make space for data */
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;
}
skb_put(skb, param_len+value_len+3);
__u16 val_len;
int n=0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
/* get length of parameter name (1 byte) */
name_len = buf[n++];
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;
}
le16_to_cpus(&val_len); n+=2;
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;
}
*len = val_len;
{
struct irlan_cb *self = netdev_priv(dev);
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
/* Ready to play! */
netif_stop_queue(dev); /* Wait until data link is ready */
{
struct irlan_cb *self = netdev_priv(dev);
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s()\n", __func__ );
/* Stop device */
netif_stop_queue(dev);
}
if (skb->len < ETH_HLEN) {
IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n",
- __FUNCTION__, skb->len);
+ __func__, skb->len);
++self->stats.rx_dropped;
dev_kfree_skb(skb);
return 0;
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",
netif_running(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 */
if (self->client.state != IRLAN_DATA) {
- IRDA_DEBUG(1, "%s(), delaying!\n", __FUNCTION__ );
+ IRDA_DEBUG(1, "%s(), delaying!\n", __func__ );
return;
}
}
else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
/* 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); */
irlan_set_multicast_filter(self, TRUE);
}
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 */
/* hardware_set_filter(dev->mc_list); */
irlan_set_multicast_filter(self, TRUE);
}
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);
}
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->magic == IRLAN_MAGIC, return;);
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->magic == IRLAN_MAGIC, return;);
{
__u8 *bytes;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
bytes = value;
* This is experimental!! DB.
*/
if (strcmp(param, "MODE") == 0) {
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
self->use_udata = TRUE;
return;
}
struct irlan_cb *self;
__u8 code;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
self = (struct irlan_cb *) instance;
irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb);
break;
case CMD_RECONNECT_DATA_CHAN:
- IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __FUNCTION__ );
- IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __func__ );
+ IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ );
break;
case CMD_CLOSE_DATA_CHAN:
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;
default:
- IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
break;
}
return 0;
struct tsap_cb *tsap;
__u32 saddr, daddr;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(0, "%s()\n", __func__ );
self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap;
struct irlan_cb *self;
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;
tsap = (struct tsap_cb *) sap;
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->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;);
for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) {
- IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
break;
}
ptr+=ret;
{
struct sk_buff *skb;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
irlan_insert_string_param(skb, "MEDIA", "802.5");
break;
default:
- IRDA_DEBUG(2, "%s(), unknown media type!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), unknown media type!\n", __func__ );
break;
}
irlan_insert_short_param(skb, "IRLAN_VER", 0x0101);
irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED");
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown access type\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Unknown access type\n", __func__ );
break;
}
irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee);
irlan_filter_request(self, skb);
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
break;
}
struct tsap_cb *tsap;
notify_t notify;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
tsap = irttp_open_tsap(LSAP_ANY, 1, ¬ify);
if (!tsap) {
- IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
+ IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
return -1;
}
self->provider.tsap_ctrl = tsap;
static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_provider_state( self, IRLAN_INFO);
break;
default:
- IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
{
int ret;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_provider_state(self, IRLAN_IDLE);
break;
default:
- IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+ IRDA_DEBUG(4, "%s()\n", __func__ );
IRDA_ASSERT(self != NULL, return -1;);
irlan_next_provider_state(self, IRLAN_IDLE);
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
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->magic == IRLAN_MAGIC, return -1;);
irlan_next_provider_state(self, IRLAN_IDLE);
break;
default:
- IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+ IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
break;
}
if (skb)
irlap = hashbin_new(HB_LOCK);
if (irlap == NULL) {
IRDA_ERROR("%s: can't allocate irlap hashbin!\n",
- __FUNCTION__);
+ __func__);
return -ENOMEM;
}
{
struct irlap_cb *self;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
/* Initialize the irlap structure. */
self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL);
{
struct irlap_cb *lap;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
/* Be sure that we manage to remove ourself from the hash */
lap = hashbin_remove(irlap, self->saddr, NULL);
if (!lap) {
- IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __func__);
return;
}
__irlap_close(lap);
*/
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->magic == LAP_MAGIC, return;);
*/
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);
}
void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
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->magic == LAP_MAGIC, return;);
*/
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->magic == LAP_MAGIC, return;);
IRDA_ASSERT(self != NULL, 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),
return;);
IRDA_ASSERT(self != NULL, 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),
return;);
#ifdef CONFIG_IRDA_ULTRA
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->magic == LAP_MAGIC, return;);
*/
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->magic == LAP_MAGIC, return;);
irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL);
break;
default:
- IRDA_DEBUG(2, "%s(), disconnect pending!\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), disconnect pending!\n", __func__);
self->disconnect_pending = TRUE;
break;
}
*/
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->magic == LAP_MAGIC, return;);
switch (reason) {
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);
break;
case LAP_NO_RESPONSE: /* FALLTROUGH */
reason, NULL);
break;
default:
- IRDA_ERROR("%s: Unknown reason %d\n", __FUNCTION__, reason);
+ IRDA_ERROR("%s: Unknown reason %d\n", __func__, reason);
}
}
IRDA_ASSERT(self->magic == LAP_MAGIC, 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) ||
(discovery->nslots == 8) || (discovery->nslots == 16),
/* Discovery is only possible in NDM mode */
if (self->state != LAP_NDM) {
IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n",
- __FUNCTION__);
+ __func__);
irlap_discovery_confirm(self, NULL);
/* Note : in theory, if we are not in NDM, we could postpone
* the discovery like we do for connection request.
if (self->discovery_log == NULL) {
IRDA_WARNING("%s(), Unable to allocate discovery log!\n",
- __FUNCTION__);
+ __func__);
return;
}
*/
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->magic == LAP_MAGIC, return;);
*/
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->magic == LAP_MAGIC, return;);
*/
void irlap_reset_confirm(void)
{
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
}
/*
{
/* nr as expected? */
if (nr == self->vs) {
- IRDA_DEBUG(4, "%s(), expected!\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), expected!\n", __func__);
return NR_EXPECTED;
}
*/
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->magic == LAP_MAGIC, return;);
{
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->magic == LAP_MAGIC, return;);
* user may not have set all of them.
*/
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)
self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits;
*/
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->magic == LAP_MAGIC, return;);
*/
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->magic == LAP_MAGIC, return;);
} else
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 */
if (timeout == 0)
if (!self || self->magic != LAP_MAGIC)
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]);
ret = (*state[self->state])(self, event, skb, info);
* try to disconnect link if we send any data frames, since
* 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));
if (!skb_queue_empty(&self->txq)) {
* media busy in irlap_connect_request() and
* postpone the event... - Jean II */
IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n",
- __FUNCTION__);
+ __func__);
/* Always switch state before calling upper layers */
irlap_next_state(self, LAP_NDM);
irlap_connect_indication(self, skb);
} else {
IRDA_DEBUG(0, "%s(), SNRM frame does not "
- "contain an I field!\n", __FUNCTION__);
+ "contain an I field!\n", __func__);
}
break;
case DISCOVERY_REQUEST:
if (self->media_busy) {
IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n",
- __FUNCTION__);
+ __func__);
/* irlap->log.condition = MEDIA_BUSY; */
/* This will make IrLMP try again */
* those cases...
* 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 */
irlap_discovery_indication(self, info->discovery);
/* Only accept broadcast frames in NDM mode */
if (info->caddr != CBROADCAST) {
IRDA_DEBUG(0, "%s(), not a broadcast frame!\n",
- __FUNCTION__);
+ __func__);
} else
irlap_unitdata_indication(self, skb);
break;
irlap_send_test_frame(self, CBROADCAST, info->daddr, skb);
break;
case RECV_TEST_RSP:
- IRDA_DEBUG(0, "%s() not implemented!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() not implemented!\n", __func__);
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]);
ret = -1;
IRDA_ASSERT(info != 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);
if (!self->discovery_log) {
IRDA_WARNING("%s: discovery log is gone! "
"maybe the discovery timeout has been set"
- " too short?\n", __FUNCTION__);
+ " too short?\n", __func__);
break;
}
hashbin_insert(self->discovery_log,
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 ? */
if (info->s == 0xff)
*/
if (irda_device_is_receiving(self->netdev) && !self->add_wait) {
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));
self->add_wait = TRUE;
return ret;
}
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]);
ret = -1;
discovery_t *discovery_rsp;
int ret=0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
switch (event) {
case QUERY_TIMER_EXPIRED:
IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n",
- __FUNCTION__, jiffies);
+ __func__, jiffies);
irlap_next_state(self, LAP_NDM);
break;
case RECV_DISCOVERY_XID_CMD:
}
break;
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]);
ret = -1;
{
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->magic == LAP_MAGIC, return -1;);
break;
case RECV_DISCOVERY_XID_CMD:
IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n",
- __FUNCTION__);
+ __func__);
irlap_next_state(self, LAP_NDM);
break;
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_next_state( self, LAP_NDM);
irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break;
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]);
ret = -1;
{
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
self->retry_count++;
break;
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(info != NULL, return 0;);
irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break;
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]);
ret = -1;
static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event,
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;
}
*/
if((!nextfit) && (skb->len > self->bytes_left)) {
IRDA_DEBUG(0, "%s(), Not allowed to transmit"
- " more bytes!\n", __FUNCTION__);
+ " more bytes!\n", __func__);
/* Requeue the skb */
skb_queue_head(&self->txq, skb_get(skb));
/*
#endif /* CONFIG_IRDA_FAST_RR */
} else {
IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n",
- __FUNCTION__);
+ __func__);
skb_queue_head(&self->txq, skb_get(skb));
/*
break;
case POLL_TIMER_EXPIRED:
IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n",
- __FUNCTION__, jiffies);
+ __func__, jiffies);
irlap_send_rr_frame(self, CMD_FRAME);
/* Return to NRM properly - Jean II */
self->window = self->window_size;
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n",
- __FUNCTION__, irlap_event[event]);
+ __func__, irlap_event[event]);
ret = -EINVAL;
break;
{
int ret = 0;
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
}
break;
default:
- IRDA_DEBUG(1, "%s(), Unknown event %d\n", __FUNCTION__, event);
+ IRDA_DEBUG(1, "%s(), Unknown event %d\n", __func__, event);
ret = -1;
break;
} else {
IRDA_DEBUG(4,
"%s(), missing or duplicate frame!\n",
- __FUNCTION__);
+ __func__);
/* Update Nr received */
irlap_update_nr_received(self, info->nr);
(nr_status == NR_UNEXPECTED))
{
IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n",
- __FUNCTION__);
+ __func__);
if (info->pf) {
/* Resend rejected frames */
irlap_resend_rejected_frames(self, CMD_FRAME);
}
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",
- __FUNCTION__, irlap_event[event], ns_status, nr_status);
+ __func__, irlap_event[event], ns_status, nr_status);
break;
case RECV_UI_FRAME:
/* Poll bit cleared? */
del_timer(&self->final_timer);
irlap_data_indication(self, skb, TRUE);
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);
}
break;
irlap_next_state(self, LAP_NRM_P);
} else if (ret == NR_INVALID) {
IRDA_DEBUG(1, "%s(), Received RR with "
- "invalid nr !\n", __FUNCTION__);
+ "invalid nr !\n", __func__);
irlap_next_state(self, LAP_RESET_WAIT);
irlap_start_final_timer(self, 2 * self->final_timeout);
break;
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_next_state(self, LAP_XMIT_P);
break;
default:
IRDA_DEBUG(1, "%s(), Unknown event %s\n",
- __FUNCTION__, irlap_event[event]);
+ __func__, irlap_event[event]);
ret = -1;
break;
{
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->magic == LAP_MAGIC, return -1;);
irlap_next_state( self, LAP_PCLOSE);
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]);
ret = -1;
{
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->magic == LAP_MAGIC, return -1;);
* state
*/
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_wait_min_turn_around(self, &self->qos_tx);
irlap_send_ua_response_frame(self, &self->qos_rx);
} else {
IRDA_DEBUG(0,
"%s(), SNRM frame contained an I field!\n",
- __FUNCTION__);
+ __func__);
}
break;
default:
IRDA_DEBUG(1, "%s(), Unknown event %s\n",
- __FUNCTION__, irlap_event[event]);
+ __func__, irlap_event[event]);
ret = -1;
break;
{
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->magic == LAP_MAGIC, return -EBADR;);
*/
if((!nextfit) && (skb->len > self->bytes_left)) {
IRDA_DEBUG(0, "%s(), Not allowed to transmit"
- " more bytes!\n", __FUNCTION__);
+ " more bytes!\n", __func__);
/* Requeue the skb */
skb_queue_head(&self->txq, skb_get(skb));
ret = -EPROTO;
}
} 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));
ret = -EPROTO;
}
* when we return... - Jean II */
break;
default:
- IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
irlap_event[event]);
ret = -EINVAL;
int nr_status;
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->magic == LAP_MAGIC, return -1;);
case RECV_I_CMD: /* Optimize for the common case */
/* FIXME: must check for remote_busy below */
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,
self->vs, info->ns, self->vr, info->pf);
irlap_next_state(self, LAP_NRM_S);
} else {
IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n",
- __FUNCTION__);
+ __func__);
}
break;
case RECV_SNRM_CMD:
/* SNRM frame is not allowed to contain an I-field */
if (!info) {
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_reset_indication(self);
} else {
IRDA_DEBUG(0,
"%s(), SNRM frame contained an I-field!\n",
- __FUNCTION__);
+ __func__);
}
break;
* which explain why we use (self->N2 / 2) here !!!
* Jean II
*/
- IRDA_DEBUG(1, "%s(), retry_count = %d\n", __FUNCTION__,
+ IRDA_DEBUG(1, "%s(), retry_count = %d\n", __func__,
self->retry_count);
if (self->retry_count < (self->N2 / 2)) {
irlap_send_test_frame(self, self->caddr, info->daddr, skb);
break;
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]);
ret = -EINVAL;
{
int ret = 0;
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -ENODEV;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
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]);
ret = -EINVAL;
{
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->magic == LAP_MAGIC, return -EBADR;);
irlap_next_state(self, LAP_SCLOSE);
break;
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]);
ret = -EINVAL;
irlap_insert_info(self, skb);
if (unlikely(self->mode & IRDA_MODE_MONITOR)) {
- IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __FUNCTION__,
+ IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __func__,
self->netdev->name);
dev_kfree_skb(skb);
return;
/* Check if the new connection address is valid */
if ((info->caddr == 0x00) || (info->caddr == 0xfe)) {
IRDA_DEBUG(3, "%s(), invalid connection address!\n",
- __FUNCTION__);
+ __func__);
return;
}
/* Only accept if addressed directly to us */
if (info->saddr != self->saddr) {
IRDA_DEBUG(2, "%s(), not addressed to us!\n",
- __FUNCTION__);
+ __func__);
return;
}
irlap_do_event(self, RECV_SNRM_CMD, skb, info);
struct ua_frame *frame;
int ret;
- IRDA_DEBUG(2, "%s() <%ld>\n", __FUNCTION__, jiffies);
+ IRDA_DEBUG(2, "%s() <%ld>\n", __func__, jiffies);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
struct sk_buff *tx_skb = NULL;
struct disc_frame *frame;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
__u32 bcast = BROADCAST;
__u8 *info;
- IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __FUNCTION__,
+ IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __func__,
s, S, command);
IRDA_ASSERT(self != NULL, return;);
__u8 *discovery_info;
char *text;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
if (!pskb_may_pull(skb, sizeof(struct xid_frame))) {
- IRDA_ERROR("%s: frame too short!\n", __FUNCTION__);
+ IRDA_ERROR("%s: frame too short!\n", __func__);
return;
}
/* Make sure frame is addressed to us */
if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
- __FUNCTION__);
+ __func__);
return;
}
if ((discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) {
- IRDA_WARNING("%s: kmalloc failed!\n", __FUNCTION__);
+ IRDA_WARNING("%s: kmalloc failed!\n", __func__);
return;
}
discovery->data.saddr = self->saddr;
discovery->timestamp = jiffies;
- IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__,
+ IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__,
discovery->data.daddr);
discovery_info = skb_pull(skb, sizeof(struct xid_frame));
char *text;
if (!pskb_may_pull(skb, sizeof(struct xid_frame))) {
- IRDA_ERROR("%s: frame too short!\n", __FUNCTION__);
+ IRDA_ERROR("%s: frame too short!\n", __func__);
return;
}
/* Make sure frame is addressed to us */
if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
- __FUNCTION__);
+ __func__);
return;
}
if((discovery_info == NULL) ||
!pskb_may_pull(skb, 3)) {
IRDA_ERROR("%s: discovery frame too short!\n",
- __FUNCTION__);
+ __func__);
return;
}
*/
discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC);
if (!discovery) {
- IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__);
+ IRDA_WARNING("%s: unable to malloc!\n", __func__);
return;
}
{
info->nr = skb->data[1] >> 5;
- IRDA_DEBUG(4, "%s(), nr=%d, %ld\n", __FUNCTION__, info->nr, jiffies);
+ IRDA_DEBUG(4, "%s(), nr=%d, %ld\n", __func__, info->nr, jiffies);
if (command)
irlap_do_event(self, RECV_RNR_CMD, skb, info);
static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info, int command)
{
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s()\n", __func__);
info->nr = skb->data[1] >> 5;
static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info, int command)
{
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s()\n", __func__);
info->nr = skb->data[1] >> 5;
static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info, int command)
{
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
/* Check if this is a command or a response frame */
if (command)
irlap_send_i_frame( self, tx_skb, CMD_FRAME);
} else {
- IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__);
irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
self->window -= 1;
}
irlap_next_state(self, LAP_NRM_P);
irlap_send_i_frame(self, tx_skb, CMD_FRAME);
} else {
- IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__);
if (self->ack_required) {
irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
* See max_line_capacities[][] in qos.c for details. Jean II */
transmission_time -= (self->final_timeout * self->bytes_left
/ self->line_capacity);
- IRDA_DEBUG(4, "%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n", __FUNCTION__, self->final_timeout, self->bytes_left, self->line_capacity, transmission_time);
+ IRDA_DEBUG(4, "%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n", __func__, self->final_timeout, self->bytes_left, self->line_capacity, transmission_time);
/* We are allowed to transmit a maximum number of bytes again. */
self->bytes_left = self->line_capacity;
/* tx_skb = skb_clone( skb, GFP_ATOMIC); */
tx_skb = skb_copy(skb, GFP_ATOMIC);
if (!tx_skb) {
- IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unable to copy\n", __func__);
return;
}
*/
while (!skb_queue_empty(&self->txq)) {
- IRDA_DEBUG(0, "%s(), sending additional frames!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), sending additional frames!\n", __func__);
if (self->window > 0) {
skb = skb_dequeue( &self->txq);
IRDA_ASSERT(skb != NULL, return;);
/* tx_skb = skb_clone( skb, GFP_ATOMIC); */
tx_skb = skb_copy(skb, GFP_ATOMIC);
if (!tx_skb) {
- IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unable to copy\n", __func__);
return;
}
void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
__u8 caddr, int command)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info)
{
- IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG( 4, "%s()\n", __func__);
info->pf = skb->data[1] & PF_BIT; /* Final bit */
__u8 *frame;
int w, x, y, z;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
IRDA_ASSERT(info != NULL, return;);
if (!pskb_may_pull(skb, 4)) {
- IRDA_ERROR("%s: frame too short!\n", __FUNCTION__);
+ IRDA_ERROR("%s: frame too short!\n", __func__);
return;
}
{
struct test_frame *frame;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
if (!pskb_may_pull(skb, sizeof(*frame))) {
- IRDA_ERROR("%s: frame too short!\n", __FUNCTION__);
+ IRDA_ERROR("%s: frame too short!\n", __func__);
return;
}
frame = (struct test_frame *) skb->data;
if (info->caddr == CBROADCAST) {
if (skb->len < sizeof(struct test_frame)) {
IRDA_DEBUG(0, "%s() test frame too short!\n",
- __FUNCTION__);
+ __func__);
return;
}
* share and non linear skbs. This should never happen, so
* we don't need to be clever about it. Jean II */
if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
- IRDA_ERROR("%s: can't clone shared skb!\n", __FUNCTION__);
+ IRDA_ERROR("%s: can't clone shared skb!\n", __func__);
dev_kfree_skb(skb);
return -1;
}
/* Check if frame is large enough for parsing */
if (!pskb_may_pull(skb, 2)) {
- IRDA_ERROR("%s: frame too short!\n", __FUNCTION__);
+ IRDA_ERROR("%s: frame too short!\n", __func__);
dev_kfree_skb(skb);
return -1;
}
/* First we check if this frame has a valid connection address */
if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) {
IRDA_DEBUG(0, "%s(), wrong connection address!\n",
- __FUNCTION__);
+ __func__);
goto out;
}
/*
break;
default:
IRDA_WARNING("%s: Unknown S-frame %02x received!\n",
- __FUNCTION__, info.control);
+ __func__, info.control);
break;
}
goto out;
break;
default:
IRDA_WARNING("%s: Unknown frame %02x received!\n",
- __FUNCTION__, info.control);
+ __func__, info.control);
break;
}
out:
*/
int __init irlmp_init(void)
{
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
/* Initialize the irlmp structure. */
irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL);
if (irlmp == NULL)
/* Allocate new instance of a LSAP connection */
self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC);
if (self == NULL) {
- IRDA_ERROR("%s: can't allocate memory\n", __FUNCTION__);
+ IRDA_ERROR("%s: can't allocate memory\n", __func__);
return NULL;
}
*/
static void __irlmp_close_lsap(struct lsap_cb *self)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
if (!lsap) {
IRDA_DEBUG(0,
"%s(), Looks like somebody has removed me already!\n",
- __FUNCTION__);
+ __func__);
return;
}
__irlmp_close_lsap(self);
*/
lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL);
if (lap == NULL) {
- IRDA_ERROR("%s: unable to kmalloc\n", __FUNCTION__);
+ IRDA_ERROR("%s: unable to kmalloc\n", __func__);
return;
}
#endif
lap->lsaps = hashbin_new(HB_LOCK);
if (lap->lsaps == NULL) {
- IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __FUNCTION__);
+ IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __func__);
kfree(lap);
return;
}
{
struct lap_cb *link;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
/* We must remove ourselves from the hashbin *first*. This ensure
* that no more LSAPs will be open on this link and no discovery
IRDA_DEBUG(2,
"%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n",
- __FUNCTION__, self->slsap_sel, dlsap_sel, saddr, daddr);
+ __func__, self->slsap_sel, dlsap_sel, saddr, daddr);
if (test_bit(0, &self->connected)) {
ret = -EISCONN;
if (daddr != DEV_ADDR_ANY)
discovery = hashbin_find(irlmp->cachelog, daddr, NULL);
else {
- IRDA_DEBUG(2, "%s(), no daddr\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), no daddr\n", __func__);
discovery = (discovery_t *)
hashbin_get_first(irlmp->cachelog);
}
}
lap = hashbin_lock_find(irlmp->links, saddr, NULL);
if (lap == NULL) {
- IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __func__);
ret = -EHOSTUNREACH;
goto err;
}
* disconnected yet (waiting for timeout in LAP).
* Maybe we could give LAP a bit of help in this case.
*/
- IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __func__);
ret = -EAGAIN;
goto err;
}
/* LAP is already connected to a different node, and LAP
* can only talk to one node at a time */
- IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __func__);
ret = -EBUSY;
goto err;
}
IRDA_ASSERT(self->lap != NULL, return;);
IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
- __FUNCTION__, self->slsap_sel, self->dlsap_sel);
+ __func__, self->slsap_sel, self->dlsap_sel);
/* Note : self->lap is set in irlmp_link_data_indication(),
* (case CONNECT_CMD:) because we have no way to set it here.
* in the state machine itself. Jean II */
IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
- __FUNCTION__, self->slsap_sel, self->dlsap_sel);
+ __func__, self->slsap_sel, self->dlsap_sel);
/* Make room for MUX control header (3 bytes) */
IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;);
int lap_header_size;
int max_seg_size;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(skb != NULL, return;);
IRDA_ASSERT(self != NULL, return;);
max_header_size = LMP_HEADER + lap_header_size;
IRDA_DEBUG(2, "%s(), max_header_size=%d\n",
- __FUNCTION__, max_header_size);
+ __func__, max_header_size);
/* Hide LMP_CONTROL_HEADER header from layer above */
skb_pull(skb, LMP_CONTROL_HEADER);
struct lsap_cb *new;
unsigned long flags;
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags);
if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) ||
(orig->lap == NULL)) {
IRDA_DEBUG(0, "%s(), invalid LSAP (wrong state)\n",
- __FUNCTION__);
+ __func__);
spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
flags);
return NULL;
/* Allocate a new instance */
new = kmemdup(orig, sizeof(*new), GFP_ATOMIC);
if (!new) {
- IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__);
spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
flags);
return NULL;
* and us that might mess up the hashbins below. This fixes it.
* Jean II */
if (! test_and_clear_bit(0, &self->connected)) {
- IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__);
dev_kfree_skb(userdata);
return -1;
}
{
struct lsap_cb *lsap;
- IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]);
+ IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, irlmp_reasons[reason]);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
- __FUNCTION__, self->slsap_sel, self->dlsap_sel);
+ __func__, self->slsap_sel, self->dlsap_sel);
/* Already disconnected ?
* There is a race condition between irlmp_disconnect_request()
* and us that might mess up the hashbins below. This fixes it.
* Jean II */
if (! test_and_clear_bit(0, &self->connected)) {
- IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__);
return;
}
self->notify.disconnect_indication(self->notify.instance,
self, reason, skb);
} else {
- IRDA_DEBUG(0, "%s(), no handler\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), no handler\n", __func__);
}
}
/* Make sure the value is sane */
if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){
IRDA_WARNING("%s: invalid value for number of slots!\n",
- __FUNCTION__);
+ __func__);
nslots = sysctl_discovery_slots = 8;
}
int number; /* Number of nodes in the log */
int i;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
/* Check if client wants or not partial/selective log (optimisation) */
if (!client->disco_callback)
irlmp_client_t *client;
irlmp_client_t *client_next;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(log != NULL, return;);
irlmp_client_t *client_next;
int i;
- IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(3, "%s()\n", __func__);
IRDA_ASSERT(expiries != NULL, return;);
*/
discovery_t *irlmp_get_discovery_response(void)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(irlmp != NULL, return NULL;);
{
int ret;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(userdata != NULL, return -1;);
*/
void irlmp_udata_indication(struct lsap_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->magic == LMP_LSAP_MAGIC, return;);
struct sk_buff *clone_skb;
struct lap_cb *lap;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(userdata != NULL, return -1;);
#ifdef CONFIG_IRDA_ULTRA
void irlmp_connless_data_indication(struct lsap_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->magic == LMP_LSAP_MAGIC, return;);
curr->notify.status_indication(curr->notify.instance,
link, lock);
else
- IRDA_DEBUG(2, "%s(), no handler\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), no handler\n", __func__);
curr = next;
}
/* Get the number of lsap. That's the only safe way to know
* that we have looped around... - Jean II */
lsap_todo = HASHBIN_GET_SIZE(self->lsaps);
- IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __FUNCTION__, lsap_todo);
+ IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __func__, lsap_todo);
/* Poll lsap in order until the queue is full or until we
* tried them all.
/* Uh-oh... Paranoia */
if(curr == NULL)
break;
- IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __FUNCTION__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
+ IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __func__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
/* Inform lsap user that it can send one more packet. */
if (curr->notify.flow_indication != NULL)
curr->notify.flow_indication(curr->notify.instance,
curr, flow);
else
- IRDA_DEBUG(1, "%s(), no handler\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), no handler\n", __func__);
}
}
*/
service = kmalloc(16, GFP_ATOMIC);
if (!service) {
- IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
return NULL;
}
{
irlmp_service_t *service;
- IRDA_DEBUG(4, "%s(), hints = %04x\n", __FUNCTION__, hints);
+ IRDA_DEBUG(4, "%s(), hints = %04x\n", __func__, hints);
/* Make a new registration */
service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC);
if (!service) {
- IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
return NULL;
}
service->hints.word = hints;
irlmp_service_t *service;
unsigned long flags;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
if (!handle)
return -1;
/* Caller may call with invalid handle (it's legal) - Jean II */
service = hashbin_lock_find(irlmp->services, (long) handle, NULL);
if (!service) {
- IRDA_DEBUG(1, "%s(), Unknown service!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Unknown service!\n", __func__);
return -1;
}
{
irlmp_client_t *client;
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(irlmp != NULL, return NULL;);
/* Make a new registration */
client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC);
if (!client) {
- IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
+ IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __func__);
return NULL;
}
client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
if (!client) {
- IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__);
return -1;
}
{
struct irlmp_client *client;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
if (!handle)
return -1;
/* Caller may call with invalid handle (it's legal) - Jean II */
client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
if (!client) {
- IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__);
return -1;
}
- IRDA_DEBUG(4, "%s(), removing client!\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), removing client!\n", __func__);
hashbin_remove_this(irlmp->clients, (irda_queue_t *) client);
kfree(client);
IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;);
IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;);
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
#ifdef CONFIG_IRDA_ULTRA
/* Accept all bindings to the connectionless LSAP */
/* Make sure we terminate the loop */
if (wrapped++) {
IRDA_ERROR("%s: no more free LSAPs !\n",
- __FUNCTION__);
+ __func__);
return 0;
}
}
/* Got it ! */
lsap_sel = irlmp->last_lsap_sel;
IRDA_DEBUG(4, "%s(), found free lsap_sel=%02x\n",
- __FUNCTION__, lsap_sel);
+ __func__, lsap_sel);
return lsap_sel;
}
switch (lap_reason) {
case LAP_DISC_INDICATION: /* Received a disconnect request from peer */
- IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __FUNCTION__);
+ IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __func__);
reason = LM_USER_REQUEST;
break;
case LAP_NO_RESPONSE: /* To many retransmits without response */
- IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __FUNCTION__);
+ IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __func__);
reason = LM_LAP_DISCONNECT;
break;
case LAP_RESET_INDICATION:
- IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __FUNCTION__);
+ IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __func__);
reason = LM_LAP_RESET;
break;
case LAP_FOUND_NONE:
case LAP_MEDIA_BUSY:
case LAP_PRIMARY_CONFLICT:
- IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __func__);
reason = LM_CONNECT_FAILURE;
break;
default:
IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n",
- __FUNCTION__, lap_reason);
+ __func__, lap_reason);
reason = LM_LAP_DISCONNECT;
break;
}
IRLMP_STATE state)
{
/*
- IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __FUNCTION__, irlmp_state[state]);
+ IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __func__, irlmp_state[state]);
*/
self->lap_state = state;
}
{
/*
IRDA_ASSERT(self != NULL, return;);
- IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __FUNCTION__, irlsap_state[state]);
+ IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __func__, irlsap_state[state]);
*/
self->lsap_state = state;
}
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n",
- __FUNCTION__, irlmp_event[event], irlsap_state[ self->lsap_state]);
+ __func__, irlmp_event[event], irlsap_state[ self->lsap_state]);
return (*lsap_state[self->lsap_state]) (self, event, skb);
}
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
- IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __FUNCTION__,
+ IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __func__,
irlmp_event[event],
irlmp_state[self->lap_state]);
void irlmp_discovery_timer_expired(void *data)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
/* We always cleanup the log (active & passive discovery) */
irlmp_do_expiry();
{
struct lsap_cb *self = (struct lsap_cb *) data;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
{
struct lap_cb *self = (struct lap_cb *) data;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self->irlap != NULL, return;);
switch (event) {
irlap_connect_response(self->irlap, skb);
break;
case LM_LAP_CONNECT_REQUEST:
- IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __func__);
irlmp_next_lap_state(self, LAP_U_CONNECT);
break;
case LM_LAP_DISCONNECT_INDICATION:
IRDA_DEBUG(4, "%s(), Error LM_LAP_DISCONNECT_INDICATION\n",
- __FUNCTION__);
+ __func__);
irlmp_next_lap_state(self, LAP_STANDBY);
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n",
- __FUNCTION__, irlmp_event[event]);
+ __func__, irlmp_event[event]);
break;
}
}
static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(2, "%s(), event=%s\n", __FUNCTION__, irlmp_event[event]);
+ IRDA_DEBUG(2, "%s(), event=%s\n", __func__, irlmp_event[event]);
switch (event) {
case LM_LAP_CONNECT_INDICATION:
* the lsaps may already have gone. This avoid getting stuck
* forever in LAP_ACTIVE state - Jean II */
if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
- IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__);
irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
}
break;
* the lsaps may already have gone. This avoid getting stuck
* forever in LAP_ACTIVE state - Jean II */
if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
- IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__);
irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
}
break;
case LM_LAP_DISCONNECT_INDICATION:
- IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __func__);
irlmp_next_lap_state(self, LAP_STANDBY);
/* Send disconnect event to all LSAPs using this link */
LM_LAP_DISCONNECT_INDICATION);
break;
case LM_LAP_DISCONNECT_REQUEST:
- IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __func__);
/* One of the LSAP did timeout or was closed, if it was
* the last one, try to get out of here - Jean II */
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n",
- __FUNCTION__, irlmp_event[event]);
+ __func__, irlmp_event[event]);
break;
}
}
static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) {
case LM_LAP_CONNECT_REQUEST:
- IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __func__);
/*
* IrLAP may have a pending disconnect. We tried to close
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n",
- __FUNCTION__, irlmp_event[event]);
+ __func__, irlmp_event[event]);
break;
}
}
{
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
break;
#endif /* CONFIG_IRDA_ULTRA */
case LM_CONNECT_REQUEST:
- IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __func__);
if (self->conn_skb) {
IRDA_WARNING("%s: busy with another request!\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
/* Don't forget to refcount it (see irlmp_connect_request()) */
case LM_CONNECT_INDICATION:
if (self->conn_skb) {
IRDA_WARNING("%s: busy with another request!\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
/* Don't forget to refcount it (see irlap_driver_rcv()) */
break;
default:
IRDA_DEBUG(1, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
struct lsap_cb *lsap;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
case LM_WATCHDOG_TIMEOUT:
/* May happen, who knows...
* Jean II */
- IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
/* Disconnect, get out... - Jean II */
self->lap = NULL;
/* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
* are *not* yet bound to the IrLAP link. Jean II */
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
struct sk_buff *tx_skb;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
break;
case LM_CONNECT_RESPONSE:
IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
- "no indication issued yet\n", __FUNCTION__);
+ "no indication issued yet\n", __func__);
/* Keep state */
break;
case LM_DISCONNECT_REQUEST:
IRDA_DEBUG(0, "%s(), LM_DISCONNECT_REQUEST, "
- "not yet bound to IrLAP connection\n", __FUNCTION__);
+ "not yet bound to IrLAP connection\n", __func__);
/* Keep state */
break;
case LM_LAP_CONNECT_CONFIRM:
- IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __func__);
irlmp_next_lsap_state(self, LSAP_CONNECT);
tx_skb = self->conn_skb;
/* Will happen in some rare cases because of a race condition.
* Just make sure we don't stay there forever...
* Jean II */
- IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
/* Go back to disconnected mode, keep the socket waiting */
self->lap = NULL;
/* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
* are *not* yet bound to the IrLAP link. Jean II */
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
LM_REASON reason;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
break;
case LM_CONNECT_REQUEST:
IRDA_DEBUG(0, "%s(), LM_CONNECT_REQUEST, "
- "error, LSAP already connected\n", __FUNCTION__);
+ "error, LSAP already connected\n", __func__);
/* Keep state */
break;
case LM_CONNECT_RESPONSE:
IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
- "error, LSAP already connected\n", __FUNCTION__);
+ "error, LSAP already connected\n", __func__);
/* Keep state */
break;
case LM_DISCONNECT_REQUEST:
/* Try to close the LAP connection if its still there */
if (self->lap) {
IRDA_DEBUG(4, "%s(), trying to close IrLAP\n",
- __FUNCTION__);
+ __func__);
irlmp_do_lap_event(self->lap,
LM_LAP_DISCONNECT_REQUEST,
NULL);
reason = skb->data[3];
/* Try to close the LAP connection */
- IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
irlmp_disconnect_indication(self, reason, skb);
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) {
case LM_CONNECT_CONFIRM:
reason = skb->data[3];
/* Try to close the LAP connection */
- IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
irlmp_disconnect_indication(self, reason, skb);
irlmp_disconnect_indication(self, reason, skb);
break;
case LM_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
IRDA_ASSERT(self->lap != NULL, return -1;);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
LM_REASON reason;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(irlmp != NULL, return -1;);
irlmp_next_lsap_state(self, LSAP_SETUP);
break;
case LM_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __func__);
IRDA_ASSERT(self->lap != NULL, return -1;);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
skb->data[1] = slsap;
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);
} else
irlap_data_request(self->irlap, skb, FALSE);
{
__u8 *frame;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
__u8 dlsap_sel; /* Destination LSAP address */
__u8 *fp;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) {
IRDA_DEBUG(3, "%s(), incoming connection, "
"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 */
lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD,
/* Maybe LSAP was already connected, so try one more time */
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,
self->lsaps);
}
if (lsap == NULL) {
IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\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) {
IRDA_DEBUG(2, "%s(), received control frame %02x\n",
- __FUNCTION__, fp[2]);
+ __func__, fp[2]);
} else {
- IRDA_DEBUG(2, "%s(), received data frame\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), received data frame\n", __func__);
}
return;
}
break;
case DISCONNECT:
IRDA_DEBUG(4, "%s(), Disconnect indication!\n",
- __FUNCTION__);
+ __func__);
irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION,
skb);
break;
break;
default:
IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n",
- __FUNCTION__, fp[2]);
+ __func__, fp[2]);
break;
}
} else if (unreliable) {
__u8 *fp;
unsigned long flags;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
if (pid & 0x80) {
IRDA_DEBUG(0, "%s(), extension in PID not supp!\n",
- __FUNCTION__);
+ __func__);
return;
}
/* Check if frame is addressed to the connectionless LSAP */
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;
}
if (lsap)
irlmp_connless_data_indication(lsap, skb);
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 */
LAP_REASON reason,
struct sk_buff *skb)
{
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(lap != NULL, return;);
IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
__u32 daddr, struct qos_info *qos,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
/* Copy QoS settings for this session */
self->qos = qos;
void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
*/
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->magic == LMP_LAP_MAGIC, return;);
{
int ret = 0;
- IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s()\n", __func__);
/* Lower layer of the stack */
irlmp_init();
/* All error messages (will show up in the normal logs) */
#define DERROR(dbg, format, args...) \
{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) */
#define DEBUG(dbg, format, args...) \
{if(DEBUG_##dbg) \
- printk(KERN_DEBUG "irnet: %s(): " format, __FUNCTION__ , ##args);}
+ printk(KERN_DEBUG "irnet: %s(): " format, __func__ , ##args);}
/* Entering a function (trace) */
#define DENTER(dbg, format, args...) \
{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) */
#define DPASS(dbg, format, args...) \
{if(DEBUG_##dbg) \
- printk(KERN_DEBUG "irnet: <>%s" format, __FUNCTION__ , ##args);}
+ printk(KERN_DEBUG "irnet: <>%s" format, __func__ , ##args);}
/* Exiting a function (trace) */
#define DEXIT(dbg, format, args...) \
{if(DEBUG_##dbg) \
- printk(KERN_DEBUG "irnet: <-%s()" format, __FUNCTION__ , ##args);}
+ printk(KERN_DEBUG "irnet: <-%s()" format, __func__ , ##args);}
/* Exit a function with debug */
#define DRETURN(ret, dbg, args...) \
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);
}
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);
if (!dev)
static void enqueue_first(irda_queue_t **queue, irda_queue_t* element)
{
- IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG( 4, "%s()\n", __func__);
/*
* Check if queue is empty.
unsigned long flags = 0;
int bin;
- IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG( 4, "%s()\n", __func__);
IRDA_ASSERT( hashbin != NULL, return;);
IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;);
unsigned long flags = 0;
irda_queue_t* entry;
- IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG( 4, "%s()\n", __func__);
IRDA_ASSERT( hashbin != NULL, return NULL;);
IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
int bin;
long hashv;
- IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG( 4, "%s()\n", __func__);
IRDA_ASSERT( hashbin != NULL, return NULL;);
IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
irttp->tsaps = hashbin_new(HB_LOCK);
if (!irttp->tsaps) {
IRDA_ERROR("%s: can't allocate IrTTP hashbin!\n",
- __FUNCTION__);
+ __func__);
kfree(irttp);
return -ENOMEM;
}
if (!self || self->magic != TTP_TSAP_MAGIC)
return;
- IRDA_DEBUG(4, "%s(instance=%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self);
/* Try to make some progress, especially on Tx side - Jean II */
irttp_run_rx_queue(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->magic == TTP_TSAP_MAGIC, return;);
IRDA_ASSERT(self != NULL, return NULL;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;);
- IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __func__,
self->rx_sdu_size);
skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size);
IRDA_DEBUG(2,
"%s(), frame len=%d, rx_sdu_size=%d, rx_max_sdu_size=%d\n",
- __FUNCTION__, n, self->rx_sdu_size, self->rx_max_sdu_size);
+ __func__, n, self->rx_sdu_size, self->rx_max_sdu_size);
/* Note : irttp_run_rx_queue() calculate self->rx_sdu_size
* by summing the size of all fragments, so we should always
* have n == self->rx_sdu_size, except in cases where we
struct sk_buff *frag;
__u8 *frame;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
* Split frame into a number of segments
*/
while (skb->len > self->max_seg_size) {
- IRDA_DEBUG(2, "%s(), fragmenting ...\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), fragmenting ...\n", __func__);
/* Make new segment */
frag = alloc_skb(self->max_seg_size+self->max_header_size,
skb_queue_tail(&self->tx_queue, frag);
}
/* Queue what is left of the original skb */
- IRDA_DEBUG(2, "%s(), queuing last segment\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), queuing last segment\n", __func__);
frame = skb_push(skb, TTP_HEADER);
frame[0] = 0x00; /* Clear more bit */
else
self->tx_max_sdu_size = param->pv.i;
- IRDA_DEBUG(1, "%s(), MaxSduSize=%d\n", __FUNCTION__, param->pv.i);
+ IRDA_DEBUG(1, "%s(), MaxSduSize=%d\n", __func__, param->pv.i);
return 0;
}
* JeanII */
if((stsap_sel != LSAP_ANY) &&
((stsap_sel < 0x01) || (stsap_sel >= 0x70))) {
- IRDA_DEBUG(0, "%s(), invalid tsap!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), invalid tsap!\n", __func__);
return NULL;
}
self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC);
if (self == NULL) {
- IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __func__);
return NULL;
}
*/
lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0);
if (lsap == NULL) {
- IRDA_WARNING("%s: unable to allocate LSAP!!\n", __FUNCTION__);
+ IRDA_WARNING("%s: unable to allocate LSAP!!\n", __func__);
return NULL;
}
* the stsap_sel we have might not be valid anymore
*/
self->stsap_sel = lsap->slsap_sel;
- IRDA_DEBUG(4, "%s(), stsap_sel=%02x\n", __FUNCTION__, self->stsap_sel);
+ IRDA_DEBUG(4, "%s(), stsap_sel=%02x\n", __func__, self->stsap_sel);
self->notify = *notify;
self->lsap = lsap;
{
struct tsap_cb *tsap;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
/* Check if disconnect is not pending */
if (!test_bit(0, &self->disconnect_pend)) {
IRDA_WARNING("%s: TSAP still connected!\n",
- __FUNCTION__);
+ __func__);
irttp_disconnect_request(self, NULL, P_NORMAL);
}
self->close_pend = TRUE;
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
IRDA_ASSERT(skb != NULL, return -1;);
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
/* Check that nothing bad happens */
if ((skb->len == 0) || (!self->connected)) {
IRDA_DEBUG(1, "%s(), No data, or not connected\n",
- __FUNCTION__);
+ __func__);
goto err;
}
if (skb->len > self->max_seg_size) {
IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n",
- __FUNCTION__);
+ __func__);
goto err;
}
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
IRDA_ASSERT(skb != NULL, return -1;);
- IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__,
skb_queue_len(&self->tx_queue));
/* Check that nothing bad happens */
if ((skb->len == 0) || (!self->connected)) {
- IRDA_WARNING("%s: No data, or not connected\n", __FUNCTION__);
+ IRDA_WARNING("%s: No data, or not connected\n", __func__);
ret = -ENOTCONN;
goto err;
}
*/
if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) {
IRDA_ERROR("%s: SAR disabled, and data is too large for IrLAP!\n",
- __FUNCTION__);
+ __func__);
ret = -EMSGSIZE;
goto err;
}
(skb->len > self->tx_max_sdu_size))
{
IRDA_ERROR("%s: SAR enabled, but data is larger than TxMaxSduSize!\n",
- __FUNCTION__);
+ __func__);
ret = -EMSGSIZE;
goto err;
}
int n;
IRDA_DEBUG(2, "%s() : send_credit = %d, queue_len = %d\n",
- __FUNCTION__,
+ __func__,
self->send_credit, skb_queue_len(&self->tx_queue));
/* Get exclusive access to the tx queue, otherwise don't touch it */
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n",
- __FUNCTION__,
+ __func__,
self->send_credit, self->avail_credit, self->remote_credit);
/* Give credit to peer */
struct tsap_cb *self;
int err;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
self = (struct tsap_cb *) instance;
{
struct tsap_cb *self;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
self = (struct tsap_cb *) instance;
self->notify.status_indication(self->notify.instance,
link, lock);
else
- IRDA_DEBUG(2, "%s(), no handler\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), no handler\n", __func__);
}
/*
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
- IRDA_DEBUG(4, "%s(instance=%p)\n", __FUNCTION__, self);
+ IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self);
/* We are "polled" directly from LAP, and the LAP want to fill
* its Tx window. We want to do our best to send it data, so that
*/
void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow)
{
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
switch (flow) {
case FLOW_STOP:
- IRDA_DEBUG(1, "%s(), flow stop\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), flow stop\n", __func__);
self->rx_sdu_busy = TRUE;
break;
case FLOW_START:
- IRDA_DEBUG(1, "%s(), flow start\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), flow start\n", __func__);
self->rx_sdu_busy = FALSE;
/* Client say he can accept more data, try to free our
break;
default:
- IRDA_DEBUG(1, "%s(), Unknown flow command!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Unknown flow command!\n", __func__);
}
}
EXPORT_SYMBOL(irttp_flow_request);
__u8 *frame;
__u8 n;
- IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __FUNCTION__, max_sdu_size);
+ IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __func__, max_sdu_size);
IRDA_ASSERT(self != NULL, return -EBADR;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;);
__u8 plen;
__u8 n;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
self = (struct tsap_cb *) instance;
n = skb->data[0] & 0x7f;
- IRDA_DEBUG(4, "%s(), Initial send_credit=%d\n", __FUNCTION__, n);
+ IRDA_DEBUG(4, "%s(), Initial send_credit=%d\n", __func__, n);
self->send_credit = n;
self->tx_max_sdu_size = 0;
/* Any errors in the parameter list? */
if (ret < 0) {
IRDA_WARNING("%s: error extracting parameters\n",
- __FUNCTION__);
+ __func__);
dev_kfree_skb(skb);
/* Do not accept this connection attempt */
skb_pull(skb, IRDA_MIN(skb->len, plen+1));
}
- IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __FUNCTION__,
+ IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __func__,
self->send_credit, self->avail_credit, self->remote_credit);
- IRDA_DEBUG(2, "%s(), MaxSduSize=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), MaxSduSize=%d\n", __func__,
self->tx_max_sdu_size);
if (self->notify.connect_confirm) {
self->max_seg_size = max_seg_size - TTP_HEADER;
self->max_header_size = max_header_size+TTP_HEADER;
- IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __FUNCTION__, self->stsap_sel);
+ IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __func__, self->stsap_sel);
/* Need to update dtsap_sel if its equal to LSAP_ANY */
self->dtsap_sel = lsap->dlsap_sel;
/* Any errors in the parameter list? */
if (ret < 0) {
IRDA_WARNING("%s: error extracting parameters\n",
- __FUNCTION__);
+ __func__);
dev_kfree_skb(skb);
/* Do not accept this connection attempt */
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
- IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __FUNCTION__,
+ IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __func__,
self->stsap_sel);
/* Any userdata supplied? */
struct tsap_cb *new;
unsigned long flags;
- IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s()\n", __func__);
/* Protect our access to the old tsap instance */
spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags);
/* Find the old instance */
if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) {
- IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __func__);
spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
return NULL;
}
/* Allocate a new instance */
new = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC);
if (!new) {
- IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__);
spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
return NULL;
}
/* Try to dup the LSAP (may fail if we were too slow) */
new->lsap = irlmp_dup(orig->lsap, new);
if (!new->lsap) {
- IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
kfree(new);
return NULL;
}
/* Already disconnected? */
if (!self->connected) {
- IRDA_DEBUG(4, "%s(), already disconnected!\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), already disconnected!\n", __func__);
if (userdata)
dev_kfree_skb(userdata);
return -1;
* Jean II */
if(test_and_set_bit(0, &self->disconnect_pend)) {
IRDA_DEBUG(0, "%s(), disconnect already pending\n",
- __FUNCTION__);
+ __func__);
if (userdata)
dev_kfree_skb(userdata);
* disconnecting right now since the data will
* not have any usable connection to be sent on
*/
- IRDA_DEBUG(1, "%s(): High priority!!()\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(): High priority!!()\n", __func__);
irttp_flush_queues(self);
} else if (priority == P_NORMAL) {
/*
* be sent at the LMP level (so even if the peer has its Tx queue
* full of data). - Jean II */
- IRDA_DEBUG(1, "%s(), Disconnecting ...\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Disconnecting ...\n", __func__);
self->connected = FALSE;
if (!userdata) {
{
struct tsap_cb *self;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
self = (struct tsap_cb *) instance;
* give an error back
*/
if (err) {
- IRDA_DEBUG(0, "%s() requeueing skb!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() requeueing skb!\n", __func__);
/* Make sure we take a break */
self->rx_sdu_busy = TRUE;
struct sk_buff *skb;
int more = 0;
- IRDA_DEBUG(2, "%s() send=%d,avail=%d,remote=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s() send=%d,avail=%d,remote=%d\n", __func__,
self->send_credit, self->avail_credit, self->remote_credit);
/* Get exclusive access to the rx queue, otherwise don't touch it */
*/
if (self->rx_sdu_size <= self->rx_max_sdu_size) {
IRDA_DEBUG(4, "%s(), queueing frag\n",
- __FUNCTION__);
+ __func__);
skb_queue_tail(&self->rx_fragments, skb);
} else {
/* Free the part of the SDU that is too big */
/* Now we can deliver the reassembled skb */
irttp_do_data_indication(self, skb);
} else {
- IRDA_DEBUG(1, "%s(), Truncated frame\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), Truncated frame\n", __func__);
/* Free the part of the SDU that is too big */
dev_kfree_skb(skb);
*/
if (p.pl == 0) {
if (p.pv.i < 0xff) {
- IRDA_DEBUG(2, "%s(), using 1 byte\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), using 1 byte\n", __func__);
p.pl = 1;
} else if (p.pv.i < 0xffff) {
- IRDA_DEBUG(2, "%s(), using 2 bytes\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), using 2 bytes\n", __func__);
p.pl = 2;
} else {
- IRDA_DEBUG(2, "%s(), using 4 bytes\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s(), using 4 bytes\n", __func__);
p.pl = 4; /* Default length */
}
}
/* Check if buffer is long enough for insertion */
if (len < (2+p.pl)) {
IRDA_WARNING("%s: buffer too short for insertion!\n",
- __FUNCTION__);
+ __func__);
return -1;
}
- IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
p.pi, p.pl, p.pv.i);
switch (p.pl) {
case 1:
break;
default:
IRDA_WARNING("%s: length %d not supported\n",
- __FUNCTION__, p.pl);
+ __func__, p.pl);
/* Skip parameter */
return -1;
}
if (len < (2+p.pl)) {
IRDA_WARNING("%s: buffer too short for parsing! "
"Need %d bytes, but len is only %d\n",
- __FUNCTION__, p.pl, len);
+ __func__, p.pl, len);
return -1;
}
if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) {
IRDA_ERROR("%s: invalid parameter length! "
"Expected %d bytes, but value had %d bytes!\n",
- __FUNCTION__, type & PV_MASK, p.pl);
+ __func__, type & PV_MASK, p.pl);
/* Most parameters are bit/byte fields or little endian,
* so it's ok to only extract a subset of it (the subset
break;
default:
IRDA_WARNING("%s: length %d not supported\n",
- __FUNCTION__, p.pl);
+ __func__, p.pl);
/* Skip parameter */
return p.pl+2;
}
- IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
p.pi, p.pl, p.pv.i);
/* Call handler for this parameter */
err = (*func)(self, &p, PV_PUT);
irda_param_t p;
int err;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
p.pi = pi; /* In case handler needs to know */
p.pl = buf[1]; /* Extract length of value */
- IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __func__,
p.pi, p.pl);
/* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) {
IRDA_WARNING("%s: buffer too short for parsing! "
"Need %d bytes, but len is only %d\n",
- __FUNCTION__, p.pl, len);
+ __func__, p.pl, len);
return -1;
}
* checked that the buffer is long enough */
strncpy(str, buf+2, p.pl);
- IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __FUNCTION__,
+ IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __func__,
(__u8) str[0], (__u8) str[1]);
/* Null terminate string */
if (len < (2+p.pl)) {
IRDA_WARNING("%s: buffer too short for parsing! "
"Need %d bytes, but len is only %d\n",
- __FUNCTION__, p.pl, len);
+ __func__, p.pl, len);
return -1;
}
- IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s(), not impl\n", __func__);
return p.pl+2; /* Extracted pl+2 bytes */
}
(pi_minor > info->tables[pi_major].len-1))
{
IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
- __FUNCTION__, pi);
+ __func__, pi);
/* Skip this parameter */
return -1;
/* Check if handler has been implemented */
if (!pi_minor_info->func) {
- IRDA_MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, pi);
+ IRDA_MESSAGE("%s: no handler for pi=%#x\n", __func__, pi);
/* Skip this parameter */
return -1;
}
(pi_minor > info->tables[pi_major].len-1))
{
IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
- __FUNCTION__, buf[0]);
+ __func__, buf[0]);
/* Skip this parameter */
return 2 + buf[n + 1]; /* Continue */
/* Find expected data type for this parameter identifier (pi)*/
type = pi_minor_info->type;
- IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __FUNCTION__,
+ IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __func__,
pi_major, pi_minor, type);
/* Check if handler has been implemented */
if (!pi_minor_info->func) {
IRDA_MESSAGE("%s: no handler for pi=%#x\n",
- __FUNCTION__, buf[n]);
+ __func__, buf[n]);
/* Skip this parameter */
return 2 + buf[n + 1]; /* Continue */
}
* it's very likely the peer. - Jean II */
if (word == 0) {
IRDA_WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n",
- __FUNCTION__);
+ __func__);
/* The only safe choice (we don't know the array size) */
word = 0x1;
}
__u32 line_capacity;
int index;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
/*
* Make sure the mintt is sensible.
int i;
IRDA_WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n",
- __FUNCTION__, sysctl_min_tx_turn_time);
+ __func__, sysctl_min_tx_turn_time);
/* We don't really need bits, but easier this way */
i = value_highest_bit(sysctl_min_tx_turn_time, min_turn_times,
{
IRDA_DEBUG(0,
"%s(), adjusting max turn time from %d to 500 ms\n",
- __FUNCTION__, qos->max_turn_time.value);
+ __func__, qos->max_turn_time.value);
qos->max_turn_time.value = 500;
}
while ((qos->data_size.value > line_capacity) && (index > 0)) {
qos->data_size.value = data_sizes[index--];
IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
- __FUNCTION__, qos->data_size.value);
+ __func__, qos->data_size.value);
}
#else /* Use method described in section 6.6.11 of IrLAP */
while (irlap_requested_line_capacity(qos) > line_capacity) {
if (qos->window_size.value > 1) {
qos->window_size.value--;
IRDA_DEBUG(2, "%s(), reducing window size to %d\n",
- __FUNCTION__, qos->window_size.value);
+ __func__, qos->window_size.value);
} else if (index > 1) {
qos->data_size.value = data_sizes[index--];
IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
- __FUNCTION__, qos->data_size.value);
+ __func__, qos->data_size.value);
} else {
IRDA_WARNING("%s(), nothing more we can do!\n",
- __FUNCTION__);
+ __func__);
}
}
#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
if (get) {
param->pv.i = self->qos_rx.baud_rate.bits;
IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n",
- __FUNCTION__, param->pv.i);
+ __func__, param->pv.i);
} else {
/*
* Stations must agree on baud rate, so calculate
int i,j;
IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n",
- __FUNCTION__, speed, max_turn_time);
+ __func__, speed, max_turn_time);
i = value_index(speed, baud_rates, 10);
j = value_index(max_turn_time, max_turn_times, 4);
line_capacity = max_line_capacities[i][j];
IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n",
- __FUNCTION__, line_capacity);
+ __func__, line_capacity);
return line_capacity;
}
qos->min_turn_time.value);
IRDA_DEBUG(2, "%s(), requested line capacity=%d\n",
- __FUNCTION__, line_capacity);
+ __func__, line_capacity);
return line_capacity;
}
* Nothing to worry about, but we set the default number of
* BOF's
*/
- IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __func__);
xbofs = 10;
} else
xbofs = cb->xbofs + cb->xbofs_delay;
- IRDA_DEBUG(4, "%s(), xbofs=%d\n", __FUNCTION__, xbofs);
+ IRDA_DEBUG(4, "%s(), xbofs=%d\n", __func__, xbofs);
/* Check that we never use more than 115 + 48 xbofs */
if (xbofs > 163) {
- IRDA_DEBUG(0, "%s(), too many xbofs (%d)\n", __FUNCTION__,
+ IRDA_DEBUG(0, "%s(), too many xbofs (%d)\n", __func__,
xbofs);
xbofs = 163;
}
*/
if(n >= (buffsize-5)) {
IRDA_ERROR("%s(), tx buffer overflow (n=%d)\n",
- __FUNCTION__, n);
+ __func__, n);
return n;
}
/* Not supposed to happen, the previous frame is not
* finished - Jean II */
IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n",
- __FUNCTION__);
+ __func__);
stats->rx_errors++;
stats->rx_missed_errors++;
irda_device_set_media_busy(dev, TRUE);
/* Wrong CRC, discard frame! */
irda_device_set_media_busy(dev, TRUE);
- IRDA_DEBUG(1, "%s(), crc error\n", __FUNCTION__);
+ IRDA_DEBUG(1, "%s(), crc error\n", __func__);
stats->rx_errors++;
stats->rx_crc_errors++;
}
break;
case LINK_ESCAPE:
- IRDA_WARNING("%s: state not defined\n", __FUNCTION__);
+ IRDA_WARNING("%s: state not defined\n", __func__);
break;
case BEGIN_FRAME:
#endif
} else {
IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n",
- __FUNCTION__);
+ __func__);
rx_buff->state = OUTSIDE_FRAME;
}
break;
rx_buff->state = INSIDE_FRAME;
} else {
IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n",
- __FUNCTION__);
+ __func__);
rx_buff->state = OUTSIDE_FRAME;
}
break;
sock_hold(sk);
lock_sock(sk);
llc = llc_sk(sk);
- dprintk("%s: closing local(%02X) remote(%02X)\n", __FUNCTION__,
+ dprintk("%s: closing local(%02X) remote(%02X)\n", __func__,
llc->laddr.lsap, llc->daddr.lsap);
if (!llc_send_disc(sk))
llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo);
struct llc_sap *sap;
int rc = -EINVAL;
- dprintk("%s: binding %02X\n", __FUNCTION__, addr->sllc_sap);
+ dprintk("%s: binding %02X\n", __func__, addr->sllc_sap);
if (unlikely(!sock_flag(sk, SOCK_ZAPPED) || addrlen != sizeof(*addr)))
goto out;
rc = -EAFNOSUPPORT;
rc = llc_establish_connection(sk, llc->dev->dev_addr,
addr->sllc_mac, addr->sllc_sap);
if (rc) {
- dprintk("%s: llc_ui_send_conn failed :-(\n", __FUNCTION__);
+ dprintk("%s: llc_ui_send_conn failed :-(\n", __func__);
sock->state = SS_UNCONNECTED;
sk->sk_state = TCP_CLOSE;
goto out;
struct sk_buff *skb;
int rc = -EOPNOTSUPP;
- dprintk("%s: accepting on %02X\n", __FUNCTION__,
+ dprintk("%s: accepting on %02X\n", __func__,
llc_sk(sk)->laddr.lsap);
lock_sock(sk);
if (unlikely(sk->sk_type != SOCK_STREAM))
if (rc)
goto out;
}
- dprintk("%s: got a new connection on %02X\n", __FUNCTION__,
+ dprintk("%s: got a new connection on %02X\n", __func__,
llc_sk(sk)->laddr.lsap);
skb = skb_dequeue(&sk->sk_receive_queue);
rc = -EINVAL;
/* put original socket back into a clean listen state. */
sk->sk_state = TCP_LISTEN;
sk->sk_ack_backlog--;
- dprintk("%s: ok success on %02X, client on %02X\n", __FUNCTION__,
+ dprintk("%s: ok success on %02X, client on %02X\n", __func__,
llc_sk(sk)->addr.sllc_sap, newllc->daddr.lsap);
frees:
kfree_skb(skb);
size_t size = 0;
int rc = -EINVAL, copied = 0, hdrlen;
- dprintk("%s: sending from %02X to %02X\n", __FUNCTION__,
+ dprintk("%s: sending from %02X to %02X\n", __func__,
llc->laddr.lsap, llc->daddr.lsap);
lock_sock(sk);
if (addr) {
kfree_skb(skb);
release:
dprintk("%s: failed sending from %02X to %02X: %d\n",
- __FUNCTION__, llc->laddr.lsap, llc->daddr.lsap, rc);
+ __func__, llc->laddr.lsap, llc->daddr.lsap, rc);
}
release_sock(sk);
return rc ? : copied;
{
if (llc_sk(sk)->state == LLC_CONN_OUT_OF_SVC) {
printk(KERN_WARNING "%s: timer called on closed connection\n",
- __FUNCTION__);
+ __func__);
kfree_skb(skb);
} else {
if (!sock_owned_by_user(sk))
llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
if (!rc)
dprintk("%s: matched, state=%d, ns=%d, vr=%d\n",
- __FUNCTION__, llc_sk(sk)->state, ns, vr);
+ __func__, llc_sk(sk)->state, ns, vr);
return rc;
}
llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
if (!rc)
dprintk("%s: matched, state=%d, ns=%d, vr=%d\n",
- __FUNCTION__, llc_sk(sk)->state, ns, vr);
+ __func__, llc_sk(sk)->state, ns, vr);
return rc;
}
(LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu)) &&
nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
- __FUNCTION__, llc_sk(sk)->state, vs, nr);
+ __func__, llc_sk(sk)->state, vs, nr);
rc = 0;
}
return rc;
nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
rc = 0;
dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
- __FUNCTION__, llc_sk(sk)->state, vs, nr);
+ __func__, llc_sk(sk)->state, vs, nr);
}
return rc;
}
*/
rc = llc_conn_service(skb->sk, skb);
if (unlikely(rc != 0)) {
- printk(KERN_ERR "%s: llc_conn_service failed\n", __FUNCTION__);
+ printk(KERN_ERR "%s: llc_conn_service failed\n", __func__);
goto out_kfree_skb;
}
* shouldn't happen
*/
printk(KERN_ERR "%s: sock_queue_rcv_skb failed!\n",
- __FUNCTION__);
+ __func__);
kfree_skb(skb);
}
break;
* FIXME:
* RESET is not being notified to upper layers for now
*/
- printk(KERN_INFO "%s: received a reset ind!\n", __FUNCTION__);
+ printk(KERN_INFO "%s: received a reset ind!\n", __func__);
kfree_skb(skb);
break;
default:
if (ev->ind_prim) {
printk(KERN_INFO "%s: received unknown %d prim!\n",
- __FUNCTION__, ev->ind_prim);
+ __func__, ev->ind_prim);
kfree_skb(skb);
}
/* No indication */
* FIXME:
* RESET is not being notified to upper layers for now
*/
- printk(KERN_INFO "%s: received a reset conf!\n", __FUNCTION__);
+ printk(KERN_INFO "%s: received a reset conf!\n", __func__);
break;
default:
if (ev->cfm_prim) {
printk(KERN_INFO "%s: received unknown %d prim!\n",
- __FUNCTION__, ev->cfm_prim);
+ __func__, ev->cfm_prim);
break;
}
goto out_skb_put; /* No confirmation */
if (!sock_owned_by_user(sk))
llc_conn_rcv(sk, skb);
else {
- dprintk("%s: adding to backlog...\n", __FUNCTION__);
+ dprintk("%s: adding to backlog...\n", __func__);
llc_set_backlog_type(skb, LLC_PACKET);
sk_add_backlog(sk, skb);
}
else
goto out_kfree_skb;
} else {
- printk(KERN_ERR "%s: invalid skb in backlog\n", __FUNCTION__);
+ printk(KERN_ERR "%s: invalid skb in backlog\n", __func__);
goto out_kfree_skb;
}
out:
#ifdef LLC_REFCNT_DEBUG
atomic_inc(&llc_sock_nr);
printk(KERN_DEBUG "LLC socket %p created in %s, now we have %d alive\n", sk,
- __FUNCTION__, atomic_read(&llc_sock_nr));
+ __func__, atomic_read(&llc_sock_nr));
#endif
out:
return sk;
/* Stop all (possibly) running timers */
llc_conn_ac_stop_all_timers(sk, NULL);
#ifdef DEBUG_LLC_CONN_ALLOC
- printk(KERN_INFO "%s: unackq=%d, txq=%d\n", __FUNCTION__,
+ printk(KERN_INFO "%s: unackq=%d, txq=%d\n", __func__,
skb_queue_len(&llc->pdu_unack_q),
skb_queue_len(&sk->sk_write_queue));
#endif
#ifdef LLC_REFCNT_DEBUG
if (atomic_read(&sk->sk_refcnt) != 1) {
printk(KERN_DEBUG "Destruction of LLC sock %p delayed in %s, cnt=%d\n",
- sk, __FUNCTION__, atomic_read(&sk->sk_refcnt));
+ sk, __func__, atomic_read(&sk->sk_refcnt));
printk(KERN_DEBUG "%d LLC sockets are still alive\n",
atomic_read(&llc_sock_nr));
} else {
atomic_dec(&llc_sock_nr);
printk(KERN_DEBUG "LLC socket %p released in %s, %d are still alive\n", sk,
- __FUNCTION__, atomic_read(&llc_sock_nr));
+ __func__, atomic_read(&llc_sock_nr));
}
#endif
sock_put(sk);
* receives, do not try to analyse it.
*/
if (unlikely(skb->pkt_type == PACKET_OTHERHOST)) {
- dprintk("%s: PACKET_OTHERHOST\n", __FUNCTION__);
+ dprintk("%s: PACKET_OTHERHOST\n", __func__);
goto drop;
}
skb = skb_share_check(skb, GFP_ATOMIC);
goto handle_station;
sap = llc_sap_find(pdu->dsap);
if (unlikely(!sap)) {/* unknown SAP */
- dprintk("%s: llc_sap_find(%02X) failed!\n", __FUNCTION__,
+ dprintk("%s: llc_sap_find(%02X) failed!\n", __func__,
pdu->dsap);
goto drop;
}
break;
default:
printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x",
- dev->name, __FUNCTION__, type);
+ dev->name, __func__, type);
}
ieee80211_debugfs_change_if_type(sdata, oldtype);
}
{
}
-#define kenter(FMT,...) dbgprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__)
-#define kleave(FMT,...) dbgprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__)
+#define kenter(FMT,...) dbgprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
+#define kleave(FMT,...) dbgprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
#define kdebug(FMT,...) dbgprintk(" "FMT ,##__VA_ARGS__)
#define kproto(FMT,...) dbgprintk("### "FMT ,##__VA_ARGS__)
#define knet(FMT,...) dbgprintk("@@@ "FMT ,##__VA_ARGS__)
} while (0)
#else
-#define _enter(FMT,...) _dbprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__)
-#define _leave(FMT,...) _dbprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__)
+#define _enter(FMT,...) _dbprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
+#define _leave(FMT,...) _dbprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
#define _debug(FMT,...) _dbprintk(" "FMT ,##__VA_ARGS__)
#define _proto(FMT,...) _dbprintk("### "FMT ,##__VA_ARGS__)
#define _net(FMT,...) _dbprintk("@@@ "FMT ,##__VA_ARGS__)
}
SCTP_DEBUG_PRINTK("%s: asoc:%p, pmtu:%d, frag_point:%d\n",
- __FUNCTION__, asoc, asoc->pathmtu, asoc->frag_point);
+ __func__, asoc, asoc->pathmtu, asoc->frag_point);
}
/* Should we send a SACK to update our peer? */
}
SCTP_DEBUG_PRINTK("%s: asoc %p rwnd increased by %d to (%u, %u) "
- "- %u\n", __FUNCTION__, asoc, len, asoc->rwnd,
+ "- %u\n", __func__, asoc, len, asoc->rwnd,
asoc->rwnd_over, asoc->a_rwnd);
/* Send a window update SACK if the rwnd has increased by at least the
if (sctp_peer_needs_update(asoc)) {
asoc->a_rwnd = asoc->rwnd;
SCTP_DEBUG_PRINTK("%s: Sending window update SACK- asoc: %p "
- "rwnd: %u a_rwnd: %u\n", __FUNCTION__,
+ "rwnd: %u a_rwnd: %u\n", __func__,
asoc, asoc->rwnd, asoc->a_rwnd);
sack = sctp_make_sack(asoc);
if (!sack)
asoc->rwnd = 0;
}
SCTP_DEBUG_PRINTK("%s: asoc %p rwnd decreased by %d to (%u, %u)\n",
- __FUNCTION__, asoc, len, asoc->rwnd,
+ __func__, asoc, len, asoc->rwnd,
asoc->rwnd_over);
}
msecs_to_jiffies(sinfo->sinfo_timetolive);
msg->can_abandon = 1;
SCTP_DEBUG_PRINTK("%s: msg:%p expires_at: %ld jiffies:%ld\n",
- __FUNCTION__, msg, msg->expires_at, jiffies);
+ __func__, msg, msg->expires_at, jiffies);
}
max = asoc->frag_point;
struct sctp_association *asoc,
struct sctp_transport *t)
{
- SCTP_DEBUG_PRINTK("%s\n", __FUNCTION__);
+ SCTP_DEBUG_PRINTK("%s\n", __func__);
sctp_do_sm(SCTP_EVENT_T_OTHER,
SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH),
SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, "
"src:" NIP6_FMT " dst:" NIP6_FMT "\n",
- __FUNCTION__, skb, skb->len,
+ __func__, skb, skb->len,
NIP6(fl.fl6_src), NIP6(fl.fl6_dst));
SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS);
SCTP_DEBUG_PRINTK("%s: DST=" NIP6_FMT " ",
- __FUNCTION__, NIP6(fl.fl6_dst));
+ __func__, NIP6(fl.fl6_dst));
if (saddr) {
ipv6_addr_copy(&fl.fl6_src, &saddr->v6.sin6_addr);
SCTP_DEBUG_PRINTK("%s: asoc:%p dst:%p "
"daddr:" NIP6_FMT " ",
- __FUNCTION__, asoc, dst, NIP6(daddr->v6.sin6_addr));
+ __func__, asoc, dst, NIP6(daddr->v6.sin6_addr));
if (!asoc) {
ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL,
} else {
printk(KERN_ERR "%s: asoc:%p Could not find a valid source "
"address for the dest:" NIP6_FMT "\n",
- __FUNCTION__, asoc, NIP6(daddr->v6.sin6_addr));
+ __func__, asoc, NIP6(daddr->v6.sin6_addr));
}
rcu_read_unlock();
{
struct sctp_chunk *chunk = NULL;
- SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __FUNCTION__,
+ SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __func__,
packet, vtag);
packet->vtag = vtag;
struct sctp_association *asoc = transport->asoc;
size_t overhead;
- SCTP_DEBUG_PRINTK("%s: packet:%p transport:%p\n", __FUNCTION__,
+ SCTP_DEBUG_PRINTK("%s: packet:%p transport:%p\n", __func__,
packet, transport);
packet->transport = transport;
{
struct sctp_chunk *chunk, *tmp;
- SCTP_DEBUG_PRINTK("%s: packet:%p\n", __FUNCTION__, packet);
+ SCTP_DEBUG_PRINTK("%s: packet:%p\n", __func__, packet);
list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) {
list_del_init(&chunk->list);
sctp_xmit_t retval;
int error = 0;
- SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __FUNCTION__,
+ SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __func__,
packet, chunk);
switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) {
size_t pmtu;
int too_big;
- SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __FUNCTION__, packet,
+ SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __func__, packet,
chunk);
/* Try to bundle AUTH chunk */
unsigned char *auth = NULL; /* pointer to auth in skb data */
__u32 cksum_buf_len = sizeof(struct sctphdr);
- SCTP_DEBUG_PRINTK("%s: packet:%p\n", __FUNCTION__, packet);
+ SCTP_DEBUG_PRINTK("%s: packet:%p\n", __func__, packet);
/* Do NOT generate a chunkless packet. */
if (list_empty(&packet->chunk_list))
"transport: %p, cwnd: %d, "
"ssthresh: %d, flight_size: %d, "
"pba: %d\n",
- __FUNCTION__, transport,
+ __func__, transport,
transport->cwnd,
transport->ssthresh,
transport->flight_size,
SCTP_DEBUG_PRINTK("%s: transport: %p, reason: %d, "
"cwnd: %d, ssthresh: %d, flight_size: %d, "
- "pba: %d\n", __FUNCTION__,
+ "pba: %d\n", __func__,
transport, reason,
transport->cwnd, transport->ssthresh,
transport->flight_size,
sctp_generate_fwdtsn(q, sack_ctsn);
SCTP_DEBUG_PRINTK("%s: sack Cumulative TSN Ack is 0x%x.\n",
- __FUNCTION__, sack_ctsn);
+ __func__, sack_ctsn);
SCTP_DEBUG_PRINTK("%s: Cumulative TSN Ack of association, "
"%p is 0x%x. Adv peer ack point: 0x%x\n",
- __FUNCTION__, asoc, ctsn, asoc->adv_peer_ack_point);
+ __func__, asoc, ctsn, asoc->adv_peer_ack_point);
/* See if all chunks are acked.
* Make sure the empty queue handler will get run later.
if (tchunk->tsn_gap_acked) {
SCTP_DEBUG_PRINTK("%s: Receiver reneged on "
"data TSN: 0x%x\n",
- __FUNCTION__,
+ __func__,
tsn);
tchunk->tsn_gap_acked = 0;
(sack_ctsn+2 == q->asoc->next_tsn)) {
SCTP_DEBUG_PRINTK("%s: SACK received for zero "
"window probe: %u\n",
- __FUNCTION__, sack_ctsn);
+ __func__, sack_ctsn);
q->asoc->overall_error_count = 0;
transport->error_count = 0;
}
SCTP_DEBUG_PRINTK(
"%s: TSN 0x%x missing counter: %d\n",
- __FUNCTION__, tsn,
+ __func__, tsn,
chunk->tsn_missing_report);
}
}
SCTP_DEBUG_PRINTK("%s: transport: %p, cwnd: %d, "
"ssthresh: %d, flight_size: %d, pba: %d\n",
- __FUNCTION__, transport, transport->cwnd,
+ __func__, transport, transport->cwnd,
transport->ssthresh, transport->flight_size,
transport->partial_bytes_acked);
}
fl.fl4_src = saddr->v4.sin_addr.s_addr;
SCTP_DEBUG_PRINTK("%s: DST:%u.%u.%u.%u, SRC:%u.%u.%u.%u - ",
- __FUNCTION__, NIPQUAD(fl.fl4_dst),
+ __func__, NIPQUAD(fl.fl4_dst),
NIPQUAD(fl.fl4_src));
if (!ip_route_output_key(&init_net, &rt, &fl)) {
{
SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, "
"src:%u.%u.%u.%u, dst:%u.%u.%u.%u\n",
- __FUNCTION__, skb, skb->len,
+ __func__, skb, skb->len,
NIPQUAD(skb->rtable->rt_src),
NIPQUAD(skb->rtable->rt_dst));
sctp_bh_lock_sock(asoc->base.sk);
if (sock_owned_by_user(asoc->base.sk)) {
- SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __FUNCTION__);
+ SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __func__);
/* Try again later. */
if (!mod_timer(&transport->T3_rtx_timer, jiffies + (HZ/20)))
sctp_bh_lock_sock(asoc->base.sk);
if (sock_owned_by_user(asoc->base.sk)) {
SCTP_DEBUG_PRINTK("%s:Sock is busy: timer %d\n",
- __FUNCTION__,
+ __func__,
timeout_type);
/* Try again later. */
sctp_bh_lock_sock(asoc->base.sk);
if (sock_owned_by_user(asoc->base.sk)) {
- SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __FUNCTION__);
+ SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __func__);
/* Try again later. */
if (!mod_timer(&transport->hb_timer, jiffies + (HZ/20)))
printk(KERN_WARNING
"%s association %p could not find address "
NIP6_FMT "\n",
- __FUNCTION__,
+ __func__,
asoc,
NIP6(from_addr.v6.sin6_addr));
} else {
printk(KERN_WARNING
"%s association %p could not find address "
NIPQUAD_FMT "\n",
- __FUNCTION__,
+ __func__,
asoc,
NIPQUAD(from_addr.v4.sin_addr.s_addr));
}
time_after(jiffies, hbinfo->sent_at + max_interval)) {
SCTP_DEBUG_PRINTK("%s: HEARTBEAT ACK with invalid timestamp "
"received for transport: %p\n",
- __FUNCTION__, link);
+ __func__, link);
return SCTP_DISPOSITION_DISCARD;
}
skb_pull(chunk->skb, len);
tsn = ntohl(fwdtsn_hdr->new_cum_tsn);
- SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __FUNCTION__, tsn);
+ SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __func__, tsn);
/* The TSN is too high--silently discard the chunk and count on it
* getting retransmitted later.
skb_pull(chunk->skb, len);
tsn = ntohl(fwdtsn_hdr->new_cum_tsn);
- SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __FUNCTION__, tsn);
+ SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __func__, tsn);
/* The TSN is too high--silently discard the chunk and count on it
* getting retransmitted later.
ep = sp->ep;
SCTP_DEBUG_PRINTK("%s: (sk: %p, addrs: %p, addrcnt: %d)\n",
- __FUNCTION__, sk, addrs, addrcnt);
+ __func__, sk, addrs, addrcnt);
list_for_each(pos, &ep->asocs) {
asoc = list_entry(pos, struct sctp_association, asocs);
ep = sp->ep;
SCTP_DEBUG_PRINTK("%s: (sk: %p, addrs: %p, addrcnt: %d)\n",
- __FUNCTION__, sk, addrs, addrcnt);
+ __func__, sk, addrs, addrcnt);
list_for_each(pos, &ep->asocs) {
asoc = list_entry(pos, struct sctp_association, asocs);
struct sockaddr *kaddrs;
SCTP_DEBUG_PRINTK("%s - sk %p addrs %p addrs_size %d\n",
- __FUNCTION__, sk, addrs, addrs_size);
+ __func__, sk, addrs, addrs_size);
if (unlikely(addrs_size <= 0))
return -EINVAL;
sctp_lock_sock(sk);
SCTP_DEBUG_PRINTK("%s - sk: %p, sockaddr: %p, addr_len: %d\n",
- __FUNCTION__, sk, addr, addr_len);
+ __func__, sk, addr, addr_len);
/* Validate addr_len before calling common connect/connectx routine. */
af = sctp_get_af_specific(addr->sa_family);
goto out;
}
- SCTP_DEBUG_PRINTK("%s: sk: %p asoc: %p\n", __FUNCTION__, sk, asoc);
+ SCTP_DEBUG_PRINTK("%s: sk: %p asoc: %p\n", __func__, sk, asoc);
retval = sctp_do_peeloff(asoc, &newsock);
if (retval < 0)
}
SCTP_DEBUG_PRINTK("%s: sk: %p asoc: %p newsk: %p sd: %d\n",
- __FUNCTION__, sk, asoc, newsock->sk, retval);
+ __func__, sk, asoc, newsock->sk, retval);
/* Return the fd mapped to the new socket. */
peeloff.sd = retval;
long current_timeo = *timeo_p;
DEFINE_WAIT(wait);
- SCTP_DEBUG_PRINTK("%s: asoc=%p, timeo=%ld\n", __FUNCTION__, asoc,
+ SCTP_DEBUG_PRINTK("%s: asoc=%p, timeo=%ld\n", __func__, asoc,
(long)(*timeo_p));
/* Increment the association's refcnt. */
if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) {
printk(KERN_WARNING "%s: Reported pmtu %d too low, "
"using default minimum of %d\n",
- __FUNCTION__, pmtu,
+ __func__, pmtu,
SCTP_DEFAULT_MINSEGMENT);
/* Use default minimum segment size and disable
* pmtu discovery on this transport.
tp->rto_pending = 0;
SCTP_DEBUG_PRINTK("%s: transport: %p, rtt: %d, srtt: %d "
- "rttvar: %d, rto: %ld\n", __FUNCTION__,
+ "rttvar: %d, rto: %ld\n", __func__,
tp, rtt, tp->srtt, tp->rttvar, tp->rto);
}
SCTP_DEBUG_PRINTK("%s: SLOW START: transport: %p, "
"bytes_acked: %d, cwnd: %d, ssthresh: %d, "
"flight_size: %d, pba: %d\n",
- __FUNCTION__,
+ __func__,
transport, bytes_acked, cwnd,
ssthresh, flight_size, pba);
} else {
SCTP_DEBUG_PRINTK("%s: CONGESTION AVOIDANCE: "
"transport: %p, bytes_acked: %d, cwnd: %d, "
"ssthresh: %d, flight_size: %d, pba: %d\n",
- __FUNCTION__,
+ __func__,
transport, bytes_acked, cwnd,
ssthresh, flight_size, pba);
}
transport->partial_bytes_acked = 0;
SCTP_DEBUG_PRINTK("%s: transport: %p reason: %d cwnd: "
- "%d ssthresh: %d\n", __FUNCTION__,
+ "%d ssthresh: %d\n", __func__,
transport, reason,
transport->cwnd, transport->ssthresh);
}
gss_auth->mech = gss_mech_get_by_pseudoflavor(flavor);
if (!gss_auth->mech) {
printk(KERN_WARNING "%s: Pseudoflavor %d not found!\n",
- __FUNCTION__, flavor);
+ __func__, flavor);
goto err_free;
}
gss_auth->service = gss_pseudoflavor_to_service(gss_auth->mech, flavor);
#define dprint_status(t) \
dprintk("RPC: %5u %s (status %d)\n", t->tk_pid, \
- __FUNCTION__, t->tk_status)
+ __func__, t->tk_status)
/*
* All RPC clients are linked into this list
out_no_stats:
kfree(new);
out_no_clnt:
- dprintk("RPC: %s: returned error %d\n", __FUNCTION__, err);
+ dprintk("RPC: %s: returned error %d\n", __func__, err);
return ERR_PTR(err);
}
EXPORT_SYMBOL_GPL(rpc_clone_client);
}
printk(KERN_ERR "%s: status=%d, but no request slot, exiting\n",
- __FUNCTION__, status);
+ __func__, status);
rpc_exit(task, -EIO);
return;
}
*/
if (task->tk_rqstp) {
printk(KERN_ERR "%s: status=%d, request allocated anyway\n",
- __FUNCTION__, status);
+ __func__, status);
xprt_release(task);
}
break;
default:
printk(KERN_ERR "%s: unrecognized error %d, exiting\n",
- __FUNCTION__, status);
+ __func__, status);
break;
}
rpc_exit(task, status);
* undefined results
*/
dprintk("RPC: %5u %s: XDR representation not a multiple of"
- " 4 bytes: 0x%x\n", task->tk_pid, __FUNCTION__,
+ " 4 bytes: 0x%x\n", task->tk_pid, __func__,
task->tk_rqstp->rq_rcv_buf.len);
goto out_eio;
}
if ((n = ntohl(*p++)) != RPC_REPLY) {
dprintk("RPC: %5u %s: not an RPC reply: %x\n",
- task->tk_pid, __FUNCTION__, n);
+ task->tk_pid, __func__, n);
goto out_garbage;
}
if ((n = ntohl(*p++)) != RPC_MSG_ACCEPTED) {
case RPC_MISMATCH:
dprintk("RPC: %5u %s: RPC call version "
"mismatch!\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
error = -EPROTONOSUPPORT;
goto out_err;
default:
dprintk("RPC: %5u %s: RPC call rejected, "
"unknown error: %x\n",
- task->tk_pid, __FUNCTION__, n);
+ task->tk_pid, __func__, n);
goto out_eio;
}
if (--len < 0)
break;
task->tk_cred_retry--;
dprintk("RPC: %5u %s: retry stale creds\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
rpcauth_invalcred(task);
/* Ensure we obtain a new XID! */
xprt_release(task);
break;
task->tk_garb_retry--;
dprintk("RPC: %5u %s: retry garbled creds\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
task->tk_action = call_bind;
goto out_retry;
case RPC_AUTH_TOOWEAK:
break;
default:
dprintk("RPC: %5u %s: unknown auth error: %x\n",
- task->tk_pid, __FUNCTION__, n);
+ task->tk_pid, __func__, n);
error = -EIO;
}
dprintk("RPC: %5u %s: call rejected %d\n",
- task->tk_pid, __FUNCTION__, n);
+ task->tk_pid, __func__, n);
goto out_err;
}
if (!(p = rpcauth_checkverf(task, p))) {
dprintk("RPC: %5u %s: auth check failed\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
goto out_garbage; /* bad verifier, retry */
}
len = p - (__be32 *)iov->iov_base - 1;
return p;
case RPC_PROG_UNAVAIL:
dprintk("RPC: %5u %s: program %u is unsupported by server %s\n",
- task->tk_pid, __FUNCTION__,
+ task->tk_pid, __func__,
(unsigned int)task->tk_client->cl_prog,
task->tk_client->cl_server);
error = -EPFNOSUPPORT;
goto out_err;
case RPC_PROG_MISMATCH:
dprintk("RPC: %5u %s: program %u, version %u unsupported by "
- "server %s\n", task->tk_pid, __FUNCTION__,
+ "server %s\n", task->tk_pid, __func__,
(unsigned int)task->tk_client->cl_prog,
(unsigned int)task->tk_client->cl_vers,
task->tk_client->cl_server);
case RPC_PROC_UNAVAIL:
dprintk("RPC: %5u %s: proc %p unsupported by program %u, "
"version %u on server %s\n",
- task->tk_pid, __FUNCTION__,
+ task->tk_pid, __func__,
task->tk_msg.rpc_proc,
task->tk_client->cl_prog,
task->tk_client->cl_vers,
goto out_err;
case RPC_GARBAGE_ARGS:
dprintk("RPC: %5u %s: server saw garbage\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
break; /* retry */
default:
dprintk("RPC: %5u %s: server accept status: %x\n",
- task->tk_pid, __FUNCTION__, n);
+ task->tk_pid, __func__, n);
/* Also retry */
}
if (task->tk_garb_retry) {
task->tk_garb_retry--;
dprintk("RPC: %5u %s: retrying\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
task->tk_action = call_bind;
out_retry:
return ERR_PTR(-EAGAIN);
out_err:
rpc_exit(task, error);
dprintk("RPC: %5u %s: call failed with error %d\n", task->tk_pid,
- __FUNCTION__, error);
+ __func__, error);
return ERR_PTR(error);
out_overflow:
dprintk("RPC: %5u %s: server reply was truncated.\n", task->tk_pid,
- __FUNCTION__);
+ __func__);
goto out_garbage;
}
mnt = rpc_get_mount();
if (IS_ERR(mnt)) {
printk(KERN_WARNING "%s: %s failed to mount "
- "pseudofilesystem \n", __FILE__, __FUNCTION__);
+ "pseudofilesystem \n", __FILE__, __func__);
return PTR_ERR(mnt);
}
if (vfs_path_lookup(mnt->mnt_root, mnt, path, LOOKUP_PARENT, nd)) {
printk(KERN_WARNING "%s: %s failed to find path %s\n",
- __FILE__, __FUNCTION__, path);
+ __FILE__, __func__, path);
rpc_put_mount();
return -ENOENT;
}
out_bad:
mutex_unlock(&dir->i_mutex);
printk(KERN_WARNING "%s: %s failed to populate directory %s\n",
- __FILE__, __FUNCTION__, parent->d_name.name);
+ __FILE__, __func__, parent->d_name.name);
return -ENOMEM;
}
return 0;
out_err:
printk(KERN_WARNING "%s: %s failed to allocate inode for dentry %s\n",
- __FILE__, __FUNCTION__, dentry->d_name.name);
+ __FILE__, __func__, dentry->d_name.name);
return -ENOMEM;
}
err_dput:
dput(dentry);
printk(KERN_WARNING "%s: %s() failed to create directory %s (errno = %d)\n",
- __FILE__, __FUNCTION__, path, error);
+ __FILE__, __func__, path, error);
dentry = ERR_PTR(error);
goto out;
}
dput(dentry);
dentry = ERR_PTR(-ENOMEM);
printk(KERN_WARNING "%s: %s() failed to create pipe %s/%s (errno = %d)\n",
- __FILE__, __FUNCTION__, parent->d_name.name, name,
+ __FILE__, __func__, parent->d_name.name, name,
-ENOMEM);
goto out;
}
int status;
dprintk("RPC: %s(" NIPQUAD_FMT ", %u, %u, %d)\n",
- __FUNCTION__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot);
+ __func__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot);
rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin,
sizeof(*sin), prot, 2, 0);
struct rpcb_info *info;
dprintk("RPC: %5u %s(%s, %u, %u, %d)\n",
- task->tk_pid, __FUNCTION__,
+ task->tk_pid, __func__,
clnt->cl_server, clnt->cl_prog, clnt->cl_vers, xprt->prot);
/* Autobind on cloned rpc clients is discouraged */
if (xprt_test_and_set_binding(xprt)) {
status = -EAGAIN; /* tell caller to check again */
dprintk("RPC: %5u %s: waiting for another binder\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
goto bailout_nowake;
}
if (xprt_bound(xprt)) {
status = 0;
dprintk("RPC: %5u %s: already bound\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
goto bailout_nofree;
}
default:
status = -EAFNOSUPPORT;
dprintk("RPC: %5u %s: bad address family\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
goto bailout_nofree;
}
if (info[xprt->bind_index].rpc_proc == NULL) {
xprt->bind_index = 0;
status = -EPFNOSUPPORT;
dprintk("RPC: %5u %s: no more getport versions available\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
goto bailout_nofree;
}
bind_version = info[xprt->bind_index].rpc_vers;
dprintk("RPC: %5u %s: trying rpcbind version %u\n",
- task->tk_pid, __FUNCTION__, bind_version);
+ task->tk_pid, __func__, bind_version);
rpcb_clnt = rpcb_create(clnt->cl_server, sap, salen, xprt->prot,
bind_version, 0);
if (IS_ERR(rpcb_clnt)) {
status = PTR_ERR(rpcb_clnt);
dprintk("RPC: %5u %s: rpcb_create failed, error %ld\n",
- task->tk_pid, __FUNCTION__, PTR_ERR(rpcb_clnt));
+ task->tk_pid, __func__, PTR_ERR(rpcb_clnt));
goto bailout_nofree;
}
if (!map) {
status = -ENOMEM;
dprintk("RPC: %5u %s: no memory available\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
goto bailout_nofree;
}
map->r_prog = clnt->cl_prog;
if (IS_ERR(child)) {
status = -EIO;
dprintk("RPC: %5u %s: rpc_run_task failed\n",
- task->tk_pid, __FUNCTION__);
+ task->tk_pid, __func__);
goto bailout;
}
rpc_put_task(child);
nloop++;
} while (err == -EADDRINUSE && nloop != 2);
dprintk("RPC: %s "NIPQUAD_FMT":%u: %s (%d)\n",
- __FUNCTION__, NIPQUAD(myaddr.sin_addr),
+ __func__, NIPQUAD(myaddr.sin_addr),
port, err ? "failed" : "ok", err);
return err;
}
rc = proto_register(&unix_proto, 1);
if (rc != 0) {
printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n",
- __FUNCTION__);
+ __func__);
goto out;
}