From: Joe Perches Date: Sun, 3 Aug 2014 22:57:26 +0000 (-0700) Subject: staging: rtl8192ee: Fix RT_TRACE #define and uses X-Git-Tag: fixes-for-v3.18-merge-window~15^2~1361 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb418e57d5d65ac8f46b635ff9bce08377826d18;p=pandora-kernel.git staging: rtl8192ee: Fix RT_TRACE #define and uses RT_TRACE uses require unnecessary parentheses. Fix the #define and remove the uses. Neaten the RT_TRACE lines and multi-line argument wrapping. dynamic debug can add KBUILD_MODNAME and __func__ so remove those from the #define. Use a single statement pr_debug instead of pr_debug and pr_cont which doesn't support dynamic debug anyway. Miscellaneous grammar and spelling fixes on the RT_TRACE uses. Compile tested only. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192ee/base.c b/drivers/staging/rtl8192ee/base.c index f7c3c8bf71a5..2f0fea5010f3 100644 --- a/drivers/staging/rtl8192ee/base.c +++ b/drivers/staging/rtl8192ee/base.c @@ -206,7 +206,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, *highest supported RX rate */ if (rtlpriv->dm.supp_phymode_switch) { - RT_TRACE(COMP_INIT, DBG_EMERG, ("Support phy mode switch\n")); + RT_TRACE(COMP_INIT, DBG_EMERG, "Support phy mode switch\n"); ht_cap->mcs.rx_mask[0] = 0xFF; ht_cap->mcs.rx_mask[1] = 0xFF; @@ -216,7 +216,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, } else { if (get_rf_type(rtlphy) == RF_1T2R || get_rf_type(rtlphy) == RF_2T2R) { - RT_TRACE(COMP_INIT, DBG_DMESG, ("1T2R or 2T2R\n")); + RT_TRACE(COMP_INIT, DBG_DMESG, "1T2R or 2T2R\n"); ht_cap->mcs.rx_mask[0] = 0xFF; ht_cap->mcs.rx_mask[1] = 0xFF; @@ -224,7 +224,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15); } else if (get_rf_type(rtlphy) == RF_1T1R) { - RT_TRACE(COMP_INIT, DBG_DMESG, ("1T1R\n")); + RT_TRACE(COMP_INIT, DBG_DMESG, "1T1R\n"); ht_cap->mcs.rx_mask[0] = 0xFF; ht_cap->mcs.rx_mask[1] = 0x00; @@ -388,7 +388,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; } else { RT_TRACE(COMP_INIT, DBG_EMERG, - ("Err BAND %d\n", rtlhal->current_bandtype)); + "Err BAND %d\n", rtlhal->current_bandtype); } } /* <5> set hw caps */ @@ -556,7 +556,7 @@ int rtl92e_init_core(struct ieee80211_hw *hw) * mac80211 hw in _rtl_init_mac80211. */ if (rtl92e_regd_init(hw, rtl92e_reg_notifier)) { - RT_TRACE(COMP_ERR, DBG_EMERG, ("REGD init failed\n")); + RT_TRACE(COMP_ERR, DBG_EMERG, "REGD init failed\n"); return 1; } @@ -952,7 +952,7 @@ bool rtl92e_tx_mgmt_proc(struct ieee80211_hw *hw, struct sk_buff *skb) rtlpriv->cfg->ops->check_switch_to_dmdp(hw); } if (ieee80211_is_auth(fc)) { - RT_TRACE(COMP_SEND, DBG_DMESG, ("MAC80211_LINKING\n")); + RT_TRACE(COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n"); rtl92e_ips_nic_on(hw); mac->link_state = MAC80211_LINKING; @@ -987,8 +987,8 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) return false; RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, - ("%s ACT_ADDBAREQ From:%pM\n", - is_tx ? "Tx" : "Rx", hdr->addr2)); + "%s ACT_ADDBAREQ From:%pM\n", + is_tx ? "Tx" : "Rx", hdr->addr2); RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "req\n", skb->data, skb->len); if (!is_tx) { @@ -1004,7 +1004,7 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) sta = rtl_find_sta(hw, hdr->addr3); if (sta == NULL) { RT_TRACE((COMP_SEND | COMP_RECV), - DBG_TRACE, ("sta is NULL\n")); + DBG_TRACE, "sta is NULL\n"); rcu_read_unlock(); return true; } @@ -1047,12 +1047,12 @@ bool rtl92e_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) break; case ACT_ADDBARSP: RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, - ("%s ACT_ADDBARSP From :%pM\n", - is_tx ? "Tx" : "Rx", hdr->addr2)); + "%s ACT_ADDBARSP From :%pM\n", + is_tx ? "Tx" : "Rx", hdr->addr2); break; case ACT_DELBA: RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, - ("ACT_ADDBADEL From :%pM\n", hdr->addr2)); + "ACT_ADDBADEL From :%pM\n", hdr->addr2); break; } break; @@ -1094,9 +1094,8 @@ u8 rtl92e_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, * 68 : UDP BOOTP client * 67 : UDP BOOTP server */ - RT_TRACE((COMP_SEND | COMP_RECV), - DBG_DMESG, ("dhcp %s !!\n", - (is_tx) ? "Tx" : "Rx")); + RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, + "dhcp %s !!\n", is_tx ? "Tx" : "Rx"); if (is_tx) { rtlpriv->ra.is_special_data = true; @@ -1124,7 +1123,7 @@ u8 rtl92e_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, return true; } else if (ETH_P_PAE == ether_type) { RT_TRACE((COMP_SEND | COMP_RECV), DBG_DMESG, - ("802.1X %s EAPOL pkt!!\n", (is_tx) ? "Tx" : "Rx")); + "802.1X %s EAPOL pkt!!\n", is_tx ? "Tx" : "Rx"); if (is_tx) { rtlpriv->ra.is_special_data = true; @@ -1165,9 +1164,8 @@ int rtl92e_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif, return -ENXIO; tid_data = &sta_entry->tids[tid]; - RT_TRACE(COMP_SEND, DBG_DMESG, - ("on ra = %pM tid = %d seq:%d\n", sta->addr, tid, - tid_data->seq_number)); + RT_TRACE(COMP_SEND, DBG_DMESG, "on ra = %pM tid = %d seq:%d\n", + sta->addr, tid, tid_data->seq_number); *ssn = tid_data->seq_number; tid_data->agg.agg_state = RTL_AGG_START; @@ -1188,12 +1186,12 @@ int rtl92e_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif, /* Comparing an array to null is not useful */ /*if (!sta->addr) { - RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n")); + RT_TRACE(COMP_ERR, DBG_EMERG, "ra = NULL\n"); return -EINVAL; }*/ - RT_TRACE(COMP_SEND, DBG_DMESG, - ("on ra = %pM tid = %d\n", sta->addr, tid)); + RT_TRACE(COMP_SEND, DBG_DMESG, "on ra = %pM tid = %d\n", + sta->addr, tid); if (unlikely(tid >= MAX_TID_COUNT)) return -EINVAL; @@ -1224,9 +1222,8 @@ int rtl92e_rx_agg_start(struct ieee80211_hw *hw, return -ENXIO; tid_data = &sta_entry->tids[tid]; - RT_TRACE(COMP_RECV, DBG_DMESG, - ("on ra = %pM tid = %d seq:%d\n", sta->addr, tid, - tid_data->seq_number)); + RT_TRACE(COMP_RECV, DBG_DMESG, "on ra = %pM tid = %d seq:%d\n", + sta->addr, tid, tid_data->seq_number); tid_data->agg.rx_agg_state = RTL_RX_AGG_START; return 0; @@ -1244,12 +1241,12 @@ int rtl92e_rx_agg_stop(struct ieee80211_hw *hw, /* Comparing an array to null is not useful */ /*if (!sta->addr) { - RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n")); + RT_TRACE(COMP_ERR, DBG_EMERG, "ra = NULL\n"); return -EINVAL; }*/ - RT_TRACE(COMP_SEND, DBG_DMESG, - ("on ra = %pM tid = %d\n", sta->addr, tid)); + RT_TRACE(COMP_SEND, DBG_DMESG, "on ra = %pM tid = %d\n", + sta->addr, tid); if (unlikely(tid >= MAX_TID_COUNT)) return -EINVAL; @@ -1273,12 +1270,12 @@ int rtl92e_tx_agg_oper(struct ieee80211_hw *hw, /* Comparing an array to null is not useful */ /*if (!sta->addr) { - RT_TRACE(COMP_ERR, DBG_EMERG, ("ra = NULL\n")); + RT_TRACE(COMP_ERR, DBG_EMERG, "ra = NULL\n"); return -EINVAL; }*/ - RT_TRACE(COMP_SEND, DBG_DMESG, - ("on ra = %pM tid = %d\n", sta->addr, tid)); + RT_TRACE(COMP_SEND, DBG_DMESG, "on ra = %pM tid = %d\n", + sta->addr, tid); if (unlikely(tid >= MAX_TID_COUNT)) return -EINVAL; @@ -1454,15 +1451,14 @@ void rtl92e_watchdog_wq_callback(void *data) if ((rtlpriv->link_info.bcn_rx_inperiod + rtlpriv->link_info.num_rx_inperiod) == 0) { rtlpriv->link_info.roam_times++; - RT_TRACE(COMP_ERR, DBG_DMESG, - ("AP off for %d s\n", - (rtlpriv->link_info.roam_times * 2))); + RT_TRACE(COMP_ERR, DBG_DMESG, "AP off for %d s\n", + rtlpriv->link_info.roam_times * 2); /* if we can't recv beacon for 10s, * we should reconnect this AP */ if (rtlpriv->link_info.roam_times >= 5) { RT_TRACE(COMP_ERR, DBG_EMERG, - ("AP off, try to reconnect now\n")); + "AP off, try to reconnect now\n"); rtlpriv->link_info.roam_times = 0; ieee80211_connection_loss( rtlpriv->mac80211.vif); @@ -1793,29 +1789,29 @@ void rtl92e_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len) (memcmp(mac->bssid, ap5_6, 3) == 0) || vendor == PEER_ATH) { vendor = PEER_ATH; - RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>ath find\n")); + RT_TRACE(COMP_MAC80211, DBG_LOUD, "=>ath find\n"); } else if ((memcmp(mac->bssid, ap4_4, 3) == 0) || (memcmp(mac->bssid, ap4_5, 3) == 0) || (memcmp(mac->bssid, ap4_1, 3) == 0) || (memcmp(mac->bssid, ap4_2, 3) == 0) || (memcmp(mac->bssid, ap4_3, 3) == 0) || vendor == PEER_RAL) { - RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>ral findn\n")); + RT_TRACE(COMP_MAC80211, DBG_LOUD, "=>ral findn\n"); vendor = PEER_RAL; } else if (memcmp(mac->bssid, ap6_1, 3) == 0 || vendor == PEER_CISCO) { vendor = PEER_CISCO; - RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>cisco find\n")); + RT_TRACE(COMP_MAC80211, DBG_LOUD, "=>cisco find\n"); } else if ((memcmp(mac->bssid, ap3_1, 3) == 0) || (memcmp(mac->bssid, ap3_2, 3) == 0) || (memcmp(mac->bssid, ap3_3, 3) == 0) || vendor == PEER_BROAD) { - RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>broad find\n")); + RT_TRACE(COMP_MAC80211, DBG_LOUD, "=>broad find\n"); vendor = PEER_BROAD; } else if (memcmp(mac->bssid, ap7_1, 3) == 0 || vendor == PEER_MARV) { vendor = PEER_MARV; - RT_TRACE(COMP_MAC80211, DBG_LOUD, ("=>marv find\n")); + RT_TRACE(COMP_MAC80211, DBG_LOUD, "=>marv find\n"); } mac->vendor = vendor; Reading git-diff-tree failed