*
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
*/
#include <stdio.h>
#include <inttypes.h>
#include <fcntl.h>
#include <errno.h>
-#include <pthread.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/types.h>
if (txreq.flags & NETTXF_csum_blank) {
/* have read-only mapping -> can't fill checksum in-place */
if (!tmpbuf) {
- tmpbuf = qemu_malloc(XC_PAGE_SIZE);
+ tmpbuf = g_malloc(XC_PAGE_SIZE);
}
memcpy(tmpbuf, page + txreq.offset, txreq.size);
net_checksum_calculate(tmpbuf, txreq.size);
}
netdev->tx_work = 0;
}
- qemu_free(tmpbuf);
+ g_free(tmpbuf);
}
/* ------------------------------------------------------------- */
{
struct XenNetDev *netdev = container_of(xendev, struct XenNetDev, xendev);
- qemu_free(netdev->mac);
+ g_free(netdev->mac);
return 0;
}
.size = sizeof(struct XenNetDev),
.flags = DEVOPS_FLAG_NEED_GNTDEV,
.init = net_init,
- .connect = net_connect,
+ .initialise = net_connect,
.event = net_event,
.disconnect = net_disconnect,
.free = net_free,