|
@@ -81,7 +81,7 @@ static int __nci_request(struct nci_dev *ndev,
|
|
&ndev->req_completion,
|
|
&ndev->req_completion,
|
|
timeout);
|
|
timeout);
|
|
|
|
|
|
- nfc_dbg("wait_for_completion return %ld", completion_rc);
|
|
|
|
|
|
+ pr_debug("wait_for_completion return %ld\n", completion_rc);
|
|
|
|
|
|
if (completion_rc > 0) {
|
|
if (completion_rc > 0) {
|
|
switch (ndev->req_status) {
|
|
switch (ndev->req_status) {
|
|
@@ -325,7 +325,7 @@ static void nci_cmd_timer(unsigned long arg)
|
|
{
|
|
{
|
|
struct nci_dev *ndev = (void *) arg;
|
|
struct nci_dev *ndev = (void *) arg;
|
|
|
|
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
atomic_set(&ndev->cmd_cnt, 1);
|
|
atomic_set(&ndev->cmd_cnt, 1);
|
|
queue_work(ndev->cmd_wq, &ndev->cmd_work);
|
|
queue_work(ndev->cmd_wq, &ndev->cmd_work);
|
|
@@ -335,7 +335,7 @@ static int nci_dev_up(struct nfc_dev *nfc_dev)
|
|
{
|
|
{
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
|
|
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
return nci_open_device(ndev);
|
|
return nci_open_device(ndev);
|
|
}
|
|
}
|
|
@@ -344,7 +344,7 @@ static int nci_dev_down(struct nfc_dev *nfc_dev)
|
|
{
|
|
{
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
|
|
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
return nci_close_device(ndev);
|
|
return nci_close_device(ndev);
|
|
}
|
|
}
|
|
@@ -354,7 +354,7 @@ static int nci_start_poll(struct nfc_dev *nfc_dev, __u32 protocols)
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
if (test_bit(NCI_DISCOVERY, &ndev->flags)) {
|
|
if (test_bit(NCI_DISCOVERY, &ndev->flags)) {
|
|
pr_err("unable to start poll, since poll is already active\n");
|
|
pr_err("unable to start poll, since poll is already active\n");
|
|
@@ -367,7 +367,7 @@ static int nci_start_poll(struct nfc_dev *nfc_dev, __u32 protocols)
|
|
}
|
|
}
|
|
|
|
|
|
if (test_bit(NCI_POLL_ACTIVE, &ndev->flags)) {
|
|
if (test_bit(NCI_POLL_ACTIVE, &ndev->flags)) {
|
|
- nfc_dbg("target is active, implicitly deactivate...");
|
|
|
|
|
|
+ pr_debug("target is active, implicitly deactivate...\n");
|
|
|
|
|
|
rc = nci_request(ndev, nci_rf_deactivate_req, 0,
|
|
rc = nci_request(ndev, nci_rf_deactivate_req, 0,
|
|
msecs_to_jiffies(NCI_RF_DEACTIVATE_TIMEOUT));
|
|
msecs_to_jiffies(NCI_RF_DEACTIVATE_TIMEOUT));
|
|
@@ -388,7 +388,7 @@ static void nci_stop_poll(struct nfc_dev *nfc_dev)
|
|
{
|
|
{
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
|
|
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
if (!test_bit(NCI_DISCOVERY, &ndev->flags)) {
|
|
if (!test_bit(NCI_DISCOVERY, &ndev->flags)) {
|
|
pr_err("unable to stop poll, since poll is not active\n");
|
|
pr_err("unable to stop poll, since poll is not active\n");
|
|
@@ -404,7 +404,7 @@ static int nci_activate_target(struct nfc_dev *nfc_dev, __u32 target_idx,
|
|
{
|
|
{
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
|
|
|
|
- nfc_dbg("entry, target_idx %d, protocol 0x%x", target_idx, protocol);
|
|
|
|
|
|
+ pr_debug("entry, target_idx %d, protocol 0x%x\n", target_idx, protocol);
|
|
|
|
|
|
if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) {
|
|
if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) {
|
|
pr_err("there is no available target to activate\n");
|
|
pr_err("there is no available target to activate\n");
|
|
@@ -432,7 +432,7 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, __u32 target_idx)
|
|
{
|
|
{
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
|
|
|
|
- nfc_dbg("entry, target_idx %d", target_idx);
|
|
|
|
|
|
+ pr_debug("entry, target_idx %d\n", target_idx);
|
|
|
|
|
|
if (!ndev->target_active_prot) {
|
|
if (!ndev->target_active_prot) {
|
|
pr_err("unable to deactivate target, no active target\n");
|
|
pr_err("unable to deactivate target, no active target\n");
|
|
@@ -455,7 +455,7 @@ static int nci_data_exchange(struct nfc_dev *nfc_dev, __u32 target_idx,
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
- nfc_dbg("entry, target_idx %d, len %d", target_idx, skb->len);
|
|
|
|
|
|
+ pr_debug("entry, target_idx %d, len %d\n", target_idx, skb->len);
|
|
|
|
|
|
if (!ndev->target_active_prot) {
|
|
if (!ndev->target_active_prot) {
|
|
pr_err("unable to exchange data, no active target\n");
|
|
pr_err("unable to exchange data, no active target\n");
|
|
@@ -501,7 +501,7 @@ struct nci_dev *nci_allocate_device(struct nci_ops *ops,
|
|
{
|
|
{
|
|
struct nci_dev *ndev;
|
|
struct nci_dev *ndev;
|
|
|
|
|
|
- nfc_dbg("entry, supported_protocols 0x%x", supported_protocols);
|
|
|
|
|
|
+ pr_debug("entry, supported_protocols 0x%x\n", supported_protocols);
|
|
|
|
|
|
if (!ops->open || !ops->close || !ops->send)
|
|
if (!ops->open || !ops->close || !ops->send)
|
|
return NULL;
|
|
return NULL;
|
|
@@ -541,7 +541,7 @@ EXPORT_SYMBOL(nci_allocate_device);
|
|
*/
|
|
*/
|
|
void nci_free_device(struct nci_dev *ndev)
|
|
void nci_free_device(struct nci_dev *ndev)
|
|
{
|
|
{
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
nfc_free_device(ndev->nfc_dev);
|
|
nfc_free_device(ndev->nfc_dev);
|
|
kfree(ndev);
|
|
kfree(ndev);
|
|
@@ -559,7 +559,7 @@ int nci_register_device(struct nci_dev *ndev)
|
|
struct device *dev = &ndev->nfc_dev->dev;
|
|
struct device *dev = &ndev->nfc_dev->dev;
|
|
char name[32];
|
|
char name[32];
|
|
|
|
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
rc = nfc_register_device(ndev->nfc_dev);
|
|
rc = nfc_register_device(ndev->nfc_dev);
|
|
if (rc)
|
|
if (rc)
|
|
@@ -623,7 +623,7 @@ EXPORT_SYMBOL(nci_register_device);
|
|
*/
|
|
*/
|
|
void nci_unregister_device(struct nci_dev *ndev)
|
|
void nci_unregister_device(struct nci_dev *ndev)
|
|
{
|
|
{
|
|
- nfc_dbg("entry");
|
|
|
|
|
|
+ pr_debug("entry\n");
|
|
|
|
|
|
nci_close_device(ndev);
|
|
nci_close_device(ndev);
|
|
|
|
|
|
@@ -644,7 +644,7 @@ int nci_recv_frame(struct sk_buff *skb)
|
|
{
|
|
{
|
|
struct nci_dev *ndev = (struct nci_dev *) skb->dev;
|
|
struct nci_dev *ndev = (struct nci_dev *) skb->dev;
|
|
|
|
|
|
- nfc_dbg("entry, len %d", skb->len);
|
|
|
|
|
|
+ pr_debug("entry, len %d\n", skb->len);
|
|
|
|
|
|
if (!ndev || (!test_bit(NCI_UP, &ndev->flags)
|
|
if (!ndev || (!test_bit(NCI_UP, &ndev->flags)
|
|
&& !test_bit(NCI_INIT, &ndev->flags))) {
|
|
&& !test_bit(NCI_INIT, &ndev->flags))) {
|
|
@@ -664,7 +664,7 @@ static int nci_send_frame(struct sk_buff *skb)
|
|
{
|
|
{
|
|
struct nci_dev *ndev = (struct nci_dev *) skb->dev;
|
|
struct nci_dev *ndev = (struct nci_dev *) skb->dev;
|
|
|
|
|
|
- nfc_dbg("entry, len %d", skb->len);
|
|
|
|
|
|
+ pr_debug("entry, len %d\n", skb->len);
|
|
|
|
|
|
if (!ndev) {
|
|
if (!ndev) {
|
|
kfree_skb(skb);
|
|
kfree_skb(skb);
|
|
@@ -683,7 +683,7 @@ int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, void *payload)
|
|
struct nci_ctrl_hdr *hdr;
|
|
struct nci_ctrl_hdr *hdr;
|
|
struct sk_buff *skb;
|
|
struct sk_buff *skb;
|
|
|
|
|
|
- nfc_dbg("entry, opcode 0x%x, plen %d", opcode, plen);
|
|
|
|
|
|
+ pr_debug("entry, opcode 0x%x, plen %d\n", opcode, plen);
|
|
|
|
|
|
skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL);
|
|
skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL);
|
|
if (!skb) {
|
|
if (!skb) {
|
|
@@ -717,7 +717,7 @@ static void nci_tx_work(struct work_struct *work)
|
|
struct nci_dev *ndev = container_of(work, struct nci_dev, tx_work);
|
|
struct nci_dev *ndev = container_of(work, struct nci_dev, tx_work);
|
|
struct sk_buff *skb;
|
|
struct sk_buff *skb;
|
|
|
|
|
|
- nfc_dbg("entry, credits_cnt %d", atomic_read(&ndev->credits_cnt));
|
|
|
|
|
|
+ pr_debug("entry, credits_cnt %d\n", atomic_read(&ndev->credits_cnt));
|
|
|
|
|
|
/* Send queued tx data */
|
|
/* Send queued tx data */
|
|
while (atomic_read(&ndev->credits_cnt)) {
|
|
while (atomic_read(&ndev->credits_cnt)) {
|
|
@@ -730,10 +730,10 @@ static void nci_tx_work(struct work_struct *work)
|
|
NCI_DATA_FLOW_CONTROL_NOT_USED)
|
|
NCI_DATA_FLOW_CONTROL_NOT_USED)
|
|
atomic_dec(&ndev->credits_cnt);
|
|
atomic_dec(&ndev->credits_cnt);
|
|
|
|
|
|
- nfc_dbg("NCI TX: MT=data, PBF=%d, conn_id=%d, plen=%d",
|
|
|
|
- nci_pbf(skb->data),
|
|
|
|
- nci_conn_id(skb->data),
|
|
|
|
- nci_plen(skb->data));
|
|
|
|
|
|
+ pr_debug("NCI TX: MT=data, PBF=%d, conn_id=%d, plen=%d\n",
|
|
|
|
+ nci_pbf(skb->data),
|
|
|
|
+ nci_conn_id(skb->data),
|
|
|
|
+ nci_plen(skb->data));
|
|
|
|
|
|
nci_send_frame(skb);
|
|
nci_send_frame(skb);
|
|
}
|
|
}
|
|
@@ -776,7 +776,7 @@ static void nci_cmd_work(struct work_struct *work)
|
|
struct nci_dev *ndev = container_of(work, struct nci_dev, cmd_work);
|
|
struct nci_dev *ndev = container_of(work, struct nci_dev, cmd_work);
|
|
struct sk_buff *skb;
|
|
struct sk_buff *skb;
|
|
|
|
|
|
- nfc_dbg("entry, cmd_cnt %d", atomic_read(&ndev->cmd_cnt));
|
|
|
|
|
|
+ pr_debug("entry, cmd_cnt %d\n", atomic_read(&ndev->cmd_cnt));
|
|
|
|
|
|
/* Send queued command */
|
|
/* Send queued command */
|
|
if (atomic_read(&ndev->cmd_cnt)) {
|
|
if (atomic_read(&ndev->cmd_cnt)) {
|
|
@@ -786,11 +786,11 @@ static void nci_cmd_work(struct work_struct *work)
|
|
|
|
|
|
atomic_dec(&ndev->cmd_cnt);
|
|
atomic_dec(&ndev->cmd_cnt);
|
|
|
|
|
|
- nfc_dbg("NCI TX: MT=cmd, PBF=%d, GID=0x%x, OID=0x%x, plen=%d",
|
|
|
|
- nci_pbf(skb->data),
|
|
|
|
- nci_opcode_gid(nci_opcode(skb->data)),
|
|
|
|
- nci_opcode_oid(nci_opcode(skb->data)),
|
|
|
|
- nci_plen(skb->data));
|
|
|
|
|
|
+ pr_debug("NCI TX: MT=cmd, PBF=%d, GID=0x%x, OID=0x%x, plen=%d\n",
|
|
|
|
+ nci_pbf(skb->data),
|
|
|
|
+ nci_opcode_gid(nci_opcode(skb->data)),
|
|
|
|
+ nci_opcode_oid(nci_opcode(skb->data)),
|
|
|
|
+ nci_plen(skb->data));
|
|
|
|
|
|
nci_send_frame(skb);
|
|
nci_send_frame(skb);
|
|
|
|
|