[PATCH 5/7] Cleanup TX debugging

Eugene Krasnikov k.eugene.e at gmail.com
Thu May 16 08:54:50 EDT 2013


nice one.

2013/5/16 Kalle Valo <kvalo at qca.qualcomm.com>:
> Also simplify wcn36xx_tx() in the process.
>
> Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
> ---
>  dxe.c  |    3 +--
>  main.c |   28 ++++++++++++++++++++--------
>  2 files changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/dxe.c b/dxe.c
> index 0f90859..286b482 100644
> --- a/dxe.c
> +++ b/dxe.c
> @@ -397,12 +397,11 @@ int wcn36xx_dxe_tx(struct wcn36xx *wcn, struct sk_buff *skb, u8 broadcast, bool
>         struct wcn36xx_dxe_desc *cur_dxe_desc = NULL;
>         struct wcn36xx_dxe_mem_pool * mem_pool = NULL;
>         struct wcn36xx_dxe_ch * cur_ch = NULL;
> +
>         if(is_high) {
> -               wcn36xx_dbg(WCN36XX_DBG_TX, "DXE TX: MGMT");
>                 mem_pool = &wcn->mgmt_mem_pool;
>                 cur_ch = &wcn->dxe_tx_h_ch;
>         } else {
> -               wcn36xx_dbg(WCN36XX_DBG_TX, "DXE TX: DATA");
>                 mem_pool = &wcn->data_mem_pool;
>                 cur_ch = &wcn->dxe_tx_l_ch;
>         }
> diff --git a/main.c b/main.c
> index 6e4aace..f6f1942 100644
> --- a/main.c
> +++ b/main.c
> @@ -131,17 +131,29 @@ static void wcn36xx_configure_filter(struct ieee80211_hw *hw,
>         *total &= WCN36XX_SUPPORTED_FILTERS;
>  }
>
> -static void wcn36xx_tx(struct ieee80211_hw *hw,  struct ieee80211_tx_control *control, struct sk_buff *skb)
> +static void wcn36xx_tx(struct ieee80211_hw *hw,
> +                      struct ieee80211_tx_control *control,
> +                      struct sk_buff *skb)
>  {
>         struct ieee80211_mgmt *mgmt;
> -       ENTER();
> +       bool high, bcast;
> +
>         mgmt = (struct ieee80211_mgmt *)skb->data;
> -       wcn36xx_dbg(WCN36XX_DBG_TX, "wcn36xx_tx: = %x", mgmt->frame_control);
> -       if (ieee80211_is_data(mgmt->frame_control) || (ieee80211_is_data_qos(mgmt->frame_control))) {
> -               wcn36xx_dxe_tx(hw->priv, skb, is_broadcast_ether_addr(mgmt->da) || is_multicast_ether_addr(mgmt->da), false);
> -       } else {
> -               wcn36xx_dxe_tx(hw->priv, skb, is_broadcast_ether_addr(mgmt->da) || is_multicast_ether_addr(mgmt->da), true);
> -       }
> +
> +       high = !(ieee80211_is_data(mgmt->frame_control) ||
> +                ieee80211_is_data_qos(mgmt->frame_control));
> +
> +       bcast = is_broadcast_ether_addr(mgmt->da) ||
> +               is_multicast_ether_addr(mgmt->da);
> +
> +       wcn36xx_dbg(WCN36XX_DBG_TX,
> +                   "tx skb %p len %d fc %02x %s %s",
> +                   skb, skb->len, __le16_to_cpu(mgmt->frame_control),
> +                   high ? "high" : "low", bcast ? "bcast" : "ucast");
> +
> +       wcn36xx_dbg_dump(WCN36XX_DBG_TX_DUMP, "", skb->data, skb->len);
> +
> +       wcn36xx_dxe_tx(hw->priv, skb, bcast, high);
>  }
>
>  static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
>
>
> _______________________________________________
> wcn36xx mailing list
> wcn36xx at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx



-- 
Best regards,
Eugene



More information about the wcn36xx mailing list