diff options
author | Joe Perches <joe@perches.com> | 2012-01-04 22:40:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:07:40 -0500 |
commit | 9d833ed752e91c71792dd8ebfd0f865e6a568a37 (patch) | |
tree | a0b03e38ee9a2186523df595c18e3839ab603c1f /drivers/net/wireless | |
parent | 4c48869f5d6e4ee4a773fd67a01e1b934faa57f8 (diff) |
rtlwifi: Convert RT_ASSERT macro to use ##__VA_ARGS__
Consolidate printks to avoid possible message interleaving
and reduce the object size.
Remove unnecessary RT_ASSERT parentheses.
Align arguments.
Coalesce formats.
Remove unnecessary __func__ use as the macro uses it.
$ size drivers/net/wireless/rtlwifi/built-in.o*
text data bss dec hex filename
588901 55333 127216 771450 bc57a drivers/net/wireless/rtlwifi/built-in.o.new
590002 55333 127560 772895 bcb1f drivers/net/wireless/rtlwifi/built-in.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
21 files changed, 68 insertions, 70 deletions
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c index 186c944c1436..ab6a4068764f 100644 --- a/drivers/net/wireless/rtlwifi/core.c +++ b/drivers/net/wireless/rtlwifi/core.c | |||
@@ -1026,8 +1026,8 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
1026 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, | 1026 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, |
1027 | "set pairwise key\n"); | 1027 | "set pairwise key\n"); |
1028 | if (!sta) { | 1028 | if (!sta) { |
1029 | RT_ASSERT(false, ("pairwise key withnot" | 1029 | RT_ASSERT(false, |
1030 | "mac_addr\n")); | 1030 | "pairwise key without mac_addr\n"); |
1031 | 1031 | ||
1032 | err = -EOPNOTSUPP; | 1032 | err = -EOPNOTSUPP; |
1033 | goto out_unlock; | 1033 | goto out_unlock; |
diff --git a/drivers/net/wireless/rtlwifi/debug.h b/drivers/net/wireless/rtlwifi/debug.h index 8b51a828effa..74b6780880f2 100644 --- a/drivers/net/wireless/rtlwifi/debug.h +++ b/drivers/net/wireless/rtlwifi/debug.h | |||
@@ -156,12 +156,11 @@ enum dbgp_flag_e { | |||
156 | DBGP_TYPE_MAX | 156 | DBGP_TYPE_MAX |
157 | }; | 157 | }; |
158 | 158 | ||
159 | #define RT_ASSERT(_exp, fmt) \ | 159 | #define RT_ASSERT(_exp, fmt, ...) \ |
160 | do { \ | 160 | do { \ |
161 | if (!(_exp)) { \ | 161 | if (!(_exp)) { \ |
162 | printk(KERN_DEBUG "%s:%s(): ", \ | 162 | printk(KERN_DEBUG KBUILD_MODNAME ":%s(): " fmt, \ |
163 | KBUILD_MODNAME, __func__); \ | 163 | __func__, ##__VA_ARGS__); \ |
164 | printk fmt; \ | ||
165 | } \ | 164 | } \ |
166 | } while (0) | 165 | } while (0) |
167 | 166 | ||
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index b52fef235754..3c4ae5d9de4f 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1746,16 +1746,15 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, | |||
1746 | 1746 | ||
1747 | err = pci_enable_device(pdev); | 1747 | err = pci_enable_device(pdev); |
1748 | if (err) { | 1748 | if (err) { |
1749 | RT_ASSERT(false, | 1749 | RT_ASSERT(false, "%s : Cannot enable new PCI device\n", |
1750 | ("%s : Cannot enable new PCI device\n", | 1750 | pci_name(pdev)); |
1751 | pci_name(pdev))); | ||
1752 | return err; | 1751 | return err; |
1753 | } | 1752 | } |
1754 | 1753 | ||
1755 | if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { | 1754 | if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { |
1756 | if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) { | 1755 | if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) { |
1757 | RT_ASSERT(false, ("Unable to obtain 32bit DMA " | 1756 | RT_ASSERT(false, |
1758 | "for consistent allocations\n")); | 1757 | "Unable to obtain 32bit DMA for consistent allocations\n"); |
1759 | pci_disable_device(pdev); | 1758 | pci_disable_device(pdev); |
1760 | return -ENOMEM; | 1759 | return -ENOMEM; |
1761 | } | 1760 | } |
@@ -1767,7 +1766,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, | |||
1767 | sizeof(struct rtl_priv), &rtl_ops); | 1766 | sizeof(struct rtl_priv), &rtl_ops); |
1768 | if (!hw) { | 1767 | if (!hw) { |
1769 | RT_ASSERT(false, | 1768 | RT_ASSERT(false, |
1770 | ("%s : ieee80211 alloc failed\n", pci_name(pdev))); | 1769 | "%s : ieee80211 alloc failed\n", pci_name(pdev)); |
1771 | err = -ENOMEM; | 1770 | err = -ENOMEM; |
1772 | goto fail1; | 1771 | goto fail1; |
1773 | } | 1772 | } |
@@ -1797,7 +1796,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, | |||
1797 | /* MEM map */ | 1796 | /* MEM map */ |
1798 | err = pci_request_regions(pdev, KBUILD_MODNAME); | 1797 | err = pci_request_regions(pdev, KBUILD_MODNAME); |
1799 | if (err) { | 1798 | if (err) { |
1800 | RT_ASSERT(false, ("Can't obtain PCI resources\n")); | 1799 | RT_ASSERT(false, "Can't obtain PCI resources\n"); |
1801 | return err; | 1800 | return err; |
1802 | } | 1801 | } |
1803 | 1802 | ||
@@ -1810,7 +1809,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, | |||
1810 | (unsigned long)pci_iomap(pdev, | 1809 | (unsigned long)pci_iomap(pdev, |
1811 | rtlpriv->cfg->bar_id, pmem_len); | 1810 | rtlpriv->cfg->bar_id, pmem_len); |
1812 | if (rtlpriv->io.pci_mem_start == 0) { | 1811 | if (rtlpriv->io.pci_mem_start == 0) { |
1813 | RT_ASSERT(false, ("Can't map PCI mem\n")); | 1812 | RT_ASSERT(false, "Can't map PCI mem\n"); |
1814 | goto fail2; | 1813 | goto fail2; |
1815 | } | 1814 | } |
1816 | 1815 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c index 12c025bf53b2..1eae3baae518 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | |||
@@ -519,8 +519,8 @@ void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw, | |||
519 | u32 tmp_cmdbuf[2]; | 519 | u32 tmp_cmdbuf[2]; |
520 | 520 | ||
521 | if (rtlhal->fw_ready == false) { | 521 | if (rtlhal->fw_ready == false) { |
522 | RT_ASSERT(false, ("return H2C cmd because of Fw " | 522 | RT_ASSERT(false, |
523 | "download fail!!!\n")); | 523 | "return H2C cmd because of Fw download fail!!!\n"); |
524 | return; | 524 | return; |
525 | } | 525 | } |
526 | 526 | ||
@@ -544,7 +544,7 @@ void rtl92c_firmware_selfreset(struct ieee80211_hw *hw) | |||
544 | while (u1b_tmp & BIT(2)) { | 544 | while (u1b_tmp & BIT(2)) { |
545 | delay--; | 545 | delay--; |
546 | if (delay == 0) { | 546 | if (delay == 0) { |
547 | RT_ASSERT(false, ("8051 reset fail.\n")); | 547 | RT_ASSERT(false, "8051 reset fail\n"); |
548 | break; | 548 | break; |
549 | } | 549 | } |
550 | udelay(50); | 550 | udelay(50); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c index 8ab93a69f334..25bde968699d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | |||
@@ -85,7 +85,7 @@ EXPORT_SYMBOL(rtl92c_phy_set_bb_reg); | |||
85 | u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw, | 85 | u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw, |
86 | enum radio_path rfpath, u32 offset) | 86 | enum radio_path rfpath, u32 offset) |
87 | { | 87 | { |
88 | RT_ASSERT(false, ("deprecated!\n")); | 88 | RT_ASSERT(false, "deprecated!\n"); |
89 | return 0; | 89 | return 0; |
90 | 90 | ||
91 | } | 91 | } |
@@ -95,7 +95,7 @@ void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw, | |||
95 | enum radio_path rfpath, u32 offset, | 95 | enum radio_path rfpath, u32 offset, |
96 | u32 data) | 96 | u32 data) |
97 | { | 97 | { |
98 | RT_ASSERT(false, ("deprecated!\n")); | 98 | RT_ASSERT(false, "deprecated!\n"); |
99 | } | 99 | } |
100 | EXPORT_SYMBOL(_rtl92c_phy_fw_rf_serial_write); | 100 | EXPORT_SYMBOL(_rtl92c_phy_fw_rf_serial_write); |
101 | 101 | ||
@@ -776,7 +776,7 @@ u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw) | |||
776 | if (rtlphy->set_bwmode_inprogress) | 776 | if (rtlphy->set_bwmode_inprogress) |
777 | return 0; | 777 | return 0; |
778 | RT_ASSERT((rtlphy->current_channel <= 14), | 778 | RT_ASSERT((rtlphy->current_channel <= 14), |
779 | ("WIRELESS_MODE_G but channel>14")); | 779 | "WIRELESS_MODE_G but channel>14\n"); |
780 | rtlphy->sw_chnl_inprogress = true; | 780 | rtlphy->sw_chnl_inprogress = true; |
781 | rtlphy->sw_chnl_stage = 0; | 781 | rtlphy->sw_chnl_stage = 0; |
782 | rtlphy->sw_chnl_step = 0; | 782 | rtlphy->sw_chnl_step = 0; |
@@ -802,7 +802,7 @@ static bool _rtl92c_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable, | |||
802 | struct swchnlcmd *pcmd; | 802 | struct swchnlcmd *pcmd; |
803 | 803 | ||
804 | if (cmdtable == NULL) { | 804 | if (cmdtable == NULL) { |
805 | RT_ASSERT(false, ("cmdtable cannot be NULL.\n")); | 805 | RT_ASSERT(false, "cmdtable cannot be NULL\n"); |
806 | return false; | 806 | return false; |
807 | } | 807 | } |
808 | 808 | ||
@@ -848,7 +848,7 @@ bool _rtl92c_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw, | |||
848 | rfdependcmdcnt = 0; | 848 | rfdependcmdcnt = 0; |
849 | 849 | ||
850 | RT_ASSERT((channel >= 1 && channel <= 14), | 850 | RT_ASSERT((channel >= 1 && channel <= 14), |
851 | ("illegal channel for Zebra: %d\n", channel)); | 851 | "invalid channel for Zebra: %d\n", channel); |
852 | 852 | ||
853 | _rtl92c_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++, | 853 | _rtl92c_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++, |
854 | MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG, | 854 | MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 2d01673a2087..18f615c41212 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
@@ -1166,7 +1166,7 @@ void rtl92ce_set_qos(struct ieee80211_hw *hw, int aci) | |||
1166 | rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222); | 1166 | rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222); |
1167 | break; | 1167 | break; |
1168 | default: | 1168 | default: |
1169 | RT_ASSERT(false, ("invalid aci: %d !\n", aci)); | 1169 | RT_ASSERT(false, "invalid aci: %d !\n", aci); |
1170 | break; | 1170 | break; |
1171 | } | 1171 | } |
1172 | } | 1172 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c index d2a3576fdaa5..4a224dbc693d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | |||
@@ -404,7 +404,7 @@ static int __init rtl92ce_module_init(void) | |||
404 | 404 | ||
405 | ret = pci_register_driver(&rtl92ce_driver); | 405 | ret = pci_register_driver(&rtl92ce_driver); |
406 | if (ret) | 406 | if (ret) |
407 | RT_ASSERT(false, (": No device found\n")); | 407 | RT_ASSERT(false, "No device found\n"); |
408 | 408 | ||
409 | return ret; | 409 | return ret; |
410 | } | 410 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index 9f6fac450a48..46892cc1a08d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
@@ -836,8 +836,8 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | |||
836 | SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); | 836 | SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); |
837 | break; | 837 | break; |
838 | default: | 838 | default: |
839 | RT_ASSERT(false, ("ERR txdesc :%d" | 839 | RT_ASSERT(false, "ERR txdesc :%d not process\n", |
840 | " not process\n", desc_name)); | 840 | desc_name); |
841 | break; | 841 | break; |
842 | } | 842 | } |
843 | } else { | 843 | } else { |
@@ -856,8 +856,8 @@ void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | |||
856 | SET_RX_DESC_EOR(pdesc, 1); | 856 | SET_RX_DESC_EOR(pdesc, 1); |
857 | break; | 857 | break; |
858 | default: | 858 | default: |
859 | RT_ASSERT(false, ("ERR rxdesc :%d " | 859 | RT_ASSERT(false, "ERR rxdesc :%d not process\n", |
860 | "not process\n", desc_name)); | 860 | desc_name); |
861 | break; | 861 | break; |
862 | } | 862 | } |
863 | } | 863 | } |
@@ -876,8 +876,8 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name) | |||
876 | ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc); | 876 | ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc); |
877 | break; | 877 | break; |
878 | default: | 878 | default: |
879 | RT_ASSERT(false, ("ERR txdesc :%d " | 879 | RT_ASSERT(false, "ERR txdesc :%d not process\n", |
880 | "not process\n", desc_name)); | 880 | desc_name); |
881 | break; | 881 | break; |
882 | } | 882 | } |
883 | } else { | 883 | } else { |
@@ -890,8 +890,8 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name) | |||
890 | ret = GET_RX_DESC_PKT_LEN(pdesc); | 890 | ret = GET_RX_DESC_PKT_LEN(pdesc); |
891 | break; | 891 | break; |
892 | default: | 892 | default: |
893 | RT_ASSERT(false, ("ERR rxdesc :%d " | 893 | RT_ASSERT(false, "ERR rxdesc :%d not process\n", |
894 | "not process\n", desc_name)); | 894 | desc_name); |
895 | break; | 895 | break; |
896 | } | 896 | } |
897 | } | 897 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c index de1542f14856..ae38bc52a716 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | |||
@@ -1984,8 +1984,9 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
1984 | u4b_ac_param); | 1984 | u4b_ac_param); |
1985 | break; | 1985 | break; |
1986 | default: | 1986 | default: |
1987 | RT_ASSERT(false, ("SetHwReg8185(): invalid" | 1987 | RT_ASSERT(false, |
1988 | " aci: %d !\n", e_aci)); | 1988 | "SetHwReg8185(): invalid aci: %d !\n", |
1989 | e_aci); | ||
1989 | break; | 1990 | break; |
1990 | } | 1991 | } |
1991 | if (rtlusb->acm_method != eAcmWay2_SW) | 1992 | if (rtlusb->acm_method != eAcmWay2_SW) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c index 9f09844d7d50..943f3d49d1f2 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c | |||
@@ -428,7 +428,7 @@ void rtl92c_set_qos(struct ieee80211_hw *hw, int aci) | |||
428 | rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, u4b_ac_param); | 428 | rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, u4b_ac_param); |
429 | break; | 429 | break; |
430 | default: | 430 | default: |
431 | RT_ASSERT(false, ("invalid aci: %d !\n", aci)); | 431 | RT_ASSERT(false, "invalid aci: %d !\n", aci); |
432 | break; | 432 | break; |
433 | } | 433 | } |
434 | } | 434 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c index b875af75b893..aca0fd5d1165 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | |||
@@ -244,8 +244,8 @@ u16 rtl8192cu_mq_to_hwq(__le16 fc, u16 mac80211_queue_index) | |||
244 | break; | 244 | break; |
245 | default: | 245 | default: |
246 | hw_queue_index = RTL_TXQ_BE; | 246 | hw_queue_index = RTL_TXQ_BE; |
247 | RT_ASSERT(false, ("QSLT_BE queue, skb_queue:%d\n", | 247 | RT_ASSERT(false, "QSLT_BE queue, skb_queue:%d\n", |
248 | mac80211_queue_index)); | 248 | mac80211_queue_index); |
249 | break; | 249 | break; |
250 | } | 250 | } |
251 | out: | 251 | out: |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c index b84f10d60c0d..94f5b7dd06ed 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c | |||
@@ -186,7 +186,7 @@ void rtl92d_firmware_selfreset(struct ieee80211_hw *hw) | |||
186 | udelay(50); | 186 | udelay(50); |
187 | u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); | 187 | u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1); |
188 | } | 188 | } |
189 | RT_ASSERT((delay > 0), ("8051 reset failed!\n")); | 189 | RT_ASSERT((delay > 0), "8051 reset failed!\n"); |
190 | RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, | 190 | RT_TRACE(rtlpriv, COMP_FW, DBG_DMESG, |
191 | "=====> 8051 reset success (%d)\n", delay); | 191 | "=====> 8051 reset success (%d)\n", delay); |
192 | } | 192 | } |
@@ -536,8 +536,8 @@ void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw, | |||
536 | u32 tmp_cmdbuf[2]; | 536 | u32 tmp_cmdbuf[2]; |
537 | 537 | ||
538 | if (rtlhal->fw_ready == false) { | 538 | if (rtlhal->fw_ready == false) { |
539 | RT_ASSERT(false, ("return H2C cmd because of Fw " | 539 | RT_ASSERT(false, |
540 | "download fail!!!\n")); | 540 | "return H2C cmd because of Fw download fail!!!\n"); |
541 | return; | 541 | return; |
542 | } | 542 | } |
543 | memset(tmp_cmdbuf, 0, 8); | 543 | memset(tmp_cmdbuf, 0, 8); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c index 5eecf403a5c3..d94ce371572f 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c | |||
@@ -1213,7 +1213,7 @@ void rtl92de_set_qos(struct ieee80211_hw *hw, int aci) | |||
1213 | rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222); | 1213 | rtl_write_dword(rtlpriv, REG_EDCA_VO_PARAM, 0x2f3222); |
1214 | break; | 1214 | break; |
1215 | default: | 1215 | default: |
1216 | RT_ASSERT(false, ("invalid aci: %d !\n", aci)); | 1216 | RT_ASSERT(false, "invalid aci: %d !\n", aci); |
1217 | break; | 1217 | break; |
1218 | } | 1218 | } |
1219 | } | 1219 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c index c736b9334888..f27acc754944 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c | |||
@@ -2928,7 +2928,7 @@ static bool _rtl92d_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable, | |||
2928 | struct swchnlcmd *pcmd; | 2928 | struct swchnlcmd *pcmd; |
2929 | 2929 | ||
2930 | if (cmdtable == NULL) { | 2930 | if (cmdtable == NULL) { |
2931 | RT_ASSERT(false, ("cmdtable cannot be NULL.\n")); | 2931 | RT_ASSERT(false, "cmdtable cannot be NULL\n"); |
2932 | return false; | 2932 | return false; |
2933 | } | 2933 | } |
2934 | if (cmdtableidx >= cmdtablesz) | 2934 | if (cmdtableidx >= cmdtablesz) |
@@ -3120,19 +3120,18 @@ u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw) | |||
3120 | * 5G and 2.4G band. */ | 3120 | * 5G and 2.4G band. */ |
3121 | if (channel <= 14) | 3121 | if (channel <= 14) |
3122 | return 0; | 3122 | return 0; |
3123 | RT_ASSERT((channel > 14), ("5G but channel<=14")); | 3123 | RT_ASSERT((channel > 14), "5G but channel<=14\n"); |
3124 | break; | 3124 | break; |
3125 | case BAND_ON_2_4G: | 3125 | case BAND_ON_2_4G: |
3126 | /* Get first channel error when change between | 3126 | /* Get first channel error when change between |
3127 | * 5G and 2.4G band. */ | 3127 | * 5G and 2.4G band. */ |
3128 | if (channel > 14) | 3128 | if (channel > 14) |
3129 | return 0; | 3129 | return 0; |
3130 | RT_ASSERT((channel <= 14), ("2G but channel>14")); | 3130 | RT_ASSERT((channel <= 14), "2G but channel>14\n"); |
3131 | break; | 3131 | break; |
3132 | default: | 3132 | default: |
3133 | RT_ASSERT(false, | 3133 | RT_ASSERT(false, "Invalid WirelessMode(%#x)!!\n", |
3134 | ("Invalid WirelessMode(%#x)!!\n", | 3134 | rtlpriv->mac80211.mode); |
3135 | rtlpriv->mac80211.mode)); | ||
3136 | break; | 3135 | break; |
3137 | } | 3136 | } |
3138 | rtlphy->sw_chnl_inprogress = true; | 3137 | rtlphy->sw_chnl_inprogress = true; |
@@ -3563,7 +3562,7 @@ void rtl92d_phy_set_poweron(struct ieee80211_hw *hw) | |||
3563 | } | 3562 | } |
3564 | } | 3563 | } |
3565 | if (i == 200) | 3564 | if (i == 200) |
3566 | RT_ASSERT(false, ("Another mac power off over time\n")); | 3565 | RT_ASSERT(false, "Another mac power off over time\n"); |
3567 | } | 3566 | } |
3568 | } | 3567 | } |
3569 | 3568 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c index db7579684b11..022f06529703 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c | |||
@@ -424,7 +424,7 @@ static int __init rtl92de_module_init(void) | |||
424 | 424 | ||
425 | ret = pci_register_driver(&rtl92de_driver); | 425 | ret = pci_register_driver(&rtl92de_driver); |
426 | if (ret) | 426 | if (ret) |
427 | RT_ASSERT(false, (": No device found\n")); | 427 | RT_ASSERT(false, "No device found\n"); |
428 | return ret; | 428 | return ret; |
429 | } | 429 | } |
430 | 430 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c index f6ec0a12884f..e7c985b372fa 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c | |||
@@ -793,8 +793,8 @@ void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | |||
793 | SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); | 793 | SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); |
794 | break; | 794 | break; |
795 | default: | 795 | default: |
796 | RT_ASSERT(false, ("ERR txdesc :%d" | 796 | RT_ASSERT(false, "ERR txdesc :%d not process\n", |
797 | " not process\n", desc_name)); | 797 | desc_name); |
798 | break; | 798 | break; |
799 | } | 799 | } |
800 | } else { | 800 | } else { |
@@ -813,8 +813,8 @@ void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | |||
813 | SET_RX_DESC_EOR(pdesc, 1); | 813 | SET_RX_DESC_EOR(pdesc, 1); |
814 | break; | 814 | break; |
815 | default: | 815 | default: |
816 | RT_ASSERT(false, ("ERR rxdesc :%d " | 816 | RT_ASSERT(false, "ERR rxdesc :%d not process\n", |
817 | "not process\n", desc_name)); | 817 | desc_name); |
818 | break; | 818 | break; |
819 | } | 819 | } |
820 | } | 820 | } |
@@ -833,8 +833,8 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name) | |||
833 | ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc); | 833 | ret = GET_TX_DESC_TX_BUFFER_ADDRESS(p_desc); |
834 | break; | 834 | break; |
835 | default: | 835 | default: |
836 | RT_ASSERT(false, ("ERR txdesc :%d " | 836 | RT_ASSERT(false, "ERR txdesc :%d not process\n", |
837 | "not process\n", desc_name)); | 837 | desc_name); |
838 | break; | 838 | break; |
839 | } | 839 | } |
840 | } else { | 840 | } else { |
@@ -847,8 +847,8 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name) | |||
847 | ret = GET_RX_DESC_PKT_LEN(pdesc); | 847 | ret = GET_RX_DESC_PKT_LEN(pdesc); |
848 | break; | 848 | break; |
849 | default: | 849 | default: |
850 | RT_ASSERT(false, ("ERR rxdesc :%d " | 850 | RT_ASSERT(false, "ERR rxdesc :%d not process\n", |
851 | "not process\n", desc_name)); | 851 | desc_name); |
852 | break; | 852 | break; |
853 | } | 853 | } |
854 | } | 854 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c index acab8781cc7e..b03001b23288 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c | |||
@@ -1200,7 +1200,7 @@ void rtl92se_set_qos(struct ieee80211_hw *hw, int aci) | |||
1200 | rtl_write_dword(rtlpriv, EDCAPARA_VO, 0x2f3222); | 1200 | rtl_write_dword(rtlpriv, EDCAPARA_VO, 0x2f3222); |
1201 | break; | 1201 | break; |
1202 | default: | 1202 | default: |
1203 | RT_ASSERT(false, ("invalid aci: %d !\n", aci)); | 1203 | RT_ASSERT(false, "invalid aci: %d !\n", aci); |
1204 | break; | 1204 | break; |
1205 | } | 1205 | } |
1206 | } | 1206 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c index ec5520e68472..e24dbb3a9ba4 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c | |||
@@ -335,7 +335,7 @@ static bool _rtl92s_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable, | |||
335 | struct swchnlcmd *pcmd; | 335 | struct swchnlcmd *pcmd; |
336 | 336 | ||
337 | if (cmdtable == NULL) { | 337 | if (cmdtable == NULL) { |
338 | RT_ASSERT(false, ("cmdtable cannot be NULL.\n")); | 338 | RT_ASSERT(false, "cmdtable cannot be NULL\n"); |
339 | return false; | 339 | return false; |
340 | } | 340 | } |
341 | 341 | ||
@@ -380,7 +380,7 @@ static bool _rtl92s_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw, | |||
380 | rfdependcmdcnt = 0; | 380 | rfdependcmdcnt = 0; |
381 | 381 | ||
382 | RT_ASSERT((channel >= 1 && channel <= 14), | 382 | RT_ASSERT((channel >= 1 && channel <= 14), |
383 | ("illegal channel for Zebra: %d\n", channel)); | 383 | "invalid channel for Zebra: %d\n", channel); |
384 | 384 | ||
385 | _rtl92s_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++, | 385 | _rtl92s_phy_set_sw_chnl_cmdarray(rfdependcmd, rfdependcmdcnt++, |
386 | MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG, | 386 | MAX_RFDEPENDCMD_CNT, CMDID_RF_WRITEREG, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c index bc4b6fa4fc85..a933aef3d1ac 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c | |||
@@ -426,7 +426,7 @@ static int __init rtl92se_module_init(void) | |||
426 | 426 | ||
427 | ret = pci_register_driver(&rtl92se_driver); | 427 | ret = pci_register_driver(&rtl92se_driver); |
428 | if (ret) | 428 | if (ret) |
429 | RT_ASSERT(false, (": No device found\n")); | 429 | RT_ASSERT(false, "No device found\n"); |
430 | 430 | ||
431 | return ret; | 431 | return ret; |
432 | } | 432 | } |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c index 1f266d1d7951..216a3e140de8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c | |||
@@ -823,8 +823,8 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | |||
823 | SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); | 823 | SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc, *(u32 *) val); |
824 | break; | 824 | break; |
825 | default: | 825 | default: |
826 | RT_ASSERT(false, ("ERR txdesc :%d not process\n", | 826 | RT_ASSERT(false, "ERR txdesc :%d not process\n", |
827 | desc_name)); | 827 | desc_name); |
828 | break; | 828 | break; |
829 | } | 829 | } |
830 | } else { | 830 | } else { |
@@ -843,8 +843,8 @@ void rtl92se_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | |||
843 | SET_RX_STATUS_DESC_EOR(pdesc, 1); | 843 | SET_RX_STATUS_DESC_EOR(pdesc, 1); |
844 | break; | 844 | break; |
845 | default: | 845 | default: |
846 | RT_ASSERT(false, ("ERR rxdesc :%d not process\n", | 846 | RT_ASSERT(false, "ERR rxdesc :%d not process\n", |
847 | desc_name)); | 847 | desc_name); |
848 | break; | 848 | break; |
849 | } | 849 | } |
850 | } | 850 | } |
@@ -863,8 +863,8 @@ u32 rtl92se_get_desc(u8 *desc, bool istx, u8 desc_name) | |||
863 | ret = GET_TX_DESC_TX_BUFFER_ADDRESS(desc); | 863 | ret = GET_TX_DESC_TX_BUFFER_ADDRESS(desc); |
864 | break; | 864 | break; |
865 | default: | 865 | default: |
866 | RT_ASSERT(false, ("ERR txdesc :%d not process\n", | 866 | RT_ASSERT(false, "ERR txdesc :%d not process\n", |
867 | desc_name)); | 867 | desc_name); |
868 | break; | 868 | break; |
869 | } | 869 | } |
870 | } else { | 870 | } else { |
@@ -876,8 +876,8 @@ u32 rtl92se_get_desc(u8 *desc, bool istx, u8 desc_name) | |||
876 | ret = GET_RX_STATUS_DESC_PKT_LEN(desc); | 876 | ret = GET_RX_STATUS_DESC_PKT_LEN(desc); |
877 | break; | 877 | break; |
878 | default: | 878 | default: |
879 | RT_ASSERT(false, ("ERR rxdesc :%d not process\n", | 879 | RT_ASSERT(false, "ERR rxdesc :%d not process\n", |
880 | desc_name)); | 880 | desc_name); |
881 | break; | 881 | break; |
882 | } | 882 | } |
883 | } | 883 | } |
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c index d670e6886c1f..6ae1b212ad99 100644 --- a/drivers/net/wireless/rtlwifi/usb.c +++ b/drivers/net/wireless/rtlwifi/usb.c | |||
@@ -946,7 +946,7 @@ int __devinit rtl_usb_probe(struct usb_interface *intf, | |||
946 | hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) + | 946 | hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) + |
947 | sizeof(struct rtl_usb_priv), &rtl_ops); | 947 | sizeof(struct rtl_usb_priv), &rtl_ops); |
948 | if (!hw) { | 948 | if (!hw) { |
949 | RT_ASSERT(false, ("%s : ieee80211 alloc failed\n", __func__)); | 949 | RT_ASSERT(false, "ieee80211 alloc failed\n"); |
950 | return -ENOMEM; | 950 | return -ENOMEM; |
951 | } | 951 | } |
952 | rtlpriv = hw->priv; | 952 | rtlpriv = hw->priv; |