|
@@ -1092,50 +1092,6 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-/* Layer 2 Update frame (802.2 Type 1 LLC XID Update response) */
|
|
|
|
-struct iapp_layer2_update {
|
|
|
|
- u8 da[ETH_ALEN]; /* broadcast */
|
|
|
|
- u8 sa[ETH_ALEN]; /* STA addr */
|
|
|
|
- __be16 len; /* 6 */
|
|
|
|
- u8 dsap; /* 0 */
|
|
|
|
- u8 ssap; /* 0 */
|
|
|
|
- u8 control;
|
|
|
|
- u8 xid_info[3];
|
|
|
|
-} __packed;
|
|
|
|
-
|
|
|
|
-static void ieee80211_send_layer2_update(struct sta_info *sta)
|
|
|
|
-{
|
|
|
|
- struct iapp_layer2_update *msg;
|
|
|
|
- struct sk_buff *skb;
|
|
|
|
-
|
|
|
|
- /* Send Level 2 Update Frame to update forwarding tables in layer 2
|
|
|
|
- * bridge devices */
|
|
|
|
-
|
|
|
|
- skb = dev_alloc_skb(sizeof(*msg));
|
|
|
|
- if (!skb)
|
|
|
|
- return;
|
|
|
|
- msg = skb_put(skb, sizeof(*msg));
|
|
|
|
-
|
|
|
|
- /* 802.2 Type 1 Logical Link Control (LLC) Exchange Identifier (XID)
|
|
|
|
- * Update response frame; IEEE Std 802.2-1998, 5.4.1.2.1 */
|
|
|
|
-
|
|
|
|
- eth_broadcast_addr(msg->da);
|
|
|
|
- memcpy(msg->sa, sta->sta.addr, ETH_ALEN);
|
|
|
|
- msg->len = htons(6);
|
|
|
|
- msg->dsap = 0;
|
|
|
|
- msg->ssap = 0x01; /* NULL LSAP, CR Bit: Response */
|
|
|
|
- msg->control = 0xaf; /* XID response lsb.1111F101.
|
|
|
|
- * F=0 (no poll command; unsolicited frame) */
|
|
|
|
- msg->xid_info[0] = 0x81; /* XID format identifier */
|
|
|
|
- msg->xid_info[1] = 1; /* LLC types/classes: Type 1 LLC */
|
|
|
|
- msg->xid_info[2] = 0; /* XID sender's receive window size (RW) */
|
|
|
|
-
|
|
|
|
- skb->dev = sta->sdata->dev;
|
|
|
|
- skb->protocol = eth_type_trans(skb, sta->sdata->dev);
|
|
|
|
- memset(skb->cb, 0, sizeof(skb->cb));
|
|
|
|
- netif_rx_ni(skb);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int sta_apply_auth_flags(struct ieee80211_local *local,
|
|
static int sta_apply_auth_flags(struct ieee80211_local *local,
|
|
struct sta_info *sta,
|
|
struct sta_info *sta,
|
|
u32 mask, u32 set)
|
|
u32 mask, u32 set)
|
|
@@ -1499,7 +1455,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
|
|
}
|
|
}
|
|
|
|
|
|
if (layer2_update)
|
|
if (layer2_update)
|
|
- ieee80211_send_layer2_update(sta);
|
|
|
|
|
|
+ cfg80211_send_layer2_update(sta->sdata->dev, sta->sta.addr);
|
|
|
|
|
|
rcu_read_unlock();
|
|
rcu_read_unlock();
|
|
|
|
|
|
@@ -1601,7 +1557,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
|
|
if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
|
|
if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
|
|
ieee80211_vif_inc_num_mcast(sta->sdata);
|
|
ieee80211_vif_inc_num_mcast(sta->sdata);
|
|
|
|
|
|
- ieee80211_send_layer2_update(sta);
|
|
|
|
|
|
+ cfg80211_send_layer2_update(sta->sdata->dev, sta->sta.addr);
|
|
}
|
|
}
|
|
|
|
|
|
err = sta_apply_parameters(local, sta, params);
|
|
err = sta_apply_parameters(local, sta, params);
|