diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-08-12 22:51:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-23 21:46:05 (GMT) |
commit | 74d556bc63fbf3481100be5c8de2637972cbdaeb (patch) | |
tree | 13fbfa00c04ff7c878235322844c3af379910366 /drivers/staging/rtl8187se/r8180_rtl8225z2.c | |
parent | 93583548585048812dc05a728d182a13213a9fd2 (diff) | |
download | linux-fsl-qoriq-74d556bc63fbf3481100be5c8de2637972cbdaeb.tar.xz |
drivers/staging/rtl8187se: Don't pass huge struct by value
struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8187se/r8180_rtl8225z2.c')
-rw-r--r-- | drivers/staging/rtl8187se/r8180_rtl8225z2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c index 3f09f76..ee5b867 100644 --- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c +++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c @@ -596,7 +596,7 @@ static void rtl8225_rf_set_chan(struct net_device *dev, short ch) { struct r8180_priv *priv = ieee80211_priv(dev); short gset = (priv->ieee80211->state == IEEE80211_LINKED && - ieee80211_is_54g(priv->ieee80211->current_network)) || + ieee80211_is_54g(&priv->ieee80211->current_network)) || priv->ieee80211->iw_mode == IW_MODE_MONITOR; rtl8225_SetTXPowerLevel(dev, ch); @@ -615,7 +615,7 @@ static void rtl8225_rf_set_chan(struct net_device *dev, short ch) } if (priv->ieee80211->state == IEEE80211_LINKED && - ieee80211_is_shortslot(priv->ieee80211->current_network)) + ieee80211_is_shortslot(&priv->ieee80211->current_network)) write_nic_byte(dev, SLOT, 0x9); else write_nic_byte(dev, SLOT, 0x14); |