24 #include <linux/kernel.h>
25 #include <linux/module.h>
26 #include <linux/slab.h>
110 WL1271_EXTRA_SPACE_MAX;
156 static int wl1271_ap_init_deauth_template(
struct wl1271 *wl,
175 tmpl,
sizeof(*tmpl), 0, rate);
182 static int wl1271_ap_init_null_template(
struct wl1271 *wl,
185 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
190 nullfunc = kzalloc(
sizeof(*nullfunc),
GFP_KERNEL);
208 sizeof(*nullfunc), 0, rate);
215 static int wl1271_ap_init_qos_null_template(
struct wl1271 *wl,
218 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
223 qosnull = kzalloc(
sizeof(*qosnull),
GFP_KERNEL);
241 sizeof(*qosnull), 0, rate);
248 static int wl12xx_init_rx_config(
struct wl1271 *wl)
259 static int wl12xx_init_phy_vif_config(
struct wl1271 *wl,
279 static int wl1271_init_sta_beacon_filter(
struct wl1271 *wl,
322 static int wl1271_init_beacon_broadcast(
struct wl1271 *wl,
334 static int wl12xx_init_fwlog(
struct wl1271 *wl)
370 static int wl1271_sta_hw_init_post_mem(
struct wl1271 *wl,
373 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
398 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
401 ret = wl1271_ap_init_deauth_template(wl, wlvif);
405 ret = wl1271_ap_init_null_template(wl, vif);
409 ret = wl1271_ap_init_qos_null_template(wl, vif);
424 static int wl1271_ap_hw_init_post_mem(
struct wl1271 *wl,
472 supported_rates |= wlcore_hw_ap_get_mimo_wide_rate_mask(wl, wlvif);
475 for (i = 0; i < wl->
conf.tx.ac_conf_count; i++) {
481 wlvif->
ap.ucast_rate_idx[i]);
489 static int wl1271_set_ba_policies(
struct wl1271 *wl,
struct wl12xx_vif *wlvif)
509 static int wl12xx_init_sta_role(
struct wl1271 *wl,
struct wl12xx_vif *wlvif)
523 ret = wl1271_init_sta_beacon_filter(wl, wlvif);
528 ret = wl1271_init_beacon_broadcast(wl, wlvif);
559 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
574 u8 sta_auth = wl->
conf.conn.sta_sleep_auth;
591 ret = wl1271_ap_hw_init(wl, wlvif);
595 ret = wl12xx_init_ap_role(wl, wlvif);
599 ret = wl1271_sta_hw_init(wl, wlvif);
603 ret = wl12xx_init_sta_role(wl, wlvif);
608 wl12xx_init_phy_vif_config(wl, wlvif);
612 for (i = 0; i < wl->
conf.tx.tid_conf_count; i++) {
613 conf_ac = &wl->
conf.tx.ac_conf[
i];
620 conf_tid = &wl->
conf.tx.tid_conf[
i];
640 ret = wl1271_ap_hw_init_post_mem(wl, vif);
642 ret = wl1271_sta_hw_init_post_mem(wl, vif);
648 ret = wl1271_set_ba_policies(wl, wlvif);
652 ret = wlcore_hw_init_vif(wl, wlvif);
664 ret = wl->
ops->hw_init(wl);
678 ret = wl12xx_init_fwlog(wl);
693 ret = wl12xx_init_rx_config(wl);
695 goto out_free_memmap;
699 goto out_free_memmap;
704 goto out_free_memmap;
709 goto out_free_memmap;
714 goto out_free_memmap;
719 goto out_free_memmap;
724 goto out_free_memmap;
729 goto out_free_memmap;
733 goto out_free_memmap;
738 goto out_free_memmap;