ieee802154: Cleans up some wireless logging

This commit is contained in:
Anthony Merlino 2017-07-01 17:04:02 -04:00
parent 29e028f7ac
commit 7d9c4ace34
4 changed files with 13 additions and 16 deletions

View File

@ -806,12 +806,12 @@ static void mrf24j40_dopoll_csma(FAR void *arg)
if (!dev->csma_busy) if (!dev->csma_busy)
{ {
wlinfo("polling for frame\n"); wlinfo("Polling for frame\n");
len = dev->radiocb->poll(dev->radiocb, false, &dev->csma_desc); len = dev->radiocb->poll(dev->radiocb, false, &dev->csma_desc);
if (len > 0) if (len > 0)
{ {
wlinfo("frame received. frame length: %d\n", len); wlinfo("Frame received. Frame length: %d\n", len);
/* Now the txdesc is in use */ /* Now the txdesc is in use */
@ -822,10 +822,6 @@ static void mrf24j40_dopoll_csma(FAR void *arg)
mrf24j40_norm_setup(dev, dev->csma_desc->frame, true); mrf24j40_norm_setup(dev, dev->csma_desc->frame, true);
mrf24j40_norm_trigger(dev); mrf24j40_norm_trigger(dev);
} }
else
{
wlinfo("no frames\n");
}
} }
sem_post(&dev->exclsem); sem_post(&dev->exclsem);
@ -1427,7 +1423,7 @@ static int mrf24j40_settxpower(FAR struct mrf24j40_radio_s *dev,
return -EINVAL; return -EINVAL;
} }
wlinfo("remaining attenuation: %d mBm\n",txpwr); wlinfo("Remaining attenuation: %d mBm\n",txpwr);
switch(txpwr/100) switch(txpwr/100)
{ {
@ -2141,6 +2137,7 @@ static void mrf24j40_irqworker(FAR void *arg)
if ((intstat & MRF24J40_INTSTAT_WAKEIF)) if ((intstat & MRF24J40_INTSTAT_WAKEIF))
{ {
wlinfo("Wake Interrupt\n");
/* This is right before the beacon, we set the bsn here, since the MAC /* This is right before the beacon, we set the bsn here, since the MAC
* uses the SLPIF (end of active portion of superframe). to make any * uses the SLPIF (end of active portion of superframe). to make any
* changes to the beacon. This assumes that any changes to the beacon * changes to the beacon. This assumes that any changes to the beacon

View File

@ -784,7 +784,7 @@ static void mac802154_txdone_worker(FAR void *arg)
notif =(FAR struct ieee802154_notif_s *)txdesc->conf; notif =(FAR struct ieee802154_notif_s *)txdesc->conf;
wlinfo("tx status: %s\n", IEEE802154_STATUS_STRING[txdesc->conf->status]); wlinfo("Tx status: %s\n", IEEE802154_STATUS_STRING[txdesc->conf->status]);
switch(txdesc->frametype) switch(txdesc->frametype)
{ {
@ -915,7 +915,7 @@ static void mac802154_rxframe(FAR const struct ieee802154_radiocb_s *radiocb,
sq_addlast((FAR sq_entry_t *)ind, &priv->dataind_queue); sq_addlast((FAR sq_entry_t *)ind, &priv->dataind_queue);
wlinfo("frame received\n"); wlinfo("Frame received\n");
mac802154_givesem(&priv->exclsem); mac802154_givesem(&priv->exclsem);
@ -2004,7 +2004,7 @@ static void mac802154_timeout_expiry(int argc, wdparm_t arg, ...)
DEBUGASSERT(priv->timeout_worker != NULL); DEBUGASSERT(priv->timeout_worker != NULL);
wlinfo("timer expired\n"); wlinfo("Timer expired\n");
work_queue(MAC802154_WORK, &priv->timeout_work, (worker_t)priv->timeout_worker, work_queue(MAC802154_WORK, &priv->timeout_work, (worker_t)priv->timeout_worker,
priv, 0); priv, 0);

View File

@ -527,7 +527,7 @@ void mac802154_txdone_assocreq(FAR struct ieee802154_privmac_s *priv,
* Interval = aBaseSuperframeDuration * 2^macBeaconOrder * Interval = aBaseSuperframeDuration * 2^macBeaconOrder
*/ */
wlinfo("starting timeout timer\n"); wlinfo("Starting timeout timer\n");
mac802154_timerstart(priv, (priv->resp_waittime * mac802154_timerstart(priv, (priv->resp_waittime *
(IEEE802154_BASE_SUPERFRAME_DURATION * (1 << priv->sfspec.beaconorder))), (IEEE802154_BASE_SUPERFRAME_DURATION * (1 << priv->sfspec.beaconorder))),
mac802154_assoctimeout); mac802154_assoctimeout);
@ -658,7 +658,7 @@ void mac802154_txdone_datareq_assoc(FAR struct ieee802154_privmac_s *priv,
* next highest layer of the failure. * next highest layer of the failure.
*/ */
wlinfo("starting timeout timer\n"); wlinfo("Starting timeout timer\n");
mac802154_timerstart(priv, priv->max_frame_waittime, mac802154_timerstart(priv, priv->max_frame_waittime,
mac802154_assoctimeout); mac802154_assoctimeout);
@ -774,7 +774,7 @@ void mac802154_rx_assocresp(FAR struct ieee802154_privmac_s *priv,
* to waste space holding our information? * to waste space holding our information?
*/ */
wlinfo("ignoring association response frame\n"); wlinfo("Ignoring association response frame\n");
return; return;
} }

View File

@ -615,7 +615,7 @@ static inline int mac802154_timercancel(FAR struct ieee802154_privmac_s *priv)
{ {
wd_cancel(priv->timeout); wd_cancel(priv->timeout);
priv->timeout_worker = NULL; priv->timeout_worker = NULL;
wlinfo("timer cancelled\n"); wlinfo("Timer cancelled\n");
return OK; return OK;
} }
@ -627,7 +627,7 @@ static inline void mac802154_rxenable(FAR struct ieee802154_privmac_s *priv)
if (priv->nrxusers == 1) if (priv->nrxusers == 1)
{ {
wlinfo("receiver enabled\n"); wlinfo("Receiver enabled\n");
priv->radio->rxenable(priv->radio, true); priv->radio->rxenable(priv->radio, true);
} }
} }
@ -640,7 +640,7 @@ static inline void mac802154_rxdisable(FAR struct ieee802154_privmac_s *priv)
if (priv->nrxusers == 0) if (priv->nrxusers == 0)
{ {
wlinfo("receiver disabled\n"); wlinfo("Receiver disabled\n");
priv->radio->rxenable(priv->radio, true); priv->radio->rxenable(priv->radio, true);
priv->radio->rxenable(priv->radio, false); priv->radio->rxenable(priv->radio, false);
} }