diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-08 19:50:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-08 19:50:44 -0400 |
commit | 21f644f3eabde637f255f75ad05d0821a7a36b7f (patch) | |
tree | 2dc70aade59bf77c2d156b8e2544906128368f87 /drivers/net/wireless/ipw2200.c | |
parent | 6adb4f733e9996b4fd68a6db50dd51bd2463ccac (diff) |
[NET]: Undo code bloat in hot paths due to print_mac().
If print_mac() is used inside of a pr_debug() the compiler
can't see that the call is redundant so still performs it
even of pr_debug() ends up being a nop.
So don't use print_mac() in such cases in hot code paths,
use MAC_FMT et al. instead.
As noted by Joe Perches, pr_debug() could be modified to
handle this better, but that is a change to an interface
used by the entire kernel and thus needs to be validated
carefully. This here is thus the less risky fix for
2.6.25
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index a56d9fc6354f..0d78e40919cf 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -10192,7 +10192,6 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, | |||
10192 | u8 id, hdr_len, unicast; | 10192 | u8 id, hdr_len, unicast; |
10193 | u16 remaining_bytes; | 10193 | u16 remaining_bytes; |
10194 | int fc; | 10194 | int fc; |
10195 | DECLARE_MAC_BUF(mac); | ||
10196 | 10195 | ||
10197 | hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); | 10196 | hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); |
10198 | switch (priv->ieee->iw_mode) { | 10197 | switch (priv->ieee->iw_mode) { |
@@ -10203,8 +10202,10 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, | |||
10203 | id = ipw_add_station(priv, hdr->addr1); | 10202 | id = ipw_add_station(priv, hdr->addr1); |
10204 | if (id == IPW_INVALID_STATION) { | 10203 | if (id == IPW_INVALID_STATION) { |
10205 | IPW_WARNING("Attempt to send data to " | 10204 | IPW_WARNING("Attempt to send data to " |
10206 | "invalid cell: %s\n", | 10205 | "invalid cell: " MAC_FMT "\n", |
10207 | print_mac(mac, hdr->addr1)); | 10206 | hdr->addr1[0], hdr->addr1[1], |
10207 | hdr->addr1[2], hdr->addr1[3], | ||
10208 | hdr->addr1[4], hdr->addr1[5]); | ||
10208 | goto drop; | 10209 | goto drop; |
10209 | } | 10210 | } |
10210 | } | 10211 | } |