Search Linux Wireless

Re: [PATCH v2 1/2] nl80211: process additional attributes in NL80211_CMD_SET_BEACON

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/6/2022 11:22 AM, Jeff Johnson wrote:
On 5/5/2022 10:34 AM, Aloka Dixit wrote:
-    struct cfg80211_beacon_data params;
+    struct cfg80211_ap_settings params;
      int err;
+    memset(&params, 0, sizeof(params));
+

is adding an = {} initializer preferable?


I will change this from static to dynamic allocation in the next version instead because noticed following error with some compiler: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

+    if (info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]) {
+        err = nl80211_parse_unsol_bcast_probe_resp(
+                rdev, info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP],
+                &params);
+        if (err)
+            goto out;
+    }
+

would adding a local variable 'attr' make the code more readable?
     attr = info->attrs[NL80211_ATTR_{foo}];
     if (attr) {
         err = nl80211_parse_{foo}(rdev, attr, &params);


Sure, thanks.



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux