diff options
| author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-05-28 13:36:49 +0300 |
|---|---|---|
| committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-05-28 13:36:49 +0300 |
| commit | 31eb07f5f8febab3d68b9d1a350d9e5a4bdf6780 (patch) | |
| tree | c5bf60cbb8a7bb5df466f8d6248c7223712348a2 /include/linux/kernel.h | |
| parent | 262888fcc70d42343dfb137a021d45be05183da6 (diff) | |
| parent | bbbe8c8c596b3784a2ed08772900e827f8ba72c5 (diff) | |
| download | linux-31eb07f5f8febab3d68b9d1a350d9e5a4bdf6780.tar.xz | |
Merge tag 'mac80211-next-for-davem-2015-05-06' into iwlwifi-next
Lots of updates for net-next for this cycle. As usual, we have
a lot of small fixes and cleanups, the bigger items are:
* proper mac80211 rate control locking, to fix some random crashes
(this required changing other locking as well)
* mac80211 "fast-xmit", a mechanism to reduce, in most cases, the
amount of code we execute while going from ndo_start_xmit() to
the driver
* this also clears the way for properly supporting S/G and checksum
and segmentation offloads
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d6d630d31ef3..3a5b48e52a9e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -103,6 +103,18 @@ (((__x) - ((__d) / 2)) / (__d)); \ } \ ) +/* + * Same as above but for u64 dividends. divisor must be a 32-bit + * number. + */ +#define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ +{ \ + typeof(divisor) __d = divisor; \ + unsigned long long _tmp = (x) + (__d) / 2; \ + do_div(_tmp, __d); \ + _tmp; \ +} \ +) /* * Multiplies an integer by a fraction, while avoiding unnecessary |
