[PATCH 1/7] Remove ENTER() macro

YanBo dreamfly281 at gmail.com
Mon May 20 11:51:08 EDT 2013


Hmm, I love this function at this moment :)
it do help a lot tell me fill the suitable function which called by
upper layer, maybe we can remove them later, cause them are not in the
data path so will not effect the performance at the point, or use some
macro like "TRACE_FUCNTION" to enable or disable it
BR /Yanbo

On Mon, May 20, 2013 at 6:53 PM, Kalle Valo <kvalo at qca.qualcomm.com> wrote:
> It spams the log way too much and no way to disable it.
> Better to add proper debug messages instead.
>
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
> ---
>  dxe.c     |    5 -----
>  main.c    |   31 +++++--------------------------
>  wcn36xx.h |    2 --
>  3 files changed, 5 insertions(+), 33 deletions(-)
>
> diff --git a/dxe.c b/dxe.c
> index 2a09cbb..8d798f2 100644
> --- a/dxe.c
> +++ b/dxe.c
> @@ -95,7 +95,6 @@ static int wcn36xx_dxe_allocate_ctl_block(struct wcn36xx_dxe_ch *ch)
>  int wcn36xx_dxe_alloc_ctl_blks(struct wcn36xx *wcn)
>  {
>         int ret = 0;
> -       ENTER();
>
>         wcn->dxe_tx_l_ch.ch_type = WCN36XX_DXE_CH_TX_L;
>         wcn->dxe_tx_h_ch.ch_type = WCN36XX_DXE_CH_TX_H;
> @@ -231,8 +230,6 @@ static int wcn36xx_dxe_ch_alloc_skb(struct wcn36xx *wcn, struct wcn36xx_dxe_ch *
>
>  static irqreturn_t wcn36xx_irq_tx_complete(int irq, void *dev)
>  {
> -       ENTER();
> -
>         return IRQ_HANDLED;
>  }
>
> @@ -247,7 +244,6 @@ static int wcn36xx_dxe_request_irqs(struct wcn36xx *wcn)
>  {
>         int ret;
>
> -       ENTER();
>         // Register TX complete irq
>         ret =request_irq(wcn->tx_irq, wcn36xx_irq_tx_complete, IRQF_TRIGGER_HIGH,
>                             "wcn36xx_tx", wcn);
> @@ -368,7 +364,6 @@ void wcn36xx_rx_ready_work(struct work_struct *work)
>  }
>  int wcn36xx_dxe_allocate_mem_pools(struct wcn36xx *wcn)
>  {
> -       ENTER();
>         /* Allocate BD headers for MGMT frames */
>
>         // Where this come from ask QC
> diff --git a/main.c b/main.c
> index f6f1942..4de9e49 100644
> --- a/main.c
> +++ b/main.c
> @@ -39,8 +39,6 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
>         struct wcn36xx *wcn = hw->priv;
>         int ret;
>
> -       ENTER();
> -
>         // SMD initialization
>         ret = wcn36xx_smd_open(wcn);
>         if (ret) {
> @@ -78,8 +76,6 @@ static void wcn36xx_stop(struct ieee80211_hw *hw)
>  {
>         struct wcn36xx *wcn = hw->priv;
>
> -       ENTER();
> -
>         wcn36xx_dxe_deinit(wcn);
>         wcn36xx_smd_close(wcn);
>
> @@ -89,20 +85,18 @@ static void wcn36xx_stop(struct ieee80211_hw *hw)
>  static void wcn36xx_remove_interface(struct ieee80211_hw *hw,
>                                    struct ieee80211_vif *vif)
>  {
> -       ENTER();
>  }
>
>  static int wcn36xx_change_interface(struct ieee80211_hw *hw,
>                                       struct ieee80211_vif *vif,
>                                       enum nl80211_iftype new_type, bool p2p)
>  {
> -       ENTER();
>         return 0;
>  }
>  static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
>  {
>         struct wcn36xx *wcn = hw->priv;
> -       ENTER();
> +
>         if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
>                 wcn->ch = ieee80211_frequency_to_channel(hw->conf.chandef.chan->center_freq);
>                 wcn36xx_info("wcn36xx_config channel switch=%d", wcn->ch);
> @@ -113,7 +107,6 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
>  static u64 wcn36xx_prepare_multicast(struct ieee80211_hw *hw,
>                                        struct netdev_hw_addr_list *mc_list)
>  {
> -       ENTER();
>         return 0;
>  }
>  #define WCN36XX_SUPPORTED_FILTERS (FIF_PROMISC_IN_BSS | \
> @@ -126,7 +119,6 @@ static void wcn36xx_configure_filter(struct ieee80211_hw *hw,
>                                        unsigned int changed,
>                                        unsigned int *total, u64 multicast)
>  {
> -       ENTER();
>         changed &= WCN36XX_SUPPORTED_FILTERS;
>         *total &= WCN36XX_SUPPORTED_FILTERS;
>  }
> @@ -161,7 +153,6 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
>                              struct ieee80211_sta *sta,
>                              struct ieee80211_key_conf *key_conf)
>  {
> -       ENTER();
>         return 0;
>  }
>  static int wcn36xx_hw_scan(struct ieee80211_hw *hw,
> @@ -174,7 +165,7 @@ static int wcn36xx_hw_scan(struct ieee80211_hw *hw,
>
>         int ch;
>         int i;
> -       ENTER();
> +
>         wcn36xx_smd_update_scan_params(wcn);
>         if (req->n_ssids > 0) {
>                 prb_req = ieee80211_probereq_get(hw, vif, req->ssids[0].ssid, req->ssids[0].ssid_len, req->ie_len);
> @@ -209,8 +200,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
>         struct sk_buff *skb = NULL;
>         u16 tim_off, tim_len;
>
> -       ENTER();
> -
>         if(changed & BSS_CHANGED_BSSID) {
>                 wcn36xx_info("wcn36xx_bss_info_changed BSS_CHANGED_BSSID=%pM", bss_conf->bssid);
>                 if(!is_zero_ether_addr(bss_conf->bssid)) {
> @@ -230,19 +219,16 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
>  }
>  static int wcn36xx_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
>  {
> -       ENTER();
>         return 0;
>  }
>  static int wcn36xx_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
>  {
> -       ENTER();
>         return 0;
>  }
>
>  static int wcn36xx_get_survey(struct ieee80211_hw *hw, int idx,
>                                 struct survey_info *survey)
>  {
> -       ENTER();
>         return 0;
>  }
>
> @@ -252,42 +238,35 @@ static int wcn36xx_ampdu_action(struct ieee80211_hw *hw,
>                                   struct ieee80211_sta *sta, u16 tid, u16 *ssn,
>                                   u8 buf_size)
>  {
> -       ENTER();
>         return 0;
>  }
>  static bool wcn36xx_tx_frames_pending(struct ieee80211_hw *hw)
>  {
> -       ENTER();
>         return true;
>  }
>  static int wcn36xx_set_bitrate_mask(struct ieee80211_hw *hw,
>                                    struct ieee80211_vif *vif,
>                                    const struct cfg80211_bitrate_mask *mask)
>  {
> -       ENTER();
>         return 0;
>  }
>  static void wcn36xx_channel_switch(struct ieee80211_hw *hw,
>                                      struct ieee80211_channel_switch *ch_switch)
>  {
> -       ENTER();
>  }
>  static int wcn36xx_suspend(struct ieee80211_hw *hw,
>                             struct cfg80211_wowlan *wow)
>  {
> -       ENTER();
>         return 0;
>  }
>  static int wcn36xx_resume(struct ieee80211_hw *hw)
>  {
> -       ENTER();
>         return 0;
>  }
>  static int wcn36xx_add_interface(struct ieee80211_hw *hw,
>                                    struct ieee80211_vif *vif)
>  {
>         struct wcn36xx *wcn = hw->priv;
> -       ENTER();
>
>         if(vif) {
>                 switch (vif->type) {
> @@ -312,7 +291,7 @@ static int wcn36xx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>                        struct ieee80211_sta *sta)
>  {
>         struct wcn36xx *wcn = hw->priv;
> -       ENTER();
> +
>         wcn36xx_smd_set_link_st(wcn, sta->addr, vif->addr, WCN36XX_HAL_LINK_POSTASSOC_STATE);
>         wcn36xx_smd_config_sta(wcn, sta->addr, sta->aid, vif->addr);
>         wcn36xx_smd_config_bss(wcn, true, sta->addr, 1);
> @@ -322,7 +301,7 @@ static int wcn36xx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif
>                           struct ieee80211_sta *sta)
>  {
>         struct wcn36xx *wcn = hw->priv;
> -       ENTER();
> +
>         wcn36xx_smd_delete_sta(wcn);
>         wcn36xx_smd_delete_bss(wcn);
>         wcn36xx_smd_set_link_st(wcn, sta->addr, vif->addr, WCN36XX_HAL_LINK_IDLE_STATE);
> @@ -360,7 +339,7 @@ static const struct ieee80211_ops wcn36xx_ops = {
>  static struct ieee80211_hw *wcn36xx_alloc_hw(void)
>  {
>         struct ieee80211_hw *hw;
> -       ENTER();
> +
>         hw = ieee80211_alloc_hw(sizeof(struct wcn36xx), &wcn36xx_ops);
>         return hw;
>  }
> diff --git a/wcn36xx.h b/wcn36xx.h
> index ce7272b..447c7d5 100644
> --- a/wcn36xx.h
> +++ b/wcn36xx.h
> @@ -68,8 +68,6 @@ enum wcn36xx_debug_mask {
>                                buf, len, false);
>
>
> -#define ENTER() pr_info(DRIVER_PREFIX "%s\n", __func__)
> -
>  static inline void buff_to_be(u32 *buf, size_t len)
>  {
>         int i;
>
>
> _______________________________________________
> wcn36xx mailing list
> wcn36xx at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx



More information about the wcn36xx mailing list