X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fstaging%2Frtl8192e%2Frtl8192e%2Frtl_core.c;h=11183b9f757a85c77f7e3c5aaaaa16d03fd30189;hb=7ba31c3f2f1ee095d8126f4d3757fc3b2bc3c838;hp=e895473fcfd759c388f8884bb95b94365e0c1550;hpb=b5f7ab6b1c4ed967fb76258f79251193cb1ad41d;p=linux-2.6-microblaze.git diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index e895473fcfd7..11183b9f757a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -267,7 +267,7 @@ static short _rtl92e_check_nic_enough_desc(struct net_device *dev, int prio) return 0; } -static void _rtl92e_tx_timeout(struct net_device *dev) +static void _rtl92e_tx_timeout(struct net_device *dev, unsigned int txqueue) { struct r8192_priv *priv = rtllib_priv(dev); @@ -1973,18 +1973,11 @@ u8 rtl92e_rx_db_to_percent(s8 antpower) u8 rtl92e_evm_db_to_percent(s8 value) { - s8 ret_val; + s8 ret_val = clamp(-value, 0, 33) * 3; - ret_val = value; - - if (ret_val >= 0) - ret_val = 0; - if (ret_val <= -33) - ret_val = -33; - ret_val = 0 - ret_val; - ret_val *= 3; if (ret_val == 99) ret_val = 100; + return ret_val; }