From b2292cd2cbef6af4693328e44f282b6ac027caf7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 21 Apr 2017 13:21:43 -0600 Subject: [PATCH] Some trivial spacing changes from review of last PR; Remove some dangling whitespace at the end of lines. --- wireless/ieee802154/mac802154.c | 35 ++++++++++++-------------- wireless/ieee802154/mac802154_device.c | 2 +- wireless/ieee802154/mac802154_netdev.c | 32 +++++++++++------------ 3 files changed, 33 insertions(+), 36 deletions(-) diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c index 51658893c0..ca877d5442 100644 --- a/wireless/ieee802154/mac802154.c +++ b/wireless/ieee802154/mac802154.c @@ -58,7 +58,7 @@ /**************************************************************************** * Private Types ****************************************************************************/ - + struct mac802154_trans_s { /* Supports a singly linked list */ @@ -265,7 +265,7 @@ static int mac802154_poll_csma(FAR struct ieee802154_radiocb_s *radiocb, FAR struct ieee802154_txdesc_s *tx_desc, FAR uint8_t *buf); -static int mac802154_poll_gts(FAR struct ieee802154_radiocb_s *radiocb, +static int mac802154_poll_gts(FAR struct ieee802154_radiocb_s *radiocb, FAR struct ieee802154_txdesc_s *tx_desc, FAR uint8_t *buf); @@ -342,7 +342,7 @@ static int mac802154_applymib(FAR struct ieee802154_privmac_s *priv) * Called from the radio driver through the callback struct. This function is * called when the radio has room for another CSMA transaction. If the MAC * layer has a CSMA transaction, it copies it into the supplied buffer and - * returns the length. A descriptor is also populated with the transaction. + * returns the length. A descriptor is also populated with the transaction. * ****************************************************************************/ @@ -406,11 +406,11 @@ static int mac802154_poll_csma(FAR struct ieee802154_radiocb_s *radiocb, * Called from the radio driver through the callback struct. This function is * called when the radio has room for another GTS transaction. If the MAC * layer has a GTS transaction, it copies it into the supplied buffer and - * returns the length. A descriptor is also populated with the transaction. + * returns the length. A descriptor is also populated with the transaction. * ****************************************************************************/ -static int mac802154_poll_gts(FAR struct ieee802154_radiocb_s *radiocb, +static int mac802154_poll_gts(FAR struct ieee802154_radiocb_s *radiocb, FAR struct ieee802154_txdesc_s *tx_desc, FAR uint8_t *buf) { @@ -474,9 +474,9 @@ static int mac802154_txdone(FAR struct ieee802154_radiocb_s *radiocb, { mac802154_givesem(&priv->exclsem); - return -ENOMEM; + return -ENOMEM; } - + /* Copy the txdesc over and link it into our list */ memcpy(desc, tx_desc, sizeof(ieee802154_txdesc_s)); @@ -490,10 +490,10 @@ static int mac802154_txdone(FAR struct ieee802154_radiocb_s *radiocb, /* Schedule work with the work queue to process the completion further */ if (work_available(&priv->tx_work)) - { - work_queue(MAC802154_WORK, &priv->tx_work, mac802154_txdone_worker, - (FAR void *)dev, 0); - } + { + work_queue(MAC802154_WORK, &priv->tx_work, mac802154_txdone_worker, + (FAR void *)dev, 0); + } } /**************************************************************************** @@ -508,10 +508,8 @@ static int mac802154_txdone(FAR struct ieee802154_radiocb_s *radiocb, static void mac802154_txdone_worker(FAR void *arg) { - FAR struct ieee802154_privmanc_s *priv = + FAR struct ieee802154_privmanc_s *priv = (FAR struct ieee802154_privmanc_s *)arg; - - } /**************************************************************************** @@ -524,7 +522,7 @@ static void mac802154_txdone_worker(FAR void *arg) * descriptor is passed along with the iob, but it must be copied here as it * is allocated directly on the caller's stack. We simply link the frame, * copy the RX descriptor, and schedule a worker to process the frame later so - * that we do not hold up the radio. + * that we do not hold up the radio. * ****************************************************************************/ @@ -580,13 +578,12 @@ static void mac802154_rxframe_worker(FAR void *arg) { FAR struct ieee802154_privmac_s *priv = (FAR struct ieee802154_privmac_s *)arg; - + /* The radio layer is responsible for handling all ACKs and retries. If for - * some reason an ACK gets here, just throw it out */ - + * some reason an ACK gets here, just throw it out. + */ } - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/wireless/ieee802154/mac802154_device.c b/wireless/ieee802154/mac802154_device.c index 3b7dc49309..6370ff4762 100644 --- a/wireless/ieee802154/mac802154_device.c +++ b/wireless/ieee802154/mac802154_device.c @@ -461,7 +461,7 @@ static ssize_t mac802154dev_write(FAR struct file *filep, mac802154dev_givesem(&dev->md_exclsem); } - + /* Pass the request to the MAC layer */ ret = mac802154_req_data(dev->md_mac, req); diff --git a/wireless/ieee802154/mac802154_netdev.c b/wireless/ieee802154/mac802154_netdev.c index adc433aa65..18b2d6e1cd 100644 --- a/wireless/ieee802154/mac802154_netdev.c +++ b/wireless/ieee802154/mac802154_netdev.c @@ -181,36 +181,36 @@ static void macnet_conf_get(FAR struct macnet_driver_s *priv, static void macnet_conf_gts(FAR struct macnet_driver_s *priv, FAR struct ieee802154_gts_conf_s *conf); static void macnet_conf_reset(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_reset_conf_s *conf); + FAR struct ieee802154_reset_conf_s *conf); static void macnet_conf_rxenable(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_rxenable_conf_s *conf); + FAR struct ieee802154_rxenable_conf_s *conf); static void macnet_conf_scan(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_scan_conf_s *conf); + FAR struct ieee802154_scan_conf_s *conf); static void macnet_conf_set(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_set_conf_s *conf); + FAR struct ieee802154_set_conf_s *conf); static void macnet_conf_start(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_start_conf_s *conf); + FAR struct ieee802154_start_conf_s *conf); static void macnet_conf_poll(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_poll_conf_s *conf); + FAR struct ieee802154_poll_conf_s *conf); /* Asynchronous event indications, replied to synchronously with responses */ static void macnet_ind_data(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_data_ind_s *conf); + FAR struct ieee802154_data_ind_s *conf); static void macnet_ind_associate(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_assoc_ind_s *conf); + FAR struct ieee802154_assoc_ind_s *conf); static void macnet_ind_disassociate(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_disassoc_ind_s *conf); + FAR struct ieee802154_disassoc_ind_s *conf); static void macnet_ind_beaconnotify(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_beaconnotify_ind_s *conf); + FAR struct ieee802154_beaconnotify_ind_s *conf); static void macnet_ind_gts(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_gts_ind_s *conf); + FAR struct ieee802154_gts_ind_s *conf); static void macnet_ind_orphan(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_orphan_ind_s *conf); + FAR struct ieee802154_orphan_ind_s *conf); static void macnet_ind_commstatus(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_commstatus_ind_s *conf); + FAR struct ieee802154_commstatus_ind_s *conf); static void macnet_ind_syncloss(FAR struct macnet_driver_s *priv, - FAR struct ieee802154_syncloss_ind_s *conf); + FAR struct ieee802154_syncloss_ind_s *conf); /* Network interface support ************************************************/ /* Common TX logic */ @@ -1576,8 +1576,8 @@ int mac802154netdev_register(MACHANDLE mac) priv->md_cb.mc_priv = priv; maccb = &priv->md_cb.mc_cb; - maccb->mlme_notify = macdev_mlme_notify; - maccb->mcps_notify = macdev_mcps_notify; + maccb->mlme_notify = macdev_mlme_notify; + maccb->mcps_notify = macdev_mcps_notify; /* Bind the callback structure */