Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
authorAlex Shi <alex.shi@linaro.org>
Tue, 6 Dec 2016 05:01:29 +0000 (13:01 +0800)
committerAlex Shi <alex.shi@linaro.org>
Tue, 6 Dec 2016 05:01:29 +0000 (13:01 +0800)
Conflicts:
keep low scan freq in android in net/wireless/scan.c

1  2 
net/wireless/scan.c

index 30f967665e84c72d3521304ddfef4767c8db17cf,8dde12a11725877104d040bf04251be80781eb32..6e7b86ca2abd6cbc0f72de95513307d980347769
   * also linked into the probe response struct.
   */
  
 -#define IEEE80211_SCAN_RESULT_EXPIRE  (30 * HZ)
+ /*
+  * Limit the number of BSS entries stored in mac80211. Each one is
+  * a bit over 4k at most, so this limits to roughly 4-5M of memory.
+  * If somebody wants to really attack this though, they'd likely
+  * use small beacons, and only one type of frame, limiting each of
+  * the entries to a much smaller size (in order to generate more
+  * entries in total, so overhead is bigger.)
+  */
+ static int bss_entries_limit = 1000;
+ module_param(bss_entries_limit, int, 0644);
+ MODULE_PARM_DESC(bss_entries_limit,
+                  "limit to number of scan BSS entries (per wiphy, default 1000)");
 +#define IEEE80211_SCAN_RESULT_EXPIRE  (7 * HZ)
  
  static void bss_free(struct cfg80211_internal_bss *bss)
  {