summaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-08-28 15:50:33 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:48:37 -0700
commit172589ccdde41b59861c92c4a971b95514ef24e3 (patch)
treeae775e6db4cb85aad1c74b6d93ba359f9dfe88ea /net/mac80211/tx.c
parentc45248c70125cc374fdf264659643276c72801bf (diff)
downloadop-kernel-dev-172589ccdde41b59861c92c4a971b95514ef24e3.zip
op-kernel-dev-172589ccdde41b59861c92c4a971b95514ef24e3.tar.gz
[NET]: DIV_ROUND_UP cleanup (part two)
Hopefully captured all single statement cases under net/. I'm not too sure if there is some policy about #includes that are "guaranteed" (ie., in the current tree) to be available through some other #included header, so I just added linux/kernel.h to each changed file that didn't #include it previously. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4571668..4ab2928 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -476,7 +476,7 @@ ieee80211_tx_h_fragment(struct ieee80211_txrx_data *tx)
hdrlen = ieee80211_get_hdrlen(tx->fc);
payload_len = first->len - hdrlen;
per_fragm = frag_threshold - hdrlen - FCS_LEN;
- num_fragm = (payload_len + per_fragm - 1) / per_fragm;
+ num_fragm = DIV_ROUND_UP(payload_len, per_fragm);
frags = kzalloc(num_fragm * sizeof(struct sk_buff *), GFP_ATOMIC);
if (!frags)
OpenPOWER on IntegriCloud