IEEE80211_IBSS_AUTO_CHANNEL_SEL;
}
+int ieee80211_ibss_commit(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+
+ ifibss->flags &= ~IEEE80211_IBSS_PREV_BSSID_SET;
+
+ if (ifibss->ssid_len)
+ ifibss->flags |= IEEE80211_IBSS_SSID_SET;
+ else
+ ifibss->flags &= ~IEEE80211_IBSS_SSID_SET;
+
+ ifibss->ibss_join_req = jiffies;
+ ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
+
+ return ieee80211_sta_find_ibss(sdata);
+}
+
int ieee80211_ibss_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len)
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
ifibss->ssid_len = len;
}
- ifibss->flags &= ~IEEE80211_IBSS_PREV_BSSID_SET;
-
- if (len)
- ifibss->flags |= IEEE80211_IBSS_SSID_SET;
- else
- ifibss->flags &= ~IEEE80211_IBSS_SSID_SET;
-
- ifibss->ibss_join_req = jiffies;
- ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
- return ieee80211_sta_find_ibss(sdata);
+ return ieee80211_ibss_commit(sdata);
}
int ieee80211_ibss_get_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t *len)
}
}
- return ieee80211_ibss_set_ssid(sdata, ifibss->ssid, ifibss->ssid_len);
+ return ieee80211_ibss_commit(sdata);
}
/* scan finished notification */
ieee80211_rx_result ieee80211_sta_rx_mgmt(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb,
struct ieee80211_rx_status *rx_status);
+int ieee80211_sta_commit(struct ieee80211_sub_if_data *sdata);
int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len);
int ieee80211_sta_get_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t *len);
int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid);
struct ieee80211_sub_if_data *sdata);
/* IBSS code */
+int ieee80211_ibss_commit(struct ieee80211_sub_if_data *sdata);
int ieee80211_ibss_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len);
int ieee80211_ibss_get_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t *len);
int ieee80211_ibss_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid);
}
}
+int ieee80211_sta_commit(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+
+ ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
+
+ if (ifmgd->ssid_len)
+ ifmgd->flags |= IEEE80211_STA_SSID_SET;
+ else
+ ifmgd->flags &= ~IEEE80211_STA_SSID_SET;
+
+ return 0;
+}
+
int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len)
{
struct ieee80211_if_managed *ifmgd;
ifmgd->ssid_len = len;
}
- ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
-
- if (len)
- ifmgd->flags |= IEEE80211_STA_SSID_SET;
- else
- ifmgd->flags &= ~IEEE80211_STA_SSID_SET;
-
- return 0;
+ return ieee80211_sta_commit(sdata);
}
int ieee80211_sta_get_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t *len)
}
}
- return ieee80211_sta_set_ssid(sdata, ifmgd->ssid, ifmgd->ssid_len);
+ return ieee80211_sta_commit(sdata);
}
int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, char *ie, size_t len)