| .. | .. |
|---|
| 86 | 86 | static int lbs_mesh_config(struct lbs_private *priv, uint16_t action, |
|---|
| 87 | 87 | uint16_t chan) |
|---|
| 88 | 88 | { |
|---|
| 89 | + struct wireless_dev *mesh_wdev; |
|---|
| 89 | 90 | struct cmd_ds_mesh_config cmd; |
|---|
| 90 | 91 | struct mrvl_meshie *ie; |
|---|
| 91 | 92 | |
|---|
| .. | .. |
|---|
| 105 | 106 | ie->val.active_protocol_id = MARVELL_MESH_PROTO_ID_HWMP; |
|---|
| 106 | 107 | ie->val.active_metric_id = MARVELL_MESH_METRIC_ID; |
|---|
| 107 | 108 | ie->val.mesh_capability = MARVELL_MESH_CAPABILITY; |
|---|
| 108 | | - ie->val.mesh_id_len = priv->mesh_ssid_len; |
|---|
| 109 | | - memcpy(ie->val.mesh_id, priv->mesh_ssid, priv->mesh_ssid_len); |
|---|
| 109 | + |
|---|
| 110 | + if (priv->mesh_dev) { |
|---|
| 111 | + mesh_wdev = priv->mesh_dev->ieee80211_ptr; |
|---|
| 112 | + ie->val.mesh_id_len = mesh_wdev->mesh_id_up_len; |
|---|
| 113 | + memcpy(ie->val.mesh_id, mesh_wdev->ssid, |
|---|
| 114 | + mesh_wdev->mesh_id_up_len); |
|---|
| 115 | + } |
|---|
| 116 | + |
|---|
| 110 | 117 | ie->len = sizeof(struct mrvl_meshie_val) - |
|---|
| 111 | | - IEEE80211_MAX_SSID_LEN + priv->mesh_ssid_len; |
|---|
| 118 | + IEEE80211_MAX_SSID_LEN + ie->val.mesh_id_len; |
|---|
| 119 | + |
|---|
| 112 | 120 | cmd.length = cpu_to_le16(sizeof(struct mrvl_meshie_val)); |
|---|
| 113 | 121 | break; |
|---|
| 114 | 122 | case CMD_ACT_MESH_CONFIG_STOP: |
|---|
| .. | .. |
|---|
| 117 | 125 | return -1; |
|---|
| 118 | 126 | } |
|---|
| 119 | 127 | lbs_deb_cmd("mesh config action %d type %x channel %d SSID %*pE\n", |
|---|
| 120 | | - action, priv->mesh_tlv, chan, priv->mesh_ssid_len, |
|---|
| 121 | | - priv->mesh_ssid); |
|---|
| 128 | + action, priv->mesh_tlv, chan, ie->val.mesh_id_len, |
|---|
| 129 | + ie->val.mesh_id); |
|---|
| 122 | 130 | |
|---|
| 123 | 131 | return __lbs_mesh_config_send(priv, &cmd, action, priv->mesh_tlv); |
|---|
| 124 | 132 | } |
|---|
| .. | .. |
|---|
| 802 | 810 | * Check mesh FW version and appropriately send the mesh start |
|---|
| 803 | 811 | * command |
|---|
| 804 | 812 | */ |
|---|
| 805 | | -int lbs_init_mesh(struct lbs_private *priv) |
|---|
| 813 | +void lbs_init_mesh(struct lbs_private *priv) |
|---|
| 806 | 814 | { |
|---|
| 807 | | - int ret = 0; |
|---|
| 808 | | - |
|---|
| 809 | 815 | /* Determine mesh_fw_ver from fwrelease and fwcapinfo */ |
|---|
| 810 | 816 | /* 5.0.16p0 9.0.0.p0 is known to NOT support any mesh */ |
|---|
| 811 | 817 | /* 5.110.22 have mesh command with 0xa3 command id */ |
|---|
| .. | .. |
|---|
| 844 | 850 | |
|---|
| 845 | 851 | /* Stop meshing until interface is brought up */ |
|---|
| 846 | 852 | lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_STOP, 1); |
|---|
| 847 | | - |
|---|
| 848 | | - if (priv->mesh_tlv) { |
|---|
| 849 | | - sprintf(priv->mesh_ssid, "mesh"); |
|---|
| 850 | | - priv->mesh_ssid_len = 4; |
|---|
| 851 | | - ret = 1; |
|---|
| 852 | | - } |
|---|
| 853 | | - |
|---|
| 854 | | - return ret; |
|---|
| 855 | 853 | } |
|---|
| 856 | 854 | |
|---|
| 857 | 855 | void lbs_start_mesh(struct lbs_private *priv) |
|---|
| .. | .. |
|---|
| 979 | 977 | |
|---|
| 980 | 978 | mesh_wdev->iftype = NL80211_IFTYPE_MESH_POINT; |
|---|
| 981 | 979 | mesh_wdev->wiphy = priv->wdev->wiphy; |
|---|
| 980 | + |
|---|
| 981 | + if (priv->mesh_tlv) { |
|---|
| 982 | + sprintf(mesh_wdev->ssid, "mesh"); |
|---|
| 983 | + mesh_wdev->mesh_id_up_len = 4; |
|---|
| 984 | + } |
|---|
| 985 | + |
|---|
| 982 | 986 | mesh_wdev->netdev = mesh_dev; |
|---|
| 983 | 987 | |
|---|
| 984 | 988 | mesh_dev->ml_priv = priv; |
|---|