]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
iwlagn: convert remain-on-channel duration to TU
authorJohannes Berg <johannes.berg@intel.com>
Thu, 10 Nov 2011 14:55:21 +0000 (06:55 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 11 Nov 2011 17:32:55 +0000 (12:32 -0500)
The device expects TU but we get ms, so convert.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-mac80211.c

index 073e827c462b6b3f27ce8004fb16ad8ad2080fec..05b1f0d2f38716f224b936f4dc81b5cc0bc51eac 100644 (file)
@@ -957,7 +957,8 @@ static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw,
 
        priv->hw_roc_channel = channel;
        priv->hw_roc_chantype = channel_type;
-       priv->hw_roc_duration = duration;
+       /* convert from ms to TU */
+       priv->hw_roc_duration = DIV_ROUND_UP(1000 * duration, 1024);
        priv->hw_roc_start_notified = false;
        cancel_delayed_work(&priv->hw_roc_disable_work);