From: Johannes Berg Date: Thu, 10 Nov 2011 14:55:21 +0000 (-0800) Subject: iwlagn: convert remain-on-channel duration to TU X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3ddf6befb98d5dd61466a0e0e585037f6dca352f;p=linux-beck.git iwlagn: convert remain-on-channel duration to TU The device expects TU but we get ms, so convert. Signed-off-by: Johannes Berg Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 073e827c462b..05b1f0d2f387 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c @@ -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);