]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FST: Mark fst_ies buffer const
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 3 Aug 2015 14:37:05 +0000 (17:37 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 3 Aug 2015 14:40:30 +0000 (17:40 +0300)
This buffer is owned by the FST module, so mark it const in the
set_ies() callback to make it clearer which component is responsible for
modifying and freeing this.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/hostapd.c
src/ap/hostapd.h
src/fst/fst.h
src/fst/fst_iface.h
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index c509ebf4240d13c2beeeb9aa3111b1687832b945..cf8c93d51538b4358bd5ec261a1b3434d6289d98 100644 (file)
@@ -1385,7 +1385,7 @@ static void fst_hostapd_get_channel_info_cb(void *ctx,
 }
 
 
-static void fst_hostapd_set_ies_cb(void *ctx, struct wpabuf *fst_ies)
+static void fst_hostapd_set_ies_cb(void *ctx, const struct wpabuf *fst_ies)
 {
        struct hostapd_data *hapd = ctx;
 
index 5c94bc1bd4f8a65394e844bce77e61d91bf622dd..89a1e8b5d6c9c53faadbcded6faf98d018f850d7 100644 (file)
@@ -312,7 +312,7 @@ struct hostapd_iface {
        unsigned int cac_started:1;
 #ifdef CONFIG_FST
        struct fst_iface *fst;
-       struct wpabuf *fst_ies;
+       const struct wpabuf *fst_ies;
 #endif /* CONFIG_FST */
 
        /*
index bfeba6367605d712872b7efe5b3ef7382b3e30e1..0c0e435b974b5d20126f146f2caf4cccf12b77e7 100644 (file)
@@ -70,9 +70,9 @@ struct fst_wpa_obj {
        /**
         * set_ies - Set interface's MB IE
         * @ctx: User context %ctx
-        * @fst_ies: MB IE buffer
+        * @fst_ies: MB IE buffer (owned by FST module)
         */
-       void (*set_ies)(void *ctx, struct wpabuf *fst_ies);
+       void (*set_ies)(void *ctx, const struct wpabuf *fst_ies);
 
        /**
         * send_action - Send FST Action frame via the interface
index 26cb38dddc4dfe487002f13a64261facf30e91ea..4670d894f7cbd3efb61a2a9a5a5e40ae7ef8dddb 100644 (file)
@@ -85,7 +85,7 @@ static inline int fst_iface_get_hw_modes(struct fst_iface *i,
 }
 
 static inline void fst_iface_set_ies(struct fst_iface *i,
-                                    struct wpabuf *fst_ies)
+                                    const struct wpabuf *fst_ies)
 {
        i->iface_obj.set_ies(i->iface_obj.ctx, fst_ies);
 }
index e1865d5f779d7465eda56f8a355bf9baa826a3d6..277265e8fb09da7357c9ce472e0f92965300cbbd 100644 (file)
@@ -3751,7 +3751,7 @@ static int wpas_fst_get_hw_modes(void *ctx, struct hostapd_hw_modes **modes)
 }
 
 
-static void wpas_fst_set_ies_cb(void *ctx, struct wpabuf *fst_ies)
+static void wpas_fst_set_ies_cb(void *ctx, const struct wpabuf *fst_ies)
 {
        struct wpa_supplicant *wpa_s = ctx;
 
index a4e99ede9bf6715708757c6d6749ba27c8bc7415..7154bb04e59db0f16d9ba9cebfe7bfe8c163ea40 100644 (file)
@@ -980,7 +980,7 @@ struct wpa_supplicant {
 
 #ifdef CONFIG_FST
        struct fst_iface *fst;
-       struct wpabuf *fst_ies;
+       const struct wpabuf *fst_ies;
        struct wpabuf *received_mb_ies;
 #endif /* CONFIG_FST */
 };