Lines Matching defs:vif

189 static bool qtnf_cmd_start_ap_can_fit(const struct qtnf_vif *vif,
215 vif->mac->macid, vif->vifid, len);
236 int qtnf_cmd_send_start_ap(struct qtnf_vif *vif,
246 if (!qtnf_cmd_start_ap_can_fit(vif, s))
249 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
358 qtnf_bus_lock(vif->mac->bus);
359 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
363 netif_carrier_on(vif->netdev);
366 qtnf_bus_unlock(vif->mac->bus);
371 int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif)
376 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
382 qtnf_bus_lock(vif->mac->bus);
383 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
384 qtnf_bus_unlock(vif->mac->bus);
389 int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg)
395 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
401 qtnf_bus_lock(vif->mac->bus);
407 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
409 qtnf_bus_unlock(vif->mac->bus);
414 int qtnf_cmd_send_frame(struct qtnf_vif *vif, u32 cookie, u16 flags,
422 pr_warn("VIF%u.%u: frame is too big: %zu\n", vif->mac->macid,
423 vif->vifid, len);
427 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
433 qtnf_bus_lock(vif->mac->bus);
443 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
445 qtnf_bus_unlock(vif->mac->bus);
450 int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type,
457 pr_warn("VIF%u.%u: %u frame is too big: %zu\n", vif->mac->macid,
458 vif->vifid, frame_type, len);
462 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
470 qtnf_bus_lock(vif->mac->bus);
471 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
472 qtnf_bus_unlock(vif->mac->bus);
702 int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac,
711 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
717 qtnf_bus_lock(vif->mac->bus);
722 ret = qtnf_cmd_send_with_reply(vif->mac->bus, cmd_skb, &resp_skb,
731 vif->mac->macid, vif->vifid, resp->sta_addr, sta_mac);
739 qtnf_bus_unlock(vif->mac->bus);
745 static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif,
756 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
762 qtnf_bus_lock(vif->mac->bus);
775 pr_err("VIF%u.%u: unsupported type %d\n", vif->mac->macid,
776 vif->vifid, iftype);
786 ret = qtnf_cmd_send_with_reply(vif->mac->bus, cmd_skb, &resp_skb,
792 ether_addr_copy(vif->mac_addr, resp->intf_info.mac_addr);
795 qtnf_bus_unlock(vif->mac->bus);
801 int qtnf_cmd_send_add_intf(struct qtnf_vif *vif, enum nl80211_iftype iftype,
804 return qtnf_cmd_send_add_change_intf(vif, iftype, use4addr, mac_addr,
808 int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif,
815 ret = qtnf_cmd_send_add_change_intf(vif, iftype, use4addr, mac_addr,
819 if (ret == 0 && vif->wdev.iftype != iftype) {
821 struct wiphy *wiphy = priv_to_wiphy(vif->mac);
827 qtnf_cmd_band_info_get(vif->mac, wiphy->bands[band]);
834 int qtnf_cmd_send_del_intf(struct qtnf_vif *vif)
840 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
846 qtnf_bus_lock(vif->mac->bus);
850 switch (vif->wdev.iftype) {
858 pr_warn("VIF%u.%u: unsupported iftype %d\n", vif->mac->macid,
859 vif->vifid, vif->wdev.iftype);
867 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
872 qtnf_bus_unlock(vif->mac->bus);
1221 struct qtnf_vif *vif;
1230 vif = qtnf_mac_get_base_vif(mac);
1231 if (vif)
1232 ether_addr_copy(vif->mac_addr, mac->macaddr);
1234 pr_err("could not get valid base vif\n");
1725 int qtnf_cmd_send_add_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
1732 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
1738 qtnf_bus_lock(vif->mac->bus);
1761 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
1763 qtnf_bus_unlock(vif->mac->bus);
1768 int qtnf_cmd_send_del_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
1775 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
1781 qtnf_bus_lock(vif->mac->bus);
1793 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
1795 qtnf_bus_unlock(vif->mac->bus);
1800 int qtnf_cmd_send_set_default_key(struct qtnf_vif *vif, u8 key_index,
1807 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
1813 qtnf_bus_lock(vif->mac->bus);
1820 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
1822 qtnf_bus_unlock(vif->mac->bus);
1827 int qtnf_cmd_send_set_default_mgmt_key(struct qtnf_vif *vif, u8 key_index)
1833 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
1839 qtnf_bus_lock(vif->mac->bus);
1844 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
1846 qtnf_bus_unlock(vif->mac->bus);
1872 int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac,
1879 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
1885 qtnf_bus_lock(vif->mac->bus);
1894 switch (vif->wdev.iftype) {
1902 pr_err("unsupported iftype %d\n", vif->wdev.iftype);
1908 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
1911 qtnf_bus_unlock(vif->mac->bus);
1916 int qtnf_cmd_send_del_sta(struct qtnf_vif *vif,
1923 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
1929 qtnf_bus_lock(vif->mac->bus);
1941 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
1943 qtnf_bus_unlock(vif->mac->bus);
2075 int qtnf_cmd_send_connect(struct qtnf_vif *vif,
2086 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2094 ether_addr_copy(cmd->bssid, vif->bssid);
2162 qtnf_bus_lock(vif->mac->bus);
2163 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
2164 qtnf_bus_unlock(vif->mac->bus);
2169 int qtnf_cmd_send_external_auth(struct qtnf_vif *vif,
2176 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2187 qtnf_bus_lock(vif->mac->bus);
2188 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
2189 qtnf_bus_unlock(vif->mac->bus);
2194 int qtnf_cmd_send_disconnect(struct qtnf_vif *vif, u16 reason_code)
2200 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2206 qtnf_bus_lock(vif->mac->bus);
2211 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
2213 qtnf_bus_unlock(vif->mac->bus);
2218 int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif, bool up)
2224 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2233 qtnf_bus_lock(vif->mac->bus);
2234 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
2235 qtnf_bus_unlock(vif->mac->bus);
2456 int qtnf_cmd_send_chan_switch(struct qtnf_vif *vif,
2459 struct qtnf_wmac *mac = vif->mac;
2465 cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, vif->vifid,
2489 int qtnf_cmd_get_channel(struct qtnf_vif *vif, struct cfg80211_chan_def *chdef)
2491 struct qtnf_bus *bus = vif->mac->bus;
2497 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2510 qlink_chandef_q2cfg(priv_to_wiphy(vif->mac), &resp->chan, chdef);
2519 int qtnf_cmd_start_cac(const struct qtnf_vif *vif,
2523 struct qtnf_bus *bus = vif->mac->bus;
2528 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2545 int qtnf_cmd_set_mac_acl(const struct qtnf_vif *vif,
2548 struct qtnf_bus *bus = vif->mac->bus;
2554 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2572 int qtnf_cmd_send_pm_set(const struct qtnf_vif *vif, u8 pm_mode, int timeout)
2574 struct qtnf_bus *bus = vif->mac->bus;
2579 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2597 int qtnf_cmd_get_tx_power(const struct qtnf_vif *vif, int *dbm)
2599 struct qtnf_bus *bus = vif->mac->bus;
2606 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2631 int qtnf_cmd_set_tx_power(const struct qtnf_vif *vif,
2634 struct qtnf_bus *bus = vif->mac->bus;
2641 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2662 int qtnf_cmd_send_wowlan_set(const struct qtnf_vif *vif,
2665 struct qtnf_bus *bus = vif->mac->bus;
2672 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2708 int qtnf_cmd_netdev_changeupper(const struct qtnf_vif *vif, int br_domain)
2710 struct qtnf_bus *bus = vif->mac->bus;
2715 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2722 vif->mac->macid, vif->vifid, br_domain);
2735 vif->mac->macid, vif->vifid);
2740 int qtnf_cmd_send_update_owe(struct qtnf_vif *vif,
2749 vif->mac->macid, vif->vifid, owe->ie_len);
2753 cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid,
2765 qtnf_bus_lock(vif->mac->bus);
2766 ret = qtnf_cmd_send(vif->mac->bus, cmd_skb);
2767 qtnf_bus_unlock(vif->mac->bus);